UNPKG

@angular/core

Version:

Angular - the core framework

1 lines 363 kB
{"version":3,"file":"core.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/authoring/input/input_signal_node.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/authoring/input/input_signal.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/compiler/compiler_facade_interface.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/di/host_attribute_token.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/di/host_tag_name_token.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/authoring/output/output.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/authoring/input/input.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/authoring/queries.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/authoring/model/model_signal.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/authoring/model/model.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/metadata/di.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/version.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/application/application_ngmodule_factory_compiler.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/image_performance_warning.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/platform/platform_destroy_listeners.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/platform/bootstrap.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/platform/platform_ref.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/platform/platform.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/change_detection/scheduling/exhaustive_check_no_changes.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/change_detection/provide_check_no_changes_config.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/util/is_dev_mode.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/linker/ng_module_factory_loader.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/change_detection/change_detector_ref.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/linker/view_ref.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/change_detection/differs/default_iterable_differ.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/change_detection/differs/default_keyvalue_differ.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/change_detection/differs/iterable_differs.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/change_detection/differs/keyvalue_differs.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/change_detection/change_detection.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/platform/platform_core_providers.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/application/application_module.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/application/create_application.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/hydration/event_replay.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/hydration/annotate.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/hydration/api.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/util/coercion.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/profiler.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/internal/get_closest_component_name.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/render3/jit/partial.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/render3/reactivity/after_render_effect.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/render3/component.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/application/application_config.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/application/platform_tokens.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {SIGNAL_NODE, SignalNode, signalSetFn} from '../../../primitives/signals';\n\nexport const REQUIRED_UNSET_VALUE: unique symbol = /* @__PURE__ */ Symbol('InputSignalNode#UNSET');\n\n/**\n * Reactive node type for an input signal. An input signal extends a signal.\n * There are special properties to enable transforms and required inputs.\n */\nexport interface InputSignalNode<T, TransformT> extends SignalNode<T> {\n /**\n * User-configured transform that will run whenever a new value is applied\n * to the input signal node.\n */\n transformFn: ((value: TransformT) => T) | undefined;\n\n /**\n * Applies a new value to the input signal. Expects transforms to be run\n * manually before.\n *\n * This function is called by the framework runtime code whenever a binding\n * changes. The value can in practice be anything at runtime, but for typing\n * purposes we assume it's a valid `T` value. Type-checking will enforce that.\n */\n applyValueToInputSignal<T, TransformT>(node: InputSignalNode<T, TransformT>, value: T): void;\n\n /**\n * A debug name for the input signal. Used in Angular DevTools to identify the signal.\n */\n debugName?: string;\n}\n\n// Note: Using an IIFE here to ensure that the spread assignment is not considered\n// a side-effect, ending up preserving `COMPUTED_NODE` and `REACTIVE_NODE`.\n// TODO: remove when https://github.com/evanw/esbuild/issues/3392 is resolved.\nexport const INPUT_SIGNAL_NODE: InputSignalNode<unknown, unknown> = /* @__PURE__ */ (() => {\n return {\n ...SIGNAL_NODE,\n transformFn: undefined,\n\n applyValueToInputSignal<T, TransformT>(node: InputSignalNode<T, TransformT>, value: T) {\n signalSetFn(node, value);\n },\n };\n})();\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {producerAccessed, SIGNAL} from '../../../primitives/signals';\n\nimport {RuntimeError, RuntimeErrorCode} from '../../errors';\nimport {Signal} from '../../render3/reactivity/api';\n\nimport {INPUT_SIGNAL_NODE, InputSignalNode, REQUIRED_UNSET_VALUE} from './input_signal_node';\n\n/**\n * @publicAPI\n *\n * Options for signal inputs.\n */\nexport interface InputOptions<T, TransformT> {\n /** Optional public name for the input. By default, the class field name is used. */\n alias?: string;\n /**\n * Optional transform that runs whenever a new value is bound. Can be used to\n * transform the input value before the input is updated.\n *\n * The transform function can widen the type of the input. For example, consider\n * an input for `disabled`. In practice, as the component author, you want to only\n * deal with a boolean, but users may want to bind a string if they just use the\n * attribute form to bind to the input via `<my-dir input>`. A transform can then\n * handle such string values and convert them to `boolean`. See: {@link booleanAttribute}.\n */\n transform?: (v: TransformT) => T;\n\n /**\n * A debug name for the input signal. Used in Angular DevTools to identify the signal.\n */\n debugName?: string;\n}\n\n/**\n * Signal input options without the transform option.\n *\n * @publicApi 19.0\n */\nexport type InputOptionsWithoutTransform<T> =\n // Note: We still keep a notion of `transform` for auto-completion.\n Omit<InputOptions<T, T>, 'transform'> & {transform?: undefined};\n/**\n * Signal input options with the transform option required.\n *\n * @publicAPI\n */\nexport type InputOptionsWithTransform<T, TransformT> = Required<\n Pick<InputOptions<T, TransformT>, 'transform'>\n> &\n InputOptions<T, TransformT>;\n\nexport const ɵINPUT_SIGNAL_BRAND_READ_TYPE: unique symbol = /* @__PURE__ */ Symbol();\nexport const ɵINPUT_SIGNAL_BRAND_WRITE_TYPE: unique symbol = /* @__PURE__ */ Symbol();\n\n/**\n * `InputSignalWithTransform` represents a special `Signal` for a\n * directive/component input with a `transform` function.\n *\n * Signal inputs with transforms capture an extra generic for their transform write\n * type. Transforms can expand the accepted bound values for an input while ensuring\n * value retrievals of the signal input are still matching the generic input type.\n *\n * ```ts\n * class MyDir {\n * disabled = input(false, {\n * transform: (v: string|boolean) => convertToBoolean(v),\n * }); // InputSignalWithTransform<boolean, string|boolean>\n *\n * click() {\n * this.disabled() // always returns a `boolean`.\n * }\n * }\n * ```\n *\n * @see {@link InputSignal} for additional information.\n *\n * @publicApi 19.0\n */\nexport interface InputSignalWithTransform<T, TransformT> extends Signal<T> {\n [SIGNAL]: InputSignalNode<T, TransformT>;\n [ɵINPUT_SIGNAL_BRAND_READ_TYPE]: T;\n [ɵINPUT_SIGNAL_BRAND_WRITE_TYPE]: TransformT;\n}\n\n/**\n * `InputSignal` represents a special `Signal` for a directive/component input.\n *\n * An input signal is similar to a non-writable signal except that it also\n * carries additional type-information for transforms, and that Angular internally\n * updates the signal whenever a new value is bound.\n *\n * @see {@link InputOptionsWithTransform} for inputs with transforms.\n *\n * @publicApi 19.0\n */\nexport interface InputSignal<T> extends InputSignalWithTransform<T, T> {}\n\n/**\n * Creates an input signal.\n *\n * @param initialValue The initial value.\n * Can be set to {@link REQUIRED_UNSET_VALUE} for required inputs.\n * @param options Additional options for the input. e.g. a transform, or an alias.\n */\nexport function createInputSignal<T, TransformT>(\n initialValue: T,\n options?: InputOptions<T, TransformT>,\n): InputSignalWithTransform<T, TransformT> {\n const node: InputSignalNode<T, TransformT> = Object.create(INPUT_SIGNAL_NODE);\n\n node.value = initialValue;\n\n // Perf note: Always set `transformFn` here to ensure that `node` always\n // has the same v8 class shape, allowing monomorphic reads on input signals.\n node.transformFn = options?.transform;\n\n function inputValueFn() {\n // Record that someone looked at this signal.\n producerAccessed(node);\n\n if (node.value === REQUIRED_UNSET_VALUE) {\n let message: string | null = null;\n if (ngDevMode) {\n const name = options?.debugName ?? options?.alias;\n message = `Input${name ? ` \"${name}\"` : ''} is required but no value is available yet.`;\n }\n throw new RuntimeError(RuntimeErrorCode.REQUIRED_INPUT_NO_VALUE, message);\n }\n\n return node.value;\n }\n\n (inputValueFn as any)[SIGNAL] = node;\n\n if (ngDevMode) {\n inputValueFn.toString = () => `[Input Signal: ${inputValueFn()}]`;\n node.debugName = options?.debugName;\n }\n\n return inputValueFn as InputSignalWithTransform<T, TransformT>;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/**\n * A set of interfaces which are shared between `@angular/core` and `@angular/compiler` to allow\n * for late binding of `@angular/compiler` for JIT purposes.\n *\n * This file has two copies. Please ensure that they are in sync:\n * - packages/compiler/src/compiler_facade_interface.ts (main)\n * - packages/core/src/compiler/compiler_facade_interface.ts (replica)\n *\n * Please ensure that the two files are in sync using this command:\n * ```shell\n * cp packages/compiler/src/compiler_facade_interface.ts \\\n * packages/core/src/compiler/compiler_facade_interface.ts\n * ```\n */\n\nexport interface ExportedCompilerFacade {\n ɵcompilerFacade: CompilerFacade;\n}\n\nexport interface CompilerFacade {\n compilePipe(\n angularCoreEnv: CoreEnvironment,\n sourceMapUrl: string,\n meta: R3PipeMetadataFacade,\n ): any;\n compilePipeDeclaration(\n angularCoreEnv: CoreEnvironment,\n sourceMapUrl: string,\n declaration: R3DeclarePipeFacade,\n ): any;\n compileInjectable(\n angularCoreEnv: CoreEnvironment,\n sourceMapUrl: string,\n meta: R3InjectableMetadataFacade,\n ): any;\n compileInjectableDeclaration(\n angularCoreEnv: CoreEnvironment,\n sourceMapUrl: string,\n meta: R3DeclareInjectableFacade,\n ): any;\n compileInjector(\n angularCoreEnv: CoreEnvironment,\n sourceMapUrl: string,\n meta: R3InjectorMetadataFacade,\n ): any;\n compileInjectorDeclaration(\n angularCoreEnv: CoreEnvironment,\n sourceMapUrl: string,\n declaration: R3DeclareInjectorFacade,\n ): any;\n compileNgModule(\n angularCoreEnv: CoreEnvironment,\n sourceMapUrl: string,\n meta: R3NgModuleMetadataFacade,\n ): any;\n compileNgModuleDeclaration(\n angularCoreEnv: CoreEnvironment,\n sourceMapUrl: string,\n declaration: R3DeclareNgModuleFacade,\n ): any;\n compileDirective(\n angularCoreEnv: CoreEnvironment,\n sourceMapUrl: string,\n meta: R3DirectiveMetadataFacade,\n ): any;\n compileDirectiveDeclaration(\n angularCoreEnv: CoreEnvironment,\n sourceMapUrl: string,\n declaration: R3DeclareDirectiveFacade,\n ): any;\n compileComponent(\n angularCoreEnv: CoreEnvironment,\n sourceMapUrl: string,\n meta: R3ComponentMetadataFacade,\n ): any;\n compileComponentDeclaration(\n angularCoreEnv: CoreEnvironment,\n sourceMapUrl: string,\n declaration: R3DeclareComponentFacade,\n ): any;\n compileFactory(\n angularCoreEnv: CoreEnvironment,\n sourceMapUrl: string,\n meta: R3FactoryDefMetadataFacade,\n ): any;\n compileFactoryDeclaration(\n angularCoreEnv: CoreEnvironment,\n sourceMapUrl: string,\n meta: R3DeclareFactoryFacade,\n ): any;\n\n createParseSourceSpan(kind: string, typeName: string, sourceUrl: string): ParseSourceSpan;\n\n FactoryTarget: typeof FactoryTarget;\n // Note that we do not use `{new(): ResourceLoader}` here because\n // the resource loader class is abstract and not constructable.\n ResourceLoader: Function & {prototype: ResourceLoader};\n}\n\nexport interface CoreEnvironment {\n [name: string]: unknown;\n}\n\nexport type ResourceLoader = {\n get(url: string): Promise<string> | string;\n};\n\nexport type Provider = unknown;\nexport type Type = Function;\nexport type OpaqueValue = unknown;\n\nexport enum FactoryTarget {\n Directive = 0,\n Component = 1,\n Injectable = 2,\n Pipe = 3,\n NgModule = 4,\n}\n\nexport interface R3DependencyMetadataFacade {\n token: OpaqueValue;\n attribute: string | null;\n host: boolean;\n optional: boolean;\n self: boolean;\n skipSelf: boolean;\n}\n\nexport interface R3DeclareDependencyMetadataFacade {\n token: OpaqueValue;\n attribute?: boolean;\n host?: boolean;\n optional?: boolean;\n self?: boolean;\n skipSelf?: boolean;\n}\n\nexport interface R3PipeMetadataFacade {\n name: string;\n type: Type;\n pipeName: string;\n pure: boolean;\n isStandalone: boolean;\n}\n\nexport interface R3InjectableMetadataFacade {\n name: string;\n type: Type;\n typeArgumentCount: number;\n providedIn?: Type | 'root' | 'platform' | 'any' | null;\n useClass?: OpaqueValue;\n useFactory?: OpaqueValue;\n useExisting?: OpaqueValue;\n useValue?: OpaqueValue;\n deps?: R3DependencyMetadataFacade[];\n}\n\nexport interface R3NgModuleMetadataFacade {\n type: Type;\n bootstrap: Function[];\n declarations: Function[];\n imports: Function[];\n exports: Function[];\n schemas: {name: string}[] | null;\n id: string | null;\n}\n\nexport interface R3InjectorMetadataFacade {\n name: string;\n type: Type;\n providers: Provider[];\n imports: OpaqueValue[];\n}\n\nexport interface R3HostDirectiveMetadataFacade {\n directive: Type;\n inputs?: string[];\n outputs?: string[];\n}\n\nexport interface R3DirectiveMetadataFacade {\n name: string;\n type: Type;\n typeSourceSpan: ParseSourceSpan;\n selector: string | null;\n queries: R3QueryMetadataFacade[];\n host: {[key: string]: string};\n propMetadata: {[key: string]: OpaqueValue[]};\n lifecycle: {usesOnChanges: boolean};\n inputs: (string | {name: string; alias?: string; required?: boolean})[];\n outputs: string[];\n usesInheritance: boolean;\n exportAs: string[] | null;\n providers: Provider[] | null;\n viewQueries: R3QueryMetadataFacade[];\n isStandalone: boolean;\n isSignal: boolean;\n hostDirectives: R3HostDirectiveMetadataFacade[] | null;\n}\n\nexport interface R3ComponentMetadataFacade extends R3DirectiveMetadataFacade {\n template: string;\n preserveWhitespaces: boolean;\n animations: OpaqueValue[] | undefined;\n declarations: R3TemplateDependencyFacade[];\n styles: string[];\n encapsulation: ViewEncapsulation;\n viewProviders: Provider[] | null;\n interpolation?: [string, string];\n changeDetection?: ChangeDetectionStrategy;\n}\n\n// TODO(legacy-partial-output-inputs): Remove in v18.\n// https://github.com/angular/angular/blob/d4b423690210872b5c32a322a6090beda30b05a3/packages/core/src/compiler/compiler_facade_interface.ts#L197-L199\nexport type LegacyInputPartialMapping =\n | string\n | [bindingPropertyName: string, classPropertyName: string, transformFunction?: Function];\n\nexport interface R3DeclareDirectiveFacade {\n selector?: string;\n type: Type;\n version: string;\n inputs?: {\n [fieldName: string]:\n | {\n classPropertyName: string;\n publicName: string;\n isSignal: boolean;\n isRequired: boolean;\n transformFunction: Function | null;\n }\n | LegacyInputPartialMapping;\n };\n outputs?: {[classPropertyName: string]: string};\n host?: {\n attributes?: {[key: string]: OpaqueValue};\n listeners?: {[key: string]: string};\n properties?: {[key: string]: string};\n classAttribute?: string;\n styleAttribute?: string;\n };\n queries?: R3DeclareQueryMetadataFacade[];\n viewQueries?: R3DeclareQueryMetadataFacade[];\n providers?: OpaqueValue;\n exportAs?: string[];\n usesInheritance?: boolean;\n usesOnChanges?: boolean;\n isStandalone?: boolean;\n hostDirectives?: R3HostDirectiveMetadataFacade[] | null;\n isSignal?: boolean;\n}\n\nexport interface R3DeclareComponentFacade extends R3DeclareDirectiveFacade {\n template: string;\n isInline?: boolean;\n styles?: string[];\n\n // Post-standalone libraries use a unified dependencies field.\n dependencies?: R3DeclareTemplateDependencyFacade[];\n\n // Pre-standalone libraries have separate component/directive/pipe fields:\n components?: R3DeclareDirectiveDependencyFacade[];\n directives?: R3DeclareDirectiveDependencyFacade[];\n pipes?: {[pipeName: string]: OpaqueValue | (() => OpaqueValue)};\n\n deferBlockDependencies?: (() => Promise<Type> | null)[];\n viewProviders?: OpaqueValue;\n animations?: OpaqueValue;\n changeDetection?: ChangeDetectionStrategy;\n encapsulation?: ViewEncapsulation;\n interpolation?: [string, string];\n preserveWhitespaces?: boolean;\n}\n\nexport type R3DeclareTemplateDependencyFacade = {\n kind: string;\n} & (\n | R3DeclareDirectiveDependencyFacade\n | R3DeclarePipeDependencyFacade\n | R3DeclareNgModuleDependencyFacade\n);\n\nexport interface R3DeclareDirectiveDependencyFacade {\n kind?: 'directive' | 'component';\n selector: string;\n type: OpaqueValue | (() => OpaqueValue);\n inputs?: string[];\n outputs?: string[];\n exportAs?: string[];\n}\n\nexport interface R3DeclarePipeDependencyFacade {\n kind?: 'pipe';\n name: string;\n type: OpaqueValue | (() => OpaqueValue);\n}\n\nexport interface R3DeclareNgModuleDependencyFacade {\n kind: 'ngmodule';\n type: OpaqueValue | (() => OpaqueValue);\n}\n\nexport enum R3TemplateDependencyKind {\n Directive = 0,\n Pipe = 1,\n NgModule = 2,\n}\n\nexport interface R3TemplateDependencyFacade {\n kind: R3TemplateDependencyKind;\n type: OpaqueValue | (() => OpaqueValue);\n}\nexport interface R3FactoryDefMetadataFacade {\n name: string;\n type: Type;\n typeArgumentCount: number;\n deps: R3DependencyMetadataFacade[] | null;\n target: FactoryTarget;\n}\n\nexport interface R3DeclareFactoryFacade {\n type: Type;\n deps: R3DeclareDependencyMetadataFacade[] | 'invalid' | null;\n target: FactoryTarget;\n}\n\nexport interface R3DeclareInjectableFacade {\n type: Type;\n providedIn?: Type | 'root' | 'platform' | 'any' | null;\n useClass?: OpaqueValue;\n useFactory?: OpaqueValue;\n useExisting?: OpaqueValue;\n useValue?: OpaqueValue;\n deps?: R3DeclareDependencyMetadataFacade[];\n}\n\nexport enum ViewEncapsulation {\n Emulated = 0,\n // Historically the 1 value was for `Native` encapsulation which has been removed as of v11.\n None = 2,\n ShadowDom = 3,\n}\n\nexport type ChangeDetectionStrategy = number;\n\nexport interface R3QueryMetadataFacade {\n propertyName: string;\n first: boolean;\n predicate: OpaqueValue | string[];\n descendants: boolean;\n emitDistinctChangesOnly: boolean;\n read: OpaqueValue | null;\n static: boolean;\n isSignal: boolean;\n}\n\nexport interface R3DeclareQueryMetadataFacade {\n propertyName: string;\n first?: boolean;\n predicate: OpaqueValue | string[];\n descendants?: boolean;\n read?: OpaqueValue;\n static?: boolean;\n emitDistinctChangesOnly?: boolean;\n isSignal?: boolean;\n}\n\nexport interface R3DeclareInjectorFacade {\n type: Type;\n imports?: OpaqueValue[];\n providers?: OpaqueValue[];\n}\n\nexport interface R3DeclareNgModuleFacade {\n type: Type;\n bootstrap?: OpaqueValue[] | (() => OpaqueValue[]);\n declarations?: OpaqueValue[] | (() => OpaqueValue[]);\n imports?: OpaqueValue[] | (() => OpaqueValue[]);\n exports?: OpaqueValue[] | (() => OpaqueValue[]);\n schemas?: OpaqueValue[];\n id?: OpaqueValue;\n}\n\nexport interface R3DeclarePipeFacade {\n type: Type;\n name: string;\n version: string;\n pure?: boolean;\n isStandalone?: boolean;\n}\n\nexport interface ParseSourceSpan {\n start: any;\n end: any;\n details: any;\n fullStart: any;\n}\n","/*!\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ɵɵinjectAttribute} from '../render3/instructions/di_attr';\n\n/**\n * Creates a token that can be used to inject static attributes of the host node.\n *\n * @usageNotes\n * ### Injecting an attribute that is known to exist\n * ```ts\n * @Directive()\n * class MyDir {\n * attr: string = inject(new HostAttributeToken('some-attr'));\n * }\n * ```\n *\n * ### Optionally injecting an attribute\n * ```ts\n * @Directive()\n * class MyDir {\n * attr: string | null = inject(new HostAttributeToken('some-attr'), {optional: true});\n * }\n * ```\n * @publicApi\n */\nexport class HostAttributeToken {\n constructor(private attributeName: string) {}\n\n /** @internal */\n __NG_ELEMENT_ID__ = () => ɵɵinjectAttribute(this.attributeName);\n\n toString(): string {\n return `HostAttributeToken ${this.attributeName}`;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {RuntimeError, RuntimeErrorCode} from '../errors';\nimport {TNode, TNodeType} from '../render3/interfaces/node';\nimport {getCurrentTNode} from '../render3/state';\n\nimport {InjectionToken} from './injection_token';\nimport {InternalInjectFlags} from './interface/injector';\n\n/**\n * A token that can be used to inject the tag name of the host node.\n *\n * @usageNotes\n * ### Injecting a tag name that is known to exist\n * ```ts\n * @Directive()\n * class MyDir {\n * tagName: string = inject(HOST_TAG_NAME);\n * }\n * ```\n *\n * ### Optionally injecting a tag name\n * ```ts\n * @Directive()\n * class MyDir {\n * tagName: string | null = inject(HOST_TAG_NAME, {optional: true});\n * }\n * ```\n * @publicApi\n */\nexport const HOST_TAG_NAME = new InjectionToken<string>(ngDevMode ? 'HOST_TAG_NAME' : '');\n\n// HOST_TAG_NAME should be resolved at the current node, similar to e.g. ElementRef,\n// so we manually specify __NG_ELEMENT_ID__ here, instead of using a factory.\n// tslint:disable-next-line:no-toplevel-property-access\n(HOST_TAG_NAME as any).__NG_ELEMENT_ID__ = (flags: InternalInjectFlags) => {\n const tNode = getCurrentTNode();\n if (tNode === null) {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_INJECTION_TOKEN,\n ngDevMode &&\n 'HOST_TAG_NAME can only be injected in directives and components ' +\n 'during construction time (in a class constructor or as a class field initializer)',\n );\n }\n if (tNode.type & TNodeType.Element) {\n return tNode.value;\n }\n if (flags & InternalInjectFlags.Optional) {\n return null;\n }\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_INJECTION_TOKEN,\n ngDevMode &&\n `HOST_TAG_NAME was used on ${getDevModeNodeName(\n tNode,\n )} which doesn't have an underlying element in the DOM. ` +\n `This is invalid, and so the dependency should be marked as optional.`,\n );\n};\n\nfunction getDevModeNodeName(tNode: TNode) {\n if (tNode.type & TNodeType.ElementContainer) {\n return 'an <ng-container>';\n } else if (tNode.type & TNodeType.Container) {\n return 'an <ng-template>';\n } else if (tNode.type & TNodeType.LetDeclaration) {\n return 'an @let declaration';\n } else {\n return 'a node';\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {assertInInjectionContext} from '../../di';\n\nimport {OutputEmitterRef} from './output_emitter_ref';\n\n/**\n * Options for declaring an output.\n *\n * @publicApi 19.0\n */\nexport interface OutputOptions {\n alias?: string;\n}\n\n/**\n * The `output` function allows declaration of Angular outputs in\n * directives and components.\n *\n * You can use outputs to emit values to parent directives and component.\n * Parents can subscribe to changes via:\n *\n * - template event bindings. For example, `(myOutput)=\"doSomething($event)\"`\n * - programmatic subscription by using `OutputRef#subscribe`.\n *\n * @usageNotes\n *\n * To use `output()`, import the function from `@angular/core`.\n *\n * ```ts\n * import {output} from '@angular/core';\n * ```\n *\n * Inside your component, introduce a new class member and initialize\n * it with a call to `output`.\n *\n * ```ts\n * @Directive({\n * ...\n * })\n * export class MyDir {\n * nameChange = output<string>(); // OutputEmitterRef<string>\n * onClick = output(); // OutputEmitterRef<void>\n * }\n * ```\n *\n * You can emit values to consumers of your directive, by using\n * the `emit` method from `OutputEmitterRef`.\n *\n * ```ts\n * updateName(newName: string): void {\n * this.nameChange.emit(newName);\n * }\n * ```\n * @initializerApiFunction {\"showTypesInSignaturePreview\": true}\n * @publicApi 19.0\n */\nexport function output<T = void>(opts?: OutputOptions): OutputEmitterRef<T> {\n ngDevMode && assertInInjectionContext(output);\n return new OutputEmitterRef<T>();\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {assertInInjectionContext} from '../../di';\n\nimport {\n createInputSignal,\n InputOptions,\n InputOptionsWithoutTransform,\n InputOptionsWithTransform,\n InputSignal,\n InputSignalWithTransform,\n} from './input_signal';\nimport {REQUIRED_UNSET_VALUE} from './input_signal_node';\n\nexport function inputFunction<ReadT, WriteT>(\n initialValue?: ReadT,\n opts?: InputOptions<ReadT, WriteT>,\n): InputSignalWithTransform<ReadT | undefined, WriteT> {\n ngDevMode && assertInInjectionContext(input);\n return createInputSignal(initialValue, opts);\n}\n\nexport function inputRequiredFunction<ReadT, WriteT = ReadT>(\n opts?: InputOptions<ReadT, WriteT>,\n): InputSignalWithTransform<ReadT, WriteT> {\n ngDevMode && assertInInjectionContext(input);\n return createInputSignal(REQUIRED_UNSET_VALUE as never, opts);\n}\n\n/**\n * The `input` function allows declaration of inputs in directives and\n * components.\n *\n * The function exposes an API for also declaring required inputs via the\n * `input.required` function.\n *\n * @publicAPI\n * @docsPrivate Ignored because `input` is the canonical API entry.\n */\nexport interface InputFunction {\n /**\n * Initializes an input of type `T` with an initial value of `undefined`.\n * Angular will implicitly use `undefined` as initial value.\n */\n <T>(): InputSignal<T | undefined>;\n /** Declares an input of type `T` with an explicit initial value. */\n <T>(initialValue: T, opts?: InputOptionsWithoutTransform<T>): InputSignal<T>;\n /** Declares an input of type `T|undefined` without an initial value, but with input options */\n <T>(initialValue: undefined, opts: InputOptionsWithoutTransform<T>): InputSignal<T | undefined>;\n /**\n * Declares an input of type `T` with an initial value and a transform\n * function.\n *\n * The input accepts values of type `TransformT` and the given\n * transform function will transform the value to type `T`.\n */\n <T, TransformT>(\n initialValue: T,\n opts: InputOptionsWithTransform<T, TransformT>,\n ): InputSignalWithTransform<T, TransformT>;\n /**\n * Declares an input of type `T|undefined` without an initial value and with a transform\n * function.\n *\n * The input accepts values of type `TransformT` and the given\n * transform function will transform the value to type `T|undefined`.\n */ <T, TransformT>(\n initialValue: undefined,\n opts: InputOptionsWithTransform<T | undefined, TransformT>,\n ): InputSignalWithTransform<T | undefined, TransformT>;\n\n /**\n * Initializes a required input.\n *\n * Consumers of your directive/component need to bind to this\n * input. If unset, a compile time error will be reported.\n *\n * @publicAPI\n */\n required: {\n /** Declares a required input of type `T`. */\n <T>(opts?: InputOptionsWithoutTransform<T>): InputSignal<T>;\n /**\n * Declares a required input of type `T` with a transform function.\n *\n * The input accepts values of type `TransformT` and the given\n * transform function will transform the value to type `T`.\n */\n <T, TransformT>(\n opts: InputOptionsWithTransform<T, TransformT>,\n ): InputSignalWithTransform<T, TransformT>;\n };\n}\n\n/**\n * The `input` function allows declaration of Angular inputs in directives\n * and components.\n *\n * There are two variants of inputs that can be declared:\n *\n * 1. **Optional inputs** with an initial value.\n * 2. **Required inputs** that consumers need to set.\n *\n * By default, the `input` function will declare optional inputs that\n * always have an initial value. Required inputs can be declared\n * using the `input.required()` function.\n *\n * Inputs are signals. The values of an input are exposed as a `Signal`.\n * The signal always holds the latest value of the input that is bound\n * from the parent.\n *\n * @usageNotes\n * To use signal-based inputs, import `input` from `@angular/core`.\n *\n * ```ts\n * import {input} from '@angular/core`;\n * ```\n *\n * Inside your component, introduce a new class member and initialize\n * it with a call to `input` or `input.required`.\n *\n * ```ts\n * @Component({\n * ...\n * })\n * export class UserProfileComponent {\n * firstName = input<string>(); // Signal<string|undefined>\n * lastName = input.required<string>(); // Signal<string>\n * age = input(0) // Signal<number>\n * }\n * ```\n *\n * Inside your component template, you can display values of the inputs\n * by calling the signal.\n *\n * ```html\n * <span>{{firstName()}}</span>\n * ```\n *\n * @publicAPI\n * @initializerApiFunction\n */\nexport const input: InputFunction = (() => {\n // Note: This may be considered a side-effect, but nothing will depend on\n // this assignment, unless this `input` constant export is accessed. It's a\n // self-contained side effect that is local to the user facing`input` export.\n (inputFunction as any).required = inputRequiredFunction;\n return inputFunction as typeof inputFunction & {required: typeof inputRequiredFunction};\n})();\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {assertInInjectionContext} from '../di';\nimport {ProviderToken} from '../di/provider_token';\nimport {\n createMultiResultQuerySignalFn,\n createSingleResultOptionalQuerySignalFn,\n createSingleResultRequiredQuerySignalFn,\n} from '../render3/queries/query_reactive';\nimport {Signal} from '../render3/reactivity/api';\n\nfunction viewChildFn<LocatorT, ReadT>(\n locator: ProviderToken<LocatorT> | string,\n opts?: {read?: ProviderToken<ReadT>; debugName?: string},\n): Signal<ReadT | undefined> {\n ngDevMode && assertInInjectionContext(viewChild);\n return createSingleResultOptionalQuerySignalFn<ReadT>(opts);\n}\n\nfunction viewChildRequiredFn<LocatorT, ReadT>(\n locator: ProviderToken<LocatorT> | string,\n opts?: {read?: ProviderToken<ReadT>; debugName?: string},\n): Signal<ReadT> {\n ngDevMode && assertInInjectionContext(viewChild);\n return createSingleResultRequiredQuerySignalFn<ReadT>(opts);\n}\n\n/**\n * Type of the `viewChild` function. The viewChild function creates a singular view query.\n *\n * It is a special function that also provides access to required query results via the `.required`\n * property.\n *\n * @publicApi\n * @docsPrivate Ignored because `viewChild` is the canonical API entry.\n */\nexport interface ViewChildFunction {\n /**\n * Initializes a view child query. Consider using `viewChild.required` for queries that should\n * always match.\n *\n * @publicAPI\n */\n\n <LocatorT, ReadT>(\n locator: ProviderToken<LocatorT> | string,\n opts: {\n read: ProviderToken<ReadT>;\n debugName?: string;\n },\n ): Signal<ReadT | undefined>;\n\n <LocatorT>(\n locator: ProviderToken<LocatorT> | string,\n opts?: {\n debugName?: string;\n },\n ): Signal<LocatorT | undefined>;\n\n /**\n * Initializes a view child query that is expected to always match an element.\n *\n * @publicAPI\n */\n required: {\n <LocatorT>(\n locator: ProviderToken<LocatorT> | string,\n opts?: {\n debugName?: string;\n },\n ): Signal<LocatorT>;\n\n <LocatorT, ReadT>(\n locator: ProviderToken<LocatorT> | string,\n opts: {\n read: ProviderToken<ReadT>;\n debugName?: string;\n },\n ): Signal<ReadT>;\n };\n}\n\n/**\n * Initializes a view child query.\n *\n * Consider using `viewChild.required` for queries that should always match.\n *\n * @usageNotes\n * Create a child query in your component by declaring a\n * class field and initializing it with the `viewChild()` function.\n *\n * ```angular-ts\n * @Component({template: '<div #el></div><my-component #cmp />'})\n * export class TestComponent {\n * divEl = viewChild<ElementRef>('el'); // Signal<ElementRef|undefined>\n * divElRequired = viewChild.required<ElementRef>('el'); // Signal<ElementRef>\n * cmp = viewChild(MyComponent); // Signal<MyComponent|undefined>\n * cmpRequired = viewChild.required(MyComponent); // Signal<MyComponent>\n * }\n * ```\n *\n * @publicApi 19.0\n * @initializerApiFunction\n */\nexport const viewChild: ViewChildFunction = (() => {\n // Note: This may be considered a side-effect, but nothing will depend on\n // this assignment, unless this `viewChild` constant export is accessed. It's a\n // self-contained side effect that is local to the user facing `viewChild` export.\n (viewChildFn as any).required = viewChildRequiredFn;\n return viewChildFn as typeof viewChildFn & {required: typeof viewChildRequiredFn};\n})();\n\nexport function viewChildren<LocatorT>(\n locator: ProviderToken<LocatorT> | string,\n opts?: {debugName?: string},\n): Signal<ReadonlyArray<LocatorT>>;\nexport function viewChildren<LocatorT, ReadT>(\n locator: ProviderToken<LocatorT> | string,\n opts: {\n read: ProviderToken<ReadT>;\n debugName?: string;\n },\n): Signal<ReadonlyArray<ReadT>>;\n\n/**\n * Initializes a view children query.\n *\n * Query results are represented as a signal of a read-only collection containing all matched\n * elements.\n *\n * @usageNotes\n * Create a children query in your component by declaring a\n * class field and initializing it with the `viewChildren()` function.\n *\n * ```ts\n * @Component({...})\n * export class TestComponent {\n * divEls = viewChildren<ElementRef>('el'); // Signal<ReadonlyArray<ElementRef>>\n * }\n * ```\n *\n * @initializerApiFunction\n * @publicApi 19.0\n */\nexport function viewChildren<LocatorT, ReadT>(\n locator: ProviderToken<LocatorT> | string,\n opts?: {\n read?: ProviderToken<ReadT>;\n debugName?: string;\n },\n): Signal<ReadonlyArray<ReadT>> {\n ngDevMode && assertInInjectionContext(viewChildren);\n return createMultiResultQuerySignalFn<ReadT>(opts);\n}\n\nexport function contentChildFn<LocatorT, ReadT>(\n locator: ProviderToken<LocatorT> | string,\n opts?: {\n descendants?: boolean;\n read?: ProviderToken<ReadT>;\n debugName?: string;\n },\n): Signal<ReadT | undefined> {\n ngDevMode && assertInInjectionContext(contentChild);\n return createSingleResultOptionalQuerySignalFn<ReadT>(opts);\n}\n\nfunction contentChildRequiredFn<LocatorT, ReadT>(\n locator: ProviderToken<LocatorT> | string,\n opts?: {\n descendants?: boolean;\n read?: ProviderToken<ReadT>;\n debugName?: string;\n },\n): Signal<ReadT> {\n ngDevMode && assertInInjectionContext(contentChildren);\n return createSingleResultRequiredQuerySignalFn<ReadT>(opts);\n}\n\n/**\n * Type of the `contentChild` function.\n *\n * The contentChild function creates a singular content query. It is a special function that also\n * provides access to required query results via the `.required` property.\n *\n * @publicApi 19.0\n * @docsPrivate Ignored because `contentChild` is the canonical API entry.\n */\nexport interface ContentChildFunction {\n /**\n * Initializes a content child query.\n *\n * Consider using `contentChild.required` for queries that should always match.\n * @publicAPI\n */\n <LocatorT>(\n locator: ProviderToken<LocatorT> | string,\n opts?: {\n descendants?: boolean;\n read?: undefined;\n debugName?: string;\n },\n ): Signal<LocatorT | undefined>;\n\n <LocatorT, ReadT>(\n locator: ProviderToken<LocatorT> | string,\n opts: {\n descendants?: boolean;\n read: ProviderToken<ReadT>;\n debugName?: string;\n },\n ): Signal<ReadT | undefined>;\n\n /**\n * Initializes a content child query that is always expected to match.\n */\n required: {\n <LocatorT>(\n locator: ProviderToken<LocatorT> | string,\n opts?: {\n descendants?: boolean;\n read?: undefined;\n debugName?: string;\n },\n ): Signal<LocatorT>;\n\n <LocatorT, ReadT>(\n locator: ProviderToken<LocatorT> | string,\n opts: {\n descendants?: boolean;\n read: ProviderToken<ReadT>;\n debugName?: string;\n },\n ): Signal<ReadT>;\n };\n}\n\n/**\n * Initializes a content child query. Consider using `contentChild.required` for queries that should\n * always match.\n *\n * @usageNotes\n * Create a child query in your component by declaring a\n * class field and initializing it with the `contentChild()` function.\n *\n * ```ts\n * @Component({...})\n * export class TestComponent {\n * headerEl = contentChild<ElementRef>('h'); // Signal<ElementRef|undefined>\n * headerElElRequired = contentChild.required<ElementRef>('h'); // Signal<ElementRef>\n * header = contentChild(MyHeader); // Signal<MyHeader|undefined>\n * headerRequired = contentChild.required(MyHeader); // Signal<MyHeader>\n * }\n * ```\n *\n * Note: By default `descendants` is `true` which means the query will traverse all descendants in the same template.\n *\n * @initializerApiFunction\n * @publicApi 19.0\n */\nexport const contentChild: ContentChildFunction = (() => {\n // Note: This may be considered a side-effect, but nothing will depend on\n // this assignment, unless this `viewChild` constant export is accessed. It's a\n // self-contained side effect that is local to the user facing `viewChild` export.\n (contentChildFn as any).required = contentChildRequiredFn;\n return contentChildFn as typeof contentChildFn & {required: typeof contentChildRequiredFn};\n})();\n\nexport function contentChildren<LocatorT>(\n locator: ProviderToken<LocatorT> | string,\n opts?: {\n descendants?: boolean;\n read?: undefined;\n debugName?: string;\n },\n): Signal<ReadonlyArray<LocatorT>>;\nexport function contentChildren<LocatorT, ReadT>(\n locator: ProviderToken<LocatorT> | string,\n opts: {\n descendants?: boolean;\n read: ProviderToken<ReadT>;\n debugName?: string;\n },\n): Signal<ReadonlyArray<ReadT>>;\n\n/**\n * Initializes a content children query.\n *\n * Query results are represented as a signal of a read-only collection containing all matched\n * elements.\n *\n * @usageNotes\n * Create a children query in your component by declaring a\n * class field and initializing it with the `contentChildren()` function.\n *\n * ```ts\n * @Component({...})\n * export class TestComponent {\n * headerEl = contentChildren<ElementRef>('h'); // Signal<ReadonlyArray<ElementRef>>\n * }\n * ```\n *\n * Note: By default `descendants` is `false` which means the query will not traverse all descendants in the same template.\n *\n * @initializerApiFunction\n * @publicApi 19.0\n */\nexport function contentChildren<LocatorT, ReadT>(\n locator: ProviderToken<LocatorT> | string,\n opts?: {\n descendants?: boolean;\n read?: ProviderToken<ReadT>;\n debugName?: string;\n },\n): Signal<ReadonlyArray<ReadT>> {\n return createMultiResultQuerySignalFn<ReadT>(opts);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {producerAccessed, SIGNAL, signalSetFn} from '../../../primitives/signals';\n\nimport {RuntimeError, RuntimeErrorCode} from '../../errors';\nimport {Signal} from '../../render3/reactivity/api';\nimport {\n signalAsReadonlyFn,\n WritableSignal,\n ɵWRITABLE_SIGNAL,\n} from '../../render3/reactivity/signal';\nimport {\n InputSignal,\n ɵINPUT_SIGNAL_BRAND_READ_TYPE,\n ɵINPUT_SIGNAL_BRAND_WRITE_TYPE,\n} from '../input/input_signal';\nimport {INPUT_SIGNAL_NODE, InputSignalNode, REQUIRED_UNSET_VALUE} from '../input/input_signal_node';\nimport {OutputEmitterRef} from '../output/output_emitter_ref';\nimport {OutputRef} from '../output/output_ref';\n\n/**\n * @publicAPI\n *\n * Options for model signals.\n */\nexport interface ModelOptions {\n /**\n * Optional public name of the input side of the model. The output side will have the same\n * name as the input, but suffixed with `Change`. By default, the class field name is used.\n */\n alias?: string;\n\n /**\n * A debug name for the model signal. Used in Angular DevTools to identify the signal.\n */\n debugName?: string;\n}\n\n/**\n * `ModelSignal` represents a special `Signal` for a directive/component model field.\n *\n * A model signal is a writeable signal that can be exposed as an output.\n * Whenever its value is updated, it emits to the output.\n *\n * @publicAPI\n */\nexport interface ModelSignal<T> extends WritableSignal<T>, InputSignal<T>, OutputRef<T> {\n [SIGNAL]: InputSignalNode<T, T>;\n}\n\n/**\n * Creates a model signal.\n *\n * @param initialValue The initial value.\n * Can be set to {@link REQUIRED_UNSET_VALUE} for required model signals.\n * @param options Additional options for the model.\n */\nexport function createModelSignal<T>(initialValue: T, opts?: ModelOptions): ModelSignal<T> {\n const node: InputSignalNode<T, T> = Object.create(INPUT_SIGNAL_NODE);\n const emitterRef = new OutputEmitterRef<T>();\n\n node.value = initialValue;\n\n function getter(): T {\n producerAccessed(node);\n assertModelSet(node.value);\n return node.value;\n }\n\n getter[SIGNAL] = node;\n getter.asReadonly = signalAsReadonlyFn.bind(getter as any) as () => Signal<T>;\n\n // TODO: Should we throw an error when updating a destroyed model?\n getter.set = (newValue: T) => {\n if (!node.equal(node.value, newValue)) {\n signalSetFn(node, newValue);\n emitterRef.emit(newValue);\n }\n };\n\n getter.update = (updateFn: (value: T) => T) => {\n assertModelSet(node.value);\n getter.set(updateFn(node.value));\n };\n\n getter.subscribe = emitterRef.subscribe.bind(emitterRef);\n getter.destroyRef = emitterRef.destroyRef;\n\n if (ngDevMode) {\n getter.toString = () => `[Model Signal: ${getter()}]`;\n node.debugName = opts?.debugName;\n }\n\n return getter as typeof getter &\n Pick<\n ModelSignal<T>,\n | typeof ɵINPUT_SIGNAL_BRAND_READ_TYPE\n | typeof ɵINPUT_SIGNAL_BRAND_WRITE_TYPE\n | typeof ɵWRITABLE_SIGNAL\n >;\n}\n\n/** Asserts that a model's value is set. */\nfunction assertModelSet(value: unknown): void {\n if (value === REQUIRED_UNSET_VALUE) {\n throw new RuntimeError(\n RuntimeErrorCode.REQUIRED_MODEL_NO_VALUE,\n ngDevMode && 'Model is required but no value is available yet.',\n );\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {assertInInjectionContext} from '../../di';\nimport {REQUIRED_UNSET_VALUE} from '../input/input_signal_node';\n\nimport {createModelSignal, ModelOptions, ModelSignal} from './model_signal';\n\nexport function modelFunction<T>(\n initialValue?: T,\n opts?: ModelOptions,\n): ModelSignal<T | undefined> {\n ngDevMode && assertInInjectionContext(model);\n\n return createModelSignal(initialValue, opts);\n}\n\nexport function modelRequiredFunction<T>(opts?: ModelOptions): ModelSignal<T> {\n ngDevMode && assertInInjectionContext(model);\n\n return createModelSignal(REQUIRED_UNSET_VALUE as T, opts);\n}\n\n/**\n * `model` declares a writeable signal that is exposed as an input/output pair on the containing\n * directive. The input name is taken either from the class member or from the `alias` option.\n * The output name is generated by taking the input name and appending `Change`.\n *\n * The function exposes an API for also declaring required models via the\n * `model.required` function.\n *\n * @publicAPI\n * @docsPrivate Ignored because `model` is the canonical API entry.\n */\nexport interface ModelFunction {\n /**\n * Initializes a model of type `T` with an initial value of `undefined`.\n * Angular will implicitly use `undefined` as initial value.\n */\n <T>(): ModelSignal<T | undefined>;\n /** Initializes a model of type `T` with the given initial value. */\n <T>(initialValue: T, opts?: ModelOptions): ModelSignal<T>;\n\n required: {\n /**\n * Initializes a required model.\n *\n * Users of your directive/component need to bind to the input side of the model.\n * If unset, a compile time error will be reported.\n */\n <T>(opts?: ModelOptions): ModelSignal<T>;\n };\n}\n\n/**\n * `model` declares a writeable signal that is exposed as an input/output\n * pair on the containing directive.\n *\n * The input name is taken either from the class member or from the `alias` option.\n * The output name is generated by taking the input name and appending `Change`.\n *\n * @usageNotes\n *\n * To use `model()`, import the function from `@angular/core`.\n *\n * ```ts\n * import {model} from '@angular/core`;\n * ```\n *\n * Inside your component, introduce a new class member and initialize\n * it with a call to `model` or `model.required`.\n *\n * ```ts\n * @Directive({\n * ...\n * })\n * export class MyDir {\n * firstName = model<string>(); // ModelSignal<string|undefined>\n * lastName = model.required<string>(); // ModelSignal<string>\n * age = model(0); // ModelSignal<number>\n * }\n * ```\n *\n * Inside your component template