Scope
Declare a scope for this component’s children. Any symbols and scopes declared in the children of this component will be in this scope.
Overload 1
Declare a scope by providing an already created scope. The scope is merely exposed via Scope context.
import { Scope } from "@alloy-js/core";
<Scope value={OutputScope}> {children}</Scope>
import { Scope } from "@alloy-js/core/stc";
Scope({ value: OutputScope }).children(children)
Props
children | optionalChildren |
value | Scope context interface The scope to use. If not provided, a new scope will be created. |
Overload 2
Create a scope by providing a name and optional metadata.
import { Scope } from "@alloy-js/core";
<Scope kind="string" metadata={Record<string, unknown>} name="string"> {children}</Scope>
import { Scope } from "@alloy-js/core/stc";
Scope({ kind: string, metadata: Record<string, unknown>, name: string,}).children(children)
Props
children | optionalChildren |
kind | optionalstring The kind of scope. This may be used by application code to determine how to handle symbols in this scope. It is not used by the core framework. |
metadata | optionalRecord<string, unknown> Additional metadata for the scope. |
name | optionalstring The name of this scope. |