Bixby Developer Center

References

as

optionalvalue required

Allows you to create an alias for a capsule that you import.

Example

    capsule-imports {
import (viv.core) {
as (core)
}
import (viv.self) {
as (self)
version (4.0.25)
}
import (viv.time) {
as (time)
version-from (self)
}
import (viv.money) {
as (money)
version (2.22.56)
}
}

View 698bec2 on GitHub

  capsule-imports {
import (viv.core) {
as (core)
}
import (viv.time) {
as (time)
version (3.3.34)
}
}

View b39c192 on GitHub

...
capsule-imports {
import (example.flight) {
as (flight)
version (1.0.2)
}
...
Note

Aliases defined with as can only be used in the capsule that declares them, not in capsules that import them. That is, in the example above, if example.flight imports any capsules and declares aliases for them with as, you cannot use the aliases defined in example.flight in your capsule. If you need to do this, explicitly import the capsule using version-from to remain in sync with the higher-level capsule:

...
  capsule-imports {
    import (example.flight) {
      as (flight)
      version (1.0.2)
    }
    import (example.foobar) {
      as (foobar)
      version-from (flight)
    }
  }
...