diff --git a/crates/oxc_angular_compiler/src/component/decorator.rs b/crates/oxc_angular_compiler/src/component/decorator.rs index a9ec45c00..0a093e6b6 100644 --- a/crates/oxc_angular_compiler/src/component/decorator.rs +++ b/crates/oxc_angular_compiler/src/component/decorator.rs @@ -18,8 +18,8 @@ use super::metadata::{ }; use super::transform::ImportMap; use crate::directive::{ - StringConsts, extract_host_bindings, extract_host_listeners, extract_input_metadata, - extract_output_metadata, merge_by_class_property, parse_decorator_io, + StringConsts, extract_host_bindings_in, extract_host_listeners_in, extract_input_metadata_in, + extract_output_metadata_in, merge_by_class_property, parse_decorator_io, resolve_member_transforms, }; use crate::output::oxc_converter::convert_oxc_expression; @@ -214,8 +214,8 @@ pub fn extract_component_metadata<'a>( // Extract host bindings and listeners from @HostBinding/@HostListener decorators on class members // These are merged with any host metadata from the @Component({ host: {} }) property - let host_bindings = extract_host_bindings(allocator, class); - let host_listeners = extract_host_listeners(allocator, class); + let host_bindings = extract_host_bindings_in(allocator, class, Some(consts)); + let host_listeners = extract_host_listeners_in(allocator, class, Some(consts)); if !host_bindings.is_empty() || !host_listeners.is_empty() { let host = metadata.host.get_or_insert_with(|| HostMetadata::new(allocator)); @@ -267,14 +267,15 @@ pub fn extract_component_metadata<'a>( let io = parse_decorator_io(allocator, config_obj, class, source_text, consts); metadata.inputs = merge_by_class_property( io.inputs, - extract_input_metadata(allocator, class, source_text), + extract_input_metadata_in(allocator, class, source_text, Some(consts)), |i| i.class_property_name.as_str(), ); resolve_member_transforms(allocator, class, source_text, consts, &mut metadata.inputs); - metadata.outputs = - merge_by_class_property(io.outputs, extract_output_metadata(allocator, class), |o| { - o.0.as_str() - }); + metadata.outputs = merge_by_class_property( + io.outputs, + extract_output_metadata_in(allocator, class, Some(consts)), + |o| o.0.as_str(), + ); // Detect if ngOnChanges lifecycle hook is implemented // Similar to Angular's: const usesOnChanges = members.some(member => ...) diff --git a/crates/oxc_angular_compiler/src/component/transform.rs b/crates/oxc_angular_compiler/src/component/transform.rs index 2a2798183..2f6184ae0 100644 --- a/crates/oxc_angular_compiler/src/component/transform.rs +++ b/crates/oxc_angular_compiler/src/component/transform.rs @@ -41,7 +41,7 @@ use crate::class_metadata::{ use crate::directive::collect_string_consts; use crate::directive::{ R3QueryMetadata, create_content_queries_function, create_view_queries_function, - decorator_io_errors, extract_content_queries, extract_directive_metadata, extract_view_queries, + decorator_io_errors, extract_class_queries, extract_directive_metadata, find_directive_decorator, find_directive_decorator_span, generate_directive_definitions, }; use crate::dts; @@ -2536,30 +2536,6 @@ pub fn transform_angular_file( } } - // `@core.Input()` and the other member decorators through a namespace - // import of `@angular/core`, as written: `resolved_imports` may have - // pointed the import map's entry at another path. - let _core_namespaces = crate::directive::CoreNamespaces::enter( - parser_ret - .program - .body - .iter() - .filter_map(|stmt| match stmt { - Statement::ImportDeclaration(import) if import.source.value == "@angular/core" => { - import.specifiers.as_ref() - } - _ => None, - }) - .flatten() - .filter_map(|spec| match spec { - ImportDeclarationSpecifier::ImportNamespaceSpecifier(ns) => { - Some(ns.local.name.to_string()) - } - _ => None, - }) - .collect(), - ); - // 2. Walk AST to find @Component decorated classes and extract metadata for stmt in &parser_ret.program.body { let (class, stmt_start) = match stmt { @@ -2603,7 +2579,12 @@ pub fn transform_angular_file( let implicit_standalone = options.implicit_standalone(); // `inputs:`/`outputs:` forms ngtsc rejects, rather than dropping them silently. - result.diagnostics.extend(decorator_io_errors(allocator, class, &string_consts)); + result.diagnostics.extend(decorator_io_errors( + allocator, + class, + Some(source), + &string_consts, + )); if let Some(mut metadata) = extract_component_metadata( &allocator, @@ -2656,11 +2637,11 @@ pub fn transform_angular_file( let template = allocator.alloc_str(&template_string); // 4.5 Extract view queries from the class (for @ViewChild/@ViewChildren) // These need to be passed to compile_component_full so predicates can be pooled - let view_queries = extract_view_queries(allocator, class, Some(source)); - - // 4.6 Extract content queries from the class (for @ContentChild/@ContentChildren) - // Signal-based queries (contentChild(), contentChildren()) are also detected here - let content_queries = extract_content_queries(allocator, class, Some(source)); + // 4.5/4.6 View and content queries: member decorators and signal + // queries, then `queries:` in the decorator, as ngtsc orders them. + // Predicates are pooled by compile_component_full. + let (view_queries, content_queries) = + extract_class_queries(allocator, class, Some(source), &string_consts); // Collect content query property names for .d.ts generation // (before content_queries is moved into compile_component_full) diff --git a/crates/oxc_angular_compiler/src/directive/decorator.rs b/crates/oxc_angular_compiler/src/directive/decorator.rs index 38d2092f2..8a0a7ef7d 100644 --- a/crates/oxc_angular_compiler/src/directive/decorator.rs +++ b/crates/oxc_angular_compiler/src/directive/decorator.rs @@ -182,7 +182,7 @@ pub fn extract_directive_metadata<'a>( } // Extract @Input/@Output/@HostBinding/@HostListener from class members - builder = builder.extract_from_class(allocator, class, source_text); + builder = builder.extract_from_class_in(allocator, class, source_text, Some(consts)); // Detect if ngOnChanges lifecycle hook is implemented // Similar to Angular's: const usesOnChanges = members.some(member => ...) @@ -207,6 +207,20 @@ pub fn extract_directive_metadata<'a>( // The builder already has host data from extract_from_class, we need to merge the decorator host let mut metadata = builder.build()?; + // `queries:` from the decorator come after the member queries, as in ngtsc. + if let Some(config) = config_obj { + let queries = super::parse_decorator_queries( + allocator, + config, + class, + source_text, + consts, + "Directive", + ); + metadata.view_queries.extend(queries.view); + metadata.queries.extend(queries.content); + } + if let Some(io) = io { let fields = std::mem::replace(&mut metadata.inputs, Vec::new_in(&allocator)); metadata.inputs = @@ -959,7 +973,7 @@ pub(crate) fn resolve_member_transforms<'a>( _ => continue, }; let Some(name) = key.static_name() else { continue }; - let options = super::property_decorators::input_decorator_options(decorators); + let options = super::property_decorators::input_decorator_options(decorators, consts); let Some(options) = options else { continue }; let options = evaluator.evaluate(options); let Some(transform) = options.prop("transform") else { continue }; @@ -1035,22 +1049,25 @@ pub(crate) fn angular_decorator_config<'a>( Some((config, name)) } -/// The first error ngtsc raises for the inputs and outputs of a `@Component` / -/// `@Directive` on `class`, in the order it checks them -/// (`extractDirectiveMetadata`): `inputs:`, `@Input` members, `outputs:`, then -/// output members. ngtsc stops at the first one. +/// The first error ngtsc raises for the inputs, outputs and queries of a +/// `@Component` / `@Directive` on `class`, in the order it checks them +/// (`extractDirectiveMetadata`): `inputs:`, `@Input` members, `outputs:`, +/// output members, query members (`@ViewChild`, ...), then `queries:`. ngtsc +/// stops at the first one. /// -/// Each error points where ngtsc's does: the `inputs:` / `outputs:` value, or -/// the member. +/// Each error points where ngtsc's does: the `inputs:` / `outputs:` value, the +/// member, or the part of a query at fault. `source_text` is the file's, as +/// when the class is compiled, so both read the same queries. pub fn decorator_io_errors<'a>( allocator: &'a Allocator, class: &'a Class<'a>, + source_text: Option<&'a str>, consts: &StringConsts<'a>, ) -> std::vec::Vec { let Some((config, decorator_name)) = angular_decorator_config(class) else { return std::vec::Vec::new(); }; - let io = config.map(|config| parse_decorator_io(allocator, config, class, None, consts)); + let io = config.map(|config| parse_decorator_io(allocator, config, class, source_text, consts)); let (meta_inputs, meta_outputs): (std::vec::Vec<&str>, std::vec::Vec<&str>) = match &io { Some(io) => ( io.inputs.iter().map(|i| i.class_property_name.as_str()).collect(), @@ -1070,7 +1087,7 @@ pub fn decorator_io_errors<'a>( }; let name = key.static_name()?; // `@Input({ transform })` - let options = super::property_decorators::input_decorator_options(decorators); + let options = super::property_decorators::input_decorator_options(decorators, consts); if let Some(options) = options { let span = options.span(); let options = evaluator.evaluate(options); @@ -1134,12 +1151,30 @@ pub fn decorator_io_errors<'a>( }) }) }; + let member_queries = + || super::property_decorators::member_query_error(allocator, class, source_text, consts); + // With the source text, like the compiled queries: a predicate is emitted + // as written, which some expressions (functions) need it for. + let queries = || { + let config = config?; + let queries = super::parse_decorator_queries( + allocator, + config, + class, + source_text, + consts, + decorator_name, + ); + queries.error + }; io.as_ref() .and_then(|io| io.input_error.clone()) .or_else(input_members) .or_else(|| io.as_ref().and_then(|io| io.output_error.clone())) .or_else(output_members) + .or_else(member_queries) + .or_else(queries) .map(|(message, span)| OxcDiagnostic::error(message).with_label(span)) .into_iter() .collect() diff --git a/crates/oxc_angular_compiler/src/directive/evaluator.rs b/crates/oxc_angular_compiler/src/directive/evaluator.rs index a02c214c4..a4cae41a0 100644 --- a/crates/oxc_angular_compiler/src/directive/evaluator.rs +++ b/crates/oxc_angular_compiler/src/directive/evaluator.rs @@ -141,8 +141,8 @@ enum PathKey<'a> { Unknown, } -/// An import binding: the module it's imported from and, unless it's a -/// namespace import, the name it's exported under. +/// An import binding: the module it comes from and, unless it's a namespace +/// import, the name it's exported under. #[derive(Clone, Copy)] pub(crate) struct Import<'a> { pub module: &'a str, diff --git a/crates/oxc_angular_compiler/src/directive/metadata.rs b/crates/oxc_angular_compiler/src/directive/metadata.rs index 9c791d85a..a5365fd41 100644 --- a/crates/oxc_angular_compiler/src/directive/metadata.rs +++ b/crates/oxc_angular_compiler/src/directive/metadata.rs @@ -411,41 +411,67 @@ impl<'a> R3DirectiveMetadataBuilder<'a> { /// # Returns /// The builder with all extracted metadata added. pub fn extract_from_class( + self, + allocator: &'a Allocator, + class: &'a Class<'a>, + source_text: Option<&'a str>, + ) -> Self { + self.extract_from_class_in(allocator, class, source_text, None) + } + + /// [`Self::extract_from_class`], resolving query predicates that reference + /// same-file consts (`@ViewChild(SELECTOR)`) the way ngtsc does. + pub(crate) fn extract_from_class_in( mut self, allocator: &'a Allocator, class: &'a Class<'a>, source_text: Option<&'a str>, + consts: Option<&super::StringConsts<'a>>, ) -> Self { // Extract inputs from @Input decorators - let inputs = - super::property_decorators::extract_input_metadata(allocator, class, source_text); + let inputs = super::property_decorators::extract_input_metadata_in( + allocator, + class, + source_text, + consts, + ); for input in inputs { self = self.add_input(input); } // Extract outputs from @Output decorators - let outputs = super::property_decorators::extract_output_metadata(allocator, class); + let outputs = + super::property_decorators::extract_output_metadata_in(allocator, class, consts); for (class_name, binding_name) in outputs { self = self.add_output(class_name, binding_name); } // Extract view queries from @ViewChild/@ViewChildren - let view_queries = - super::property_decorators::extract_view_queries(allocator, class, source_text); + let view_queries = super::property_decorators::extract_view_queries_in( + allocator, + class, + source_text, + consts, + ); for query in view_queries { self = self.add_view_query(query); } // Extract content queries from @ContentChild/@ContentChildren - let content_queries = - super::property_decorators::extract_content_queries(allocator, class, source_text); + let content_queries = super::property_decorators::extract_content_queries_in( + allocator, + class, + source_text, + consts, + ); for query in content_queries { self = self.add_query(query); } // Extract host bindings from @HostBinding // Wrap with brackets: "class.active" -> "[class.active]" - let host_bindings = super::property_decorators::extract_host_bindings(allocator, class); + let host_bindings = + super::property_decorators::extract_host_bindings_in(allocator, class, consts); for (host_prop, class_prop) in host_bindings { // Add to host.properties with wrapped key let wrapped_key = @@ -456,7 +482,8 @@ impl<'a> R3DirectiveMetadataBuilder<'a> { // Extract host listeners from @HostListener // Wrap event name with parentheses and build method expression with args // Reference: Angular's shared.ts:713 - `bindings.listeners[eventName] = \`${member.name}(${args.join(',')})\`` - let host_listeners = super::property_decorators::extract_host_listeners(allocator, class); + let host_listeners = + super::property_decorators::extract_host_listeners_in(allocator, class, consts); for (event_name, method_name, args) in host_listeners { // Wrap event name: "click" -> "(click)" let wrapped_key = diff --git a/crates/oxc_angular_compiler/src/directive/mod.rs b/crates/oxc_angular_compiler/src/directive/mod.rs index 9a9f1cb12..f058580e3 100644 --- a/crates/oxc_angular_compiler/src/directive/mod.rs +++ b/crates/oxc_angular_compiler/src/directive/mod.rs @@ -30,7 +30,9 @@ pub use decorator::{ StringConsts, collect_string_consts, decorator_io_errors, extract_directive_metadata, find_directive_decorator_span, }; -pub(crate) use decorator::{extract_string_value, resolve_template_literal}; +pub(crate) use decorator::{ + angular_decorator_config, extract_string_value, resolve_template_literal, +}; pub(crate) use decorator::{ merge_by_class_property, parse_decorator_io, resolve_member_transforms, }; @@ -39,12 +41,13 @@ pub use metadata::{ QueryPredicate, R3DirectiveMetadata, R3DirectiveMetadataBuilder, R3HostDirectiveMetadata, R3HostMetadata, R3InputMetadata, R3QueryMetadata, }; -pub(crate) use property_decorators::CoreNamespaces; pub use property_decorators::{ - extract_content_queries, extract_host_bindings, extract_host_listeners, extract_input_metadata, - extract_output_metadata, extract_view_queries, + extract_class_queries, extract_content_queries, extract_host_bindings, extract_host_listeners, + extract_input_metadata, extract_input_metadata_in, extract_output_metadata, + extract_output_metadata_in, extract_view_queries, }; pub(crate) use property_decorators::{ + extract_host_bindings_in, extract_host_listeners_in, parse_decorator_queries, try_parse_signal_input, try_parse_signal_model, try_parse_signal_output, unwrap_initializer_api_expr, }; diff --git a/crates/oxc_angular_compiler/src/directive/property_decorators.rs b/crates/oxc_angular_compiler/src/directive/property_decorators.rs index c5873b64a..1b78099d4 100644 --- a/crates/oxc_angular_compiler/src/directive/property_decorators.rs +++ b/crates/oxc_angular_compiler/src/directive/property_decorators.rs @@ -11,13 +11,12 @@ //! These decorators are found on class properties and methods, and define //! how the directive/component interacts with its parent context. -use std::cell::RefCell; - use oxc_allocator::{Allocator, Vec}; use oxc_ast::ast::{ Argument, ArrayExpressionElement, Class, ClassElement, Decorator, Expression, MethodDefinitionKind, ObjectPropertyKind, PropertyKey, }; +use oxc_span::{GetSpan, Span}; use oxc_str::Ident; use super::metadata::{QueryPredicate, R3InputMetadata, R3QueryMetadata}; @@ -28,30 +27,16 @@ use crate::output::oxc_converter::convert_oxc_expression; // Helper Functions // ============================================================================ -thread_local! { - /// The local names of `import * as ns from '@angular/core'` in the file - /// being compiled (see [`CoreNamespaces`]). - static CORE_NAMESPACES: RefCell> = - const { RefCell::new(std::vec::Vec::new()) }; -} - -/// While alive, member decorators written through these namespace imports of -/// `@angular/core` (`@core.Input()`) are recognised. ngtsc only reads a -/// namespaced member decorator whose namespace imports `@angular/core`, and the -/// functions here that extract member decorators don't see the file's imports. -pub(crate) struct CoreNamespaces(std::vec::Vec); - -impl CoreNamespaces { - pub(crate) fn enter(names: std::vec::Vec) -> Self { - Self(CORE_NAMESPACES.with(|current| current.replace(names))) - } -} - -impl Drop for CoreNamespaces { - fn drop(&mut self) { - let previous = std::mem::take(&mut self.0); - CORE_NAMESPACES.with(|current| *current.borrow_mut() = previous); - } +/// Whether `name` is a namespace import of `@angular/core` +/// (`import * as core from '@angular/core'`) in the file `consts` was collected +/// from. Without the file (`None`), no name is. +/// +/// ngtsc only reads a namespaced member decorator (`@core.Input()`) or +/// `core.forwardRef(...)` through such an import (`getImportOfIdentifier`). +fn is_core_namespace(consts: Option<&super::StringConsts<'_>>, name: &str) -> bool { + consts + .and_then(|consts| consts.scope().import(name)) + .is_some_and(|import| import.module == "@angular/core" && import.imported.is_none()) } /// Find a decorator by name from a list of decorators. @@ -59,21 +44,20 @@ impl Drop for CoreNamespaces { /// Searches for decorators that are either: /// - Simple identifiers: `@Input` /// - Call expressions: `@Input()` or `@Input('alias')` -/// - Either of those through a namespace import of `@angular/core` (see -/// [`CoreNamespaces`]): `@core.Input()` +/// - Either of those through a namespace import of `@angular/core` in the +/// file `consts` was collected from (see [`is_core_namespace`]): `@core.Input()` /// /// Returns the first matching decorator. fn find_decorator_by_name<'a>( decorators: &'a oxc_allocator::Vec<'a, Decorator<'a>>, name: &str, + consts: Option<&super::StringConsts<'_>>, ) -> Option<&'a Decorator<'a>> { - let is_core_namespace = - |ns: &str| CORE_NAMESPACES.with(|names| names.borrow().iter().any(|n| n == ns)); let is_name = |expr: &Expression<'_>| match expr { Expression::Identifier(id) => id.name == name, Expression::StaticMemberExpression(m) => { m.property.name == name - && matches!(&m.object, Expression::Identifier(ns) if is_core_namespace(&ns.name)) + && matches!(&m.object, Expression::Identifier(ns) if is_core_namespace(consts, &ns.name)) } _ => false, }; @@ -86,8 +70,9 @@ fn find_decorator_by_name<'a>( /// The options argument of an `@Input(...)` decorator, if any. pub(crate) fn input_decorator_options<'a>( decorators: &'a oxc_allocator::Vec<'a, Decorator<'a>>, + consts: &super::StringConsts<'_>, ) -> Option<&'a Expression<'a>> { - match &find_decorator_by_name(decorators, "Input")?.expression { + match &find_decorator_by_name(decorators, "Input", Some(consts))?.expression { Expression::CallExpression(call) => call.arguments.first()?.as_expression(), _ => None, } @@ -125,44 +110,61 @@ fn extract_boolean_value(expr: &Expression<'_>) -> Option { } } +/// Angular's signal query functions (ngtsc's `QUERY_INITIALIZER_FNS`). +const QUERY_APIS: [super::decorator::InitializerApi; 4] = [ + ("viewChild", "@angular/core"), + ("viewChildren", "@angular/core"), + ("contentChild", "@angular/core"), + ("contentChildren", "@angular/core"), +]; + /// Try to unwrap a forwardRef call and extract the inner expression. /// -/// For `forwardRef(() => MyClass)`, returns `Some(MyClass expression)`. -/// For non-forwardRef expressions, returns None. -fn try_unwrap_forward_ref<'a>(expr: &'a Expression<'a>) -> Option<&'a Expression<'a>> { - let call = match expr { - Expression::CallExpression(call) => call, - _ => return None, +/// Mirrors ngtsc's `tryUnwrapForwardRef`: `forwardRef(() => X)`, +/// `forwardRef(function () { return X; })`, looking through parentheses and +/// `as` casts. Returns `None` for anything else. +/// +/// Like ngtsc, it's only unwrapped when it's `@angular/core`'s `forwardRef`: +/// imported by name (under any alias), or `ns.forwardRef(...)` with `ns` a +/// namespace import of `@angular/core` (see [`is_core_namespace`]). Any other +/// `forwardRef` (a local function, one from another module, `util.forwardRef`) +/// is kept as written. Without the file's imports (`consts` is `None`), a bare +/// `forwardRef` is matched by name. +fn try_unwrap_forward_ref<'a>( + expr: &'a Expression<'a>, + consts: Option<&super::StringConsts<'_>>, +) -> Option<&'a Expression<'a>> { + let Expression::CallExpression(call) = unwrap_expression(expr) else { return None }; + let is_forward_ref = match &call.callee { + Expression::Identifier(id) => match consts { + Some(consts) => consts.scope().import(&id.name).is_some_and(|import| { + import.module == "@angular/core" && import.imported == Some("forwardRef") + }), + None => id.name == "forwardRef", + }, + Expression::StaticMemberExpression(m) => { + m.property.name == "forwardRef" + && matches!(&m.object, Expression::Identifier(ns) if is_core_namespace(consts, &ns.name)) + } + _ => false, }; - - // Check if callee is forwardRef - let is_forward_ref = - matches!(&call.callee, Expression::Identifier(id) if id.name == "forwardRef"); - if !is_forward_ref { + if !is_forward_ref || call.arguments.len() != 1 { return None; } - - // Get the first argument (should be an arrow function) - let first_arg = call.arguments.first()?; - let arrow = match first_arg { - Argument::ArrowFunctionExpression(arrow) => arrow, - _ => return None, - }; - - // Expression body: () => MyClass - if let Some(expr) = arrow.get_expression() { - return Some(expr); - } - // Block body: () => { return MyClass; } - if let Some(body) = arrow.get_function_body() { - if body.statements.len() == 1 { - if let oxc_ast::ast::Statement::ReturnStatement(ret) = &body.statements[0] { - return ret.argument.as_ref(); + let body = match unwrap_expression(call.arguments[0].as_expression()?) { + Expression::ArrowFunctionExpression(arrow) => { + if let Some(expr) = arrow.get_expression() { + return Some(expr); } + arrow.get_function_body()? } + Expression::FunctionExpression(f) => &**f.body.as_ref()?, + _ => return None, + }; + match body.statements.as_slice() { + [oxc_ast::ast::Statement::ReturnStatement(ret)] => ret.argument.as_ref(), + _ => None, } - - None } // ============================================================================ @@ -554,6 +556,18 @@ pub fn extract_input_metadata<'a>( allocator: &'a Allocator, class: &'a Class<'a>, source_text: Option<&'a str>, +) -> Vec<'a, R3InputMetadata<'a>> { + extract_input_metadata_in(allocator, class, source_text, None) +} + +/// [`extract_input_metadata`] for a class in the file `consts` was collected +/// from, which also recognises `@core.Input()` through a namespace import of +/// `@angular/core` (see [`is_core_namespace`]). +pub fn extract_input_metadata_in<'a>( + allocator: &'a Allocator, + class: &'a Class<'a>, + source_text: Option<&'a str>, + consts: Option<&super::StringConsts<'a>>, ) -> Vec<'a, R3InputMetadata<'a>> { let mut inputs = Vec::new_in(&allocator); @@ -561,7 +575,7 @@ pub fn extract_input_metadata<'a>( match element { ClassElement::PropertyDefinition(prop) => { // First check for @Input decorator - if let Some(decorator) = find_decorator_by_name(&prop.decorators, "Input") { + if let Some(decorator) = find_decorator_by_name(&prop.decorators, "Input", consts) { let Some(class_property_name) = get_property_key_name(&prop.key) else { continue; }; @@ -599,7 +613,8 @@ pub fn extract_input_metadata<'a>( } ClassElement::AccessorProperty(prop) => { - let Some(decorator) = find_decorator_by_name(&prop.decorators, "Input") else { + let Some(decorator) = find_decorator_by_name(&prop.decorators, "Input", consts) + else { continue; }; @@ -623,7 +638,8 @@ pub fn extract_input_metadata<'a>( // Methods with @Input decorator (setter-based inputs) ClassElement::MethodDefinition(method) => { - let Some(decorator) = find_decorator_by_name(&method.decorators, "Input") else { + let Some(decorator) = find_decorator_by_name(&method.decorators, "Input", consts) + else { continue; }; @@ -705,6 +721,17 @@ fn parse_output_config<'a>(decorator: &'a Decorator<'a>) -> OutputConfig<'a> { pub fn extract_output_metadata<'a>( allocator: &'a Allocator, class: &'a Class<'a>, +) -> Vec<'a, (Ident<'a>, Ident<'a>)> { + extract_output_metadata_in(allocator, class, None) +} + +/// [`extract_output_metadata`] for a class in the file `consts` was collected +/// from, which also recognises `@core.Output()` through a namespace import of +/// `@angular/core` (see [`is_core_namespace`]). +pub fn extract_output_metadata_in<'a>( + allocator: &'a Allocator, + class: &'a Class<'a>, + consts: Option<&super::StringConsts<'a>>, ) -> Vec<'a, (Ident<'a>, Ident<'a>)> { let mut outputs = Vec::new_in(&allocator); @@ -712,7 +739,8 @@ pub fn extract_output_metadata<'a>( match element { ClassElement::PropertyDefinition(prop) => { // First check for @Output decorator - if let Some(decorator) = find_decorator_by_name(&prop.decorators, "Output") { + if let Some(decorator) = find_decorator_by_name(&prop.decorators, "Output", consts) + { let Some(class_property_name) = get_property_key_name(&prop.key) else { continue; }; @@ -744,7 +772,8 @@ pub fn extract_output_metadata<'a>( } ClassElement::AccessorProperty(prop) => { - let Some(decorator) = find_decorator_by_name(&prop.decorators, "Output") else { + let Some(decorator) = find_decorator_by_name(&prop.decorators, "Output", consts) + else { continue; }; @@ -784,13 +813,15 @@ struct QueryConfig<'a> { is_static: bool, /// Expression to read from matched elements. read: Option>, - /// Whether to include descendants (for content queries). + /// Whether to include descendants. descendants: bool, + /// Whether a `QueryList` only notifies when its contents change. + emit_distinct_changes_only: bool, } impl<'a> Default for QueryConfig<'a> { fn default() -> Self { - Self { predicate: None, is_static: false, read: None, descendants: true } + Self::default_for("") } } @@ -806,6 +837,7 @@ impl<'a> QueryConfig<'a> { read: None, // For @ContentChildren, default is false; for all others, default is true descendants: decorator_name != "ContentChildren", + emit_distinct_changes_only: true, } } } @@ -825,38 +857,51 @@ fn parse_query_config<'a>( decorator: &'a Decorator<'a>, decorator_name: &str, source_text: Option<&'a str>, + consts: Option<&super::StringConsts<'a>>, ) -> QueryConfig<'a> { + // With the file, read like ngtsc does (see [`member_query`]). A query it + // rejects isn't compiled; [`member_query_error`] reports it. + if let Some(consts) = consts { + return match member_query( + allocator, + decorator, + decorator_name, + Span::default(), + source_text, + consts, + ) { + Ok(query) => QueryConfig { + predicate: Some(query.predicate), + is_static: query.is_static, + read: query.read, + descendants: query.descendants, + emit_distinct_changes_only: query.emit_distinct_changes_only, + }, + Err(_) => QueryConfig::default_for(decorator_name), + }; + } + let Expression::CallExpression(call) = &decorator.expression else { return QueryConfig::default_for(decorator_name); }; - let Some(first_arg) = call.arguments.first() else { + let Some(first_arg) = call.arguments.first().and_then(Argument::as_expression) else { return QueryConfig::default_for(decorator_name); }; let mut config = QueryConfig::default_for(decorator_name); - // Parse predicate from first argument - match first_arg { - // @ViewChild('refName') - string selector - Argument::StringLiteral(lit) => { - let mut selectors = Vec::new_in(&allocator); - selectors.push(lit.value.clone().into()); - config.predicate = Some(QueryPredicate::Selectors(selectors)); - } - - // Other expressions (identifiers, member expressions, forwardRef calls, etc.) - _ => { - let expr = first_arg.to_expression(); - // Unwrap forwardRef if present - Angular doesn't include forwardRef in compiled output - let unwrapped_expr = try_unwrap_forward_ref(expr).unwrap_or(expr); - if let Some(output_expr) = - convert_oxc_expression(allocator, unwrapped_expr, source_text) - { - config.predicate = Some(QueryPredicate::Type(output_expr)); - } + // The predicate: a string selector or a type/token. + // forwardRef isn't included in compiled output. + let node = try_unwrap_forward_ref(first_arg, None).unwrap_or(first_arg); + config.predicate = match node { + Expression::StringLiteral(lit) => { + let mut list = Vec::new_in(&allocator); + list.push(lit.value.clone().into()); + Some(QueryPredicate::Selectors(list)) } - } + _ => convert_oxc_expression(allocator, node, source_text).map(QueryPredicate::Type), + }; // Parse options from second argument if present if let Some(second_arg) = call.arguments.get(1) { @@ -881,6 +926,10 @@ fn parse_query_config<'a>( config.descendants = extract_boolean_value(&prop.value).unwrap_or(default); } + "emitDistinctChangesOnly" => { + config.emit_distinct_changes_only = + extract_boolean_value(&prop.value).unwrap_or(true); + } _ => {} } } @@ -941,6 +990,7 @@ fn try_parse_signal_query<'a>( value: &'a Expression<'a>, property_name: Ident<'a>, source_text: Option<&'a str>, + consts: Option<&super::StringConsts<'a>>, ) -> Option<(SignalQueryType, R3QueryMetadata<'a>)> { // Check if the value is a call expression (unwrapping `as`/parenthesized). let call_expr = match unwrap_initializer_api_expr(value) { @@ -1015,7 +1065,7 @@ fn try_parse_signal_query<'a>( _ => { let expr = predicate_arg.to_expression(); // Unwrap forwardRef if present - Angular doesn't include forwardRef in compiled output - let unwrapped_expr = try_unwrap_forward_ref(expr).unwrap_or(expr); + let unwrapped_expr = try_unwrap_forward_ref(expr, consts).unwrap_or(expr); let output_expr = convert_oxc_expression(allocator, unwrapped_expr, source_text)?; QueryPredicate::Type(output_expr) } @@ -1083,6 +1133,17 @@ pub fn extract_view_queries<'a>( allocator: &'a Allocator, class: &'a Class<'a>, source_text: Option<&'a str>, +) -> Vec<'a, R3QueryMetadata<'a>> { + extract_view_queries_in(allocator, class, source_text, None) +} + +/// [`extract_view_queries`], resolving predicates that reference same-file +/// consts (`@ViewChild(SELECTOR)`) the way ngtsc's partial evaluator does. +pub(crate) fn extract_view_queries_in<'a>( + allocator: &'a Allocator, + class: &'a Class<'a>, + source_text: Option<&'a str>, + consts: Option<&super::StringConsts<'a>>, ) -> Vec<'a, R3QueryMetadata<'a>> { // Use separate vectors to match Angular's ordering approach. // Angular groups queries by type, maintaining declaration order within each group: @@ -1101,9 +1162,13 @@ pub fn extract_view_queries<'a>( // Check for signal-based view queries first (viewChild(), viewChildren()) if let Some(value) = &prop.value { if let Some(property_name) = get_property_key_name(&prop.key) { - if let Some((query_type, metadata)) = - try_parse_signal_query(allocator, value, property_name, source_text) - { + if let Some((query_type, metadata)) = try_parse_signal_query( + allocator, + value, + property_name, + source_text, + consts, + ) { if query_type.is_view_query() { signal_queries.push(metadata); continue; @@ -1113,17 +1178,24 @@ pub fn extract_view_queries<'a>( } // Check for decorator-based queries (@ViewChild, @ViewChildren) - if let Some(decorator) = find_decorator_by_name(&prop.decorators, "ViewChild") { + if let Some(decorator) = + find_decorator_by_name(&prop.decorators, "ViewChild", consts) + { if let Some(property_name) = get_property_key_name(&prop.key) { - let config = - parse_query_config(allocator, decorator, "ViewChild", source_text); + let config = parse_query_config( + allocator, + decorator, + "ViewChild", + source_text, + consts, + ); if let Some(predicate) = config.predicate { view_child_queries.push(R3QueryMetadata { property_name, first: true, predicate, - descendants: true, - emit_distinct_changes_only: true, + descendants: config.descendants, + emit_distinct_changes_only: config.emit_distinct_changes_only, read: config.read, is_static: config.is_static, is_signal: false, @@ -1131,18 +1203,23 @@ pub fn extract_view_queries<'a>( } } } else if let Some(decorator) = - find_decorator_by_name(&prop.decorators, "ViewChildren") + find_decorator_by_name(&prop.decorators, "ViewChildren", consts) { if let Some(property_name) = get_property_key_name(&prop.key) { - let config = - parse_query_config(allocator, decorator, "ViewChildren", source_text); + let config = parse_query_config( + allocator, + decorator, + "ViewChildren", + source_text, + consts, + ); if let Some(predicate) = config.predicate { view_children_queries.push(R3QueryMetadata { property_name, first: false, predicate, - descendants: true, - emit_distinct_changes_only: true, + descendants: config.descendants, + emit_distinct_changes_only: config.emit_distinct_changes_only, read: config.read, is_static: config.is_static, is_signal: false, @@ -1155,17 +1232,24 @@ pub fn extract_view_queries<'a>( if matches!(method.kind, MethodDefinitionKind::Set | MethodDefinitionKind::Get) => { // Check for decorator-based queries on setters/getters - if let Some(decorator) = find_decorator_by_name(&method.decorators, "ViewChild") { + if let Some(decorator) = + find_decorator_by_name(&method.decorators, "ViewChild", consts) + { if let Some(property_name) = get_property_key_name(&method.key) { - let config = - parse_query_config(allocator, decorator, "ViewChild", source_text); + let config = parse_query_config( + allocator, + decorator, + "ViewChild", + source_text, + consts, + ); if let Some(predicate) = config.predicate { view_child_queries.push(R3QueryMetadata { property_name, first: true, predicate, - descendants: true, - emit_distinct_changes_only: true, + descendants: config.descendants, + emit_distinct_changes_only: config.emit_distinct_changes_only, read: config.read, is_static: config.is_static, is_signal: false, @@ -1173,18 +1257,23 @@ pub fn extract_view_queries<'a>( } } } else if let Some(decorator) = - find_decorator_by_name(&method.decorators, "ViewChildren") + find_decorator_by_name(&method.decorators, "ViewChildren", consts) { if let Some(property_name) = get_property_key_name(&method.key) { - let config = - parse_query_config(allocator, decorator, "ViewChildren", source_text); + let config = parse_query_config( + allocator, + decorator, + "ViewChildren", + source_text, + consts, + ); if let Some(predicate) = config.predicate { view_children_queries.push(R3QueryMetadata { property_name, first: false, predicate, - descendants: true, - emit_distinct_changes_only: true, + descendants: config.descendants, + emit_distinct_changes_only: config.emit_distinct_changes_only, read: config.read, is_static: config.is_static, is_signal: false, @@ -1226,6 +1315,17 @@ pub fn extract_content_queries<'a>( allocator: &'a Allocator, class: &'a Class<'a>, source_text: Option<&'a str>, +) -> Vec<'a, R3QueryMetadata<'a>> { + extract_content_queries_in(allocator, class, source_text, None) +} + +/// [`extract_content_queries`], resolving predicates that reference same-file +/// consts (`@ViewChild(SELECTOR)`) the way ngtsc's partial evaluator does. +pub(crate) fn extract_content_queries_in<'a>( + allocator: &'a Allocator, + class: &'a Class<'a>, + source_text: Option<&'a str>, + consts: Option<&super::StringConsts<'a>>, ) -> Vec<'a, R3QueryMetadata<'a>> { // Use separate vectors to match Angular's ordering approach. // Angular groups queries by type, maintaining declaration order within each group: @@ -1244,9 +1344,13 @@ pub fn extract_content_queries<'a>( // Check for signal-based content queries first (contentChild(), contentChildren()) if let Some(value) = &prop.value { if let Some(property_name) = get_property_key_name(&prop.key) { - if let Some((query_type, metadata)) = - try_parse_signal_query(allocator, value, property_name, source_text) - { + if let Some((query_type, metadata)) = try_parse_signal_query( + allocator, + value, + property_name, + source_text, + consts, + ) { if !query_type.is_view_query() { signal_queries.push(metadata); continue; @@ -1256,17 +1360,24 @@ pub fn extract_content_queries<'a>( } // Check for decorator-based queries (@ContentChild, @ContentChildren) - if let Some(decorator) = find_decorator_by_name(&prop.decorators, "ContentChild") { + if let Some(decorator) = + find_decorator_by_name(&prop.decorators, "ContentChild", consts) + { if let Some(property_name) = get_property_key_name(&prop.key) { - let config = - parse_query_config(allocator, decorator, "ContentChild", source_text); + let config = parse_query_config( + allocator, + decorator, + "ContentChild", + source_text, + consts, + ); if let Some(predicate) = config.predicate { content_child_queries.push(R3QueryMetadata { property_name, first: true, predicate, descendants: config.descendants, - emit_distinct_changes_only: true, + emit_distinct_changes_only: config.emit_distinct_changes_only, read: config.read, is_static: config.is_static, is_signal: false, @@ -1274,7 +1385,7 @@ pub fn extract_content_queries<'a>( } } } else if let Some(decorator) = - find_decorator_by_name(&prop.decorators, "ContentChildren") + find_decorator_by_name(&prop.decorators, "ContentChildren", consts) { if let Some(property_name) = get_property_key_name(&prop.key) { let config = parse_query_config( @@ -1282,6 +1393,7 @@ pub fn extract_content_queries<'a>( decorator, "ContentChildren", source_text, + consts, ); if let Some(predicate) = config.predicate { content_children_queries.push(R3QueryMetadata { @@ -1289,7 +1401,7 @@ pub fn extract_content_queries<'a>( first: false, predicate, descendants: config.descendants, - emit_distinct_changes_only: true, + emit_distinct_changes_only: config.emit_distinct_changes_only, read: config.read, is_static: config.is_static, is_signal: false, @@ -1302,18 +1414,24 @@ pub fn extract_content_queries<'a>( if matches!(method.kind, MethodDefinitionKind::Set | MethodDefinitionKind::Get) => { // Check for decorator-based queries on setters/getters - if let Some(decorator) = find_decorator_by_name(&method.decorators, "ContentChild") + if let Some(decorator) = + find_decorator_by_name(&method.decorators, "ContentChild", consts) { if let Some(property_name) = get_property_key_name(&method.key) { - let config = - parse_query_config(allocator, decorator, "ContentChild", source_text); + let config = parse_query_config( + allocator, + decorator, + "ContentChild", + source_text, + consts, + ); if let Some(predicate) = config.predicate { content_child_queries.push(R3QueryMetadata { property_name, first: true, predicate, descendants: config.descendants, - emit_distinct_changes_only: true, + emit_distinct_changes_only: config.emit_distinct_changes_only, read: config.read, is_static: config.is_static, is_signal: false, @@ -1321,7 +1439,7 @@ pub fn extract_content_queries<'a>( } } } else if let Some(decorator) = - find_decorator_by_name(&method.decorators, "ContentChildren") + find_decorator_by_name(&method.decorators, "ContentChildren", consts) { if let Some(property_name) = get_property_key_name(&method.key) { let config = parse_query_config( @@ -1329,6 +1447,7 @@ pub fn extract_content_queries<'a>( decorator, "ContentChildren", source_text, + consts, ); if let Some(predicate) = config.predicate { content_children_queries.push(R3QueryMetadata { @@ -1336,7 +1455,7 @@ pub fn extract_content_queries<'a>( first: false, predicate, descendants: config.descendants, - emit_distinct_changes_only: true, + emit_distinct_changes_only: config.emit_distinct_changes_only, read: config.read, is_static: config.is_static, is_signal: false, @@ -1378,6 +1497,16 @@ pub fn extract_content_queries<'a>( pub fn extract_host_bindings<'a>( allocator: &'a Allocator, class: &'a Class<'a>, +) -> Vec<'a, (Ident<'a>, Ident<'a>)> { + extract_host_bindings_in(allocator, class, None) +} + +/// [`extract_host_bindings`] for a class in the file `consts` was collected +/// from, which also recognises `@core.HostBinding()` (see [`is_core_namespace`]). +pub(crate) fn extract_host_bindings_in<'a>( + allocator: &'a Allocator, + class: &'a Class<'a>, + consts: Option<&super::StringConsts<'a>>, ) -> Vec<'a, (Ident<'a>, Ident<'a>)> { let mut bindings = Vec::new_in(&allocator); @@ -1395,7 +1524,7 @@ pub fn extract_host_bindings<'a>( _ => continue, }; - let Some(decorator) = find_decorator_by_name(decorators, "HostBinding") else { + let Some(decorator) = find_decorator_by_name(decorators, "HostBinding", consts) else { continue; }; @@ -1450,6 +1579,16 @@ fn extract_host_binding_name<'a>(decorator: &'a Decorator<'a>) -> Option( allocator: &'a Allocator, class: &'a Class<'a>, +) -> Vec<'a, (Ident<'a>, Ident<'a>, Vec<'a, Ident<'a>>)> { + extract_host_listeners_in(allocator, class, None) +} + +/// [`extract_host_listeners`] for a class in the file `consts` was collected +/// from, which also recognises `@core.HostListener()` (see [`is_core_namespace`]). +pub(crate) fn extract_host_listeners_in<'a>( + allocator: &'a Allocator, + class: &'a Class<'a>, + consts: Option<&super::StringConsts<'a>>, ) -> Vec<'a, (Ident<'a>, Ident<'a>, Vec<'a, Ident<'a>>)> { let mut listeners = Vec::new_in(&allocator); @@ -1465,7 +1604,7 @@ pub fn extract_host_listeners<'a>( _ => continue, }; - let Some(decorator) = find_decorator_by_name(decorators, "HostListener") else { + let Some(decorator) = find_decorator_by_name(decorators, "HostListener", consts) else { continue; }; @@ -1534,6 +1673,346 @@ fn parse_host_listener_config<'a>( // Tests // ============================================================================ +/// A class's view and content queries as they're compiled: member decorators +/// and signal queries (predicates referencing same-file consts resolved), then +/// `queries:` from its `@Component` / `@Directive` metadata, in ngtsc's order. +pub fn extract_class_queries<'a>( + allocator: &'a Allocator, + class: &'a Class<'a>, + source_text: Option<&'a str>, + consts: &super::StringConsts<'a>, +) -> (Vec<'a, R3QueryMetadata<'a>>, Vec<'a, R3QueryMetadata<'a>>) { + let mut view = extract_view_queries_in(allocator, class, source_text, Some(consts)); + let mut content = extract_content_queries_in(allocator, class, source_text, Some(consts)); + if let Some((Some(config), name)) = super::angular_decorator_config(class) { + let queries = parse_decorator_queries(allocator, config, class, source_text, consts, name); + view.extend(queries.view); + content.extend(queries.content); + } + (view, content) +} + +// ============================================================================ +// `queries:` in @Directive / @Component metadata +// ============================================================================ + +/// Queries declared in decorator metadata, e.g. +/// `@Directive({ queries: { el: new ViewChild('el') } })`. +pub(crate) struct DecoratorQueries<'a> { + pub view: Vec<'a, R3QueryMetadata<'a>>, + pub content: Vec<'a, R3QueryMetadata<'a>>, + /// The first error ngtsc reports for them, and the node it reports it on. + pub error: Option<(String, Span)>, +} + +const QUERY_TYPES: &[&str] = &["ViewChild", "ViewChildren", "ContentChild", "ContentChildren"]; + +/// ngtsc's `unwrapExpression`: parentheses and `as` casts. +fn unwrap_expression<'a>(mut expr: &'a Expression<'a>) -> &'a Expression<'a> { + loop { + expr = match expr { + Expression::ParenthesizedExpression(e) => &e.expression, + Expression::TSAsExpression(e) => &e.expression, + _ => return expr, + }; + } +} + +/// ngtsc's `reflectObjectLiteral`: property assignments with a static name and +/// shorthand properties; anything else is skipped. +fn reflect_object_literal<'a>( + obj: &'a oxc_ast::ast::ObjectExpression<'a>, +) -> std::vec::Vec<(String, &'a Expression<'a>)> { + let mut entries: std::vec::Vec<(String, &'a Expression<'a>)> = std::vec::Vec::new(); + for prop in &obj.properties { + let ObjectPropertyKind::ObjectProperty(prop) = prop else { continue }; + if prop.method || prop.computed || !matches!(prop.kind, oxc_ast::ast::PropertyKind::Init) { + continue; + } + let name = match &prop.key { + PropertyKey::StaticIdentifier(id) => id.name.to_string(), + PropertyKey::StringLiteral(s) => s.value.to_string(), + PropertyKey::NumericLiteral(n) => n.value.to_string(), + _ => continue, + }; + // A Map keeps the first key's position and the last value. + match entries.iter_mut().find(|(k, _)| *k == name) { + Some(entry) => entry.1 = &prop.value, + None => entries.push((name, &prop.value)), + } + } + entries +} + +/// Parse `queries:` from a decorator metadata object. +/// +/// Reference: `extractQueriesFromDecorator` / `extractDecoratorQueryMetadata` in +/// packages/compiler-cli/src/ngtsc/annotations/directive/src/shared.ts +pub(crate) fn parse_decorator_queries<'a>( + allocator: &'a Allocator, + config: &'a oxc_ast::ast::ObjectExpression<'a>, + class: &'a Class<'a>, + source_text: Option<&'a str>, + consts: &super::StringConsts<'a>, + decorator_name: &str, +) -> DecoratorQueries<'a> { + let mut queries = DecoratorQueries { + view: Vec::new_in(&allocator), + content: Vec::new_in(&allocator), + error: None, + }; + let Some(query_data) = super::decorator::config_property(config, "queries", consts) else { + return queries; + }; + let Expression::ObjectExpression(query_data) = query_data else { + queries.error = Some(( + "Decorator queries metadata must be an object literal".into(), + query_data.span(), + )); + return queries; + }; + let evaluator = super::evaluator::Evaluator::new(consts); + // Where each query is written, for the collision error below. + let (mut content_exprs, mut view_exprs) = (std::vec::Vec::new(), std::vec::Vec::new()); + for (property_name, expr) in reflect_object_literal(query_data) { + let not_a_query = || { + Some(( + "Decorator query metadata must be an instance of a query type".into(), + query_data.span, + )) + }; + let Expression::NewExpression(new_expr) = unwrap_expression(expr) else { + queries.error = not_a_query(); + return queries; + }; + // `new ViewChild(...)` / `new core.ViewChild(...)`, imported from @angular/core. + let type_name = match &new_expr.callee { + Expression::Identifier(id) => consts + .scope() + .import(id.name.as_str()) + .filter(|i| i.module == "@angular/core") + .and_then(|i| i.imported), + Expression::StaticMemberExpression(m) => match &m.object { + Expression::Identifier(ns) if is_core_namespace(Some(consts), &ns.name) => { + Some(m.property.name.as_str()) + } + _ => None, + }, + _ => None, + }; + let Some(type_name) = type_name.filter(|t| QUERY_TYPES.contains(t)) else { + queries.error = not_a_query(); + return queries; + }; + match decorator_query( + allocator, + consts, + &evaluator, + type_name, + &new_expr.arguments, + new_expr.span, + &property_name, + source_text, + ) { + Ok(query) if type_name.starts_with("Content") => { + queries.content.push(query); + content_exprs.push(new_expr.span); + } + Ok(query) => { + queries.view.push(query); + view_exprs.push(new_expr.span); + } + Err(error) => { + queries.error = Some(error); + return queries; + } + } + } + + // A signal query member for the same property is an error: one calling + // Angular's `viewChild()`, `contentChildren()`, ... (not just any function + // named like them). + let signal_queries: std::vec::Vec> = class + .body + .body + .iter() + .filter_map(|element| { + let ClassElement::PropertyDefinition(prop) = element else { return None }; + let name = get_property_key_name(&prop.key)?; + super::decorator::is_initializer_api_call(prop.value.as_ref()?, consts, &QUERY_APIS) + .then_some(name) + }) + .collect(); + // ngtsc checks the content queries first, and reports the `new` expression. + let collision = queries + .content + .iter() + .zip(content_exprs) + .chain(queries.view.iter().zip(view_exprs)) + .find(|(q, _)| signal_queries.contains(&q.property_name)); + if let Some((_, span)) = collision { + queries.error = Some(( + format!( + "Query is declared multiple times. \"@{decorator_name}\" declares a query for the same property." + ), + span, + )); + } + queries +} + +/// A query member decorator (`@ViewChild('el', {static: true})` on the +/// member at `span`), read like ngtsc's `extractDecoratorQueryMetadata` (see +/// [`decorator_query`]): the options are evaluated, so a same-file `const` +/// counts and a value of the wrong type is an error. +fn member_query<'a>( + allocator: &'a Allocator, + decorator: &'a Decorator<'a>, + name: &str, + span: Span, + source_text: Option<&'a str>, + consts: &super::StringConsts<'a>, +) -> Result, (String, Span)> { + // `@ViewChild` without a call has no arguments. + let args: &'a [Argument<'a>] = match &decorator.expression { + Expression::CallExpression(call) => &call.arguments, + _ => &[], + }; + let evaluator = super::evaluator::Evaluator::new(consts); + decorator_query(allocator, consts, &evaluator, name, args, span, "", source_text) +} + +/// The first error ngtsc raises for a class's query member decorators +/// (`parseQueriesOfClassFields`), in member order: the one +/// [`member_query`] reports, on the node ngtsc points at. +pub(crate) fn member_query_error<'a>( + allocator: &'a Allocator, + class: &'a Class<'a>, + source_text: Option<&'a str>, + consts: &super::StringConsts<'a>, +) -> Option<(String, Span)> { + class.body.body.iter().find_map(|element| { + let (decorators, span) = match element { + ClassElement::PropertyDefinition(prop) => (&prop.decorators, prop.span), + ClassElement::MethodDefinition(method) + if matches!(method.kind, MethodDefinitionKind::Set | MethodDefinitionKind::Get) => + { + (&method.decorators, method.span) + } + _ => return None, + }; + let (decorator, name) = QUERY_TYPES.iter().find_map(|name| { + Some((find_decorator_by_name(decorators, name, Some(consts))?, *name)) + })?; + member_query(allocator, decorator, name, span, source_text, consts).err() + }) +} + +/// ngtsc's `extractDecoratorQueryMetadata`: one `@ViewChild(predicate, +/// options?)` member decorator, or `new ViewChild(...)` in `queries:`, and +/// friends. `args` are its arguments and `span` the member or the `new` +/// expression. An error comes with the node ngtsc reports it on. +#[expect(clippy::too_many_arguments)] +fn decorator_query<'a>( + allocator: &'a Allocator, + consts: &super::StringConsts<'a>, + evaluator: &super::evaluator::Evaluator<'_, 'a>, + name: &str, + args: &'a [Argument<'a>], + span: Span, + property_name: &str, + source_text: Option<&'a str>, +) -> Result, (String, Span)> { + use super::evaluator::Value; + let Some(first) = args.first().and_then(Argument::as_expression) else { + return Err((format!("@{name} must have arguments"), span)); + }; + let node = try_unwrap_forward_ref(first, Some(consts)).unwrap_or(first); + let at_node = |message: String| (message, node.span()); + let predicate = match evaluator.evaluate(node) { + Value::Reference { .. } | Value::Dynamic | Value::Function(_) => { + let expr = convert_oxc_expression(allocator, node, source_text) + .ok_or_else(|| at_node(format!("@{name} predicate cannot be interpreted")))?; + QueryPredicate::Type(expr) + } + Value::String(s) => { + let mut selectors = Vec::new_in(&allocator); + selectors.push(Ident::from(allocator.alloc_str(&s))); + QueryPredicate::Selectors(selectors) + } + Value::Array(items) => { + let mut selectors = Vec::new_in(&allocator); + for (i, item) in items.iter().enumerate() { + let Value::String(s) = item else { + return Err(at_node(super::decorator::value_error( + &format!("@{name} predicate"), + || { + format!( + "Failed to resolve @{name} predicate at position {i} to a string" + ) + }, + item, + ))); + }; + selectors.push(Ident::from(allocator.alloc_str(s))); + } + QueryPredicate::Selectors(selectors) + } + other => { + return Err(at_node(format!( + "@{name} predicate cannot be interpreted{}", + other.wrong_type_suffix() + ))); + } + }; + + let mut config = QueryConfig::default_for(name); + if args.len() == 2 { + let options = args[1].as_expression().map(unwrap_expression); + let Some(Expression::ObjectExpression(options)) = options else { + let span = options.map_or(args[1].span(), GetSpan::span); + return Err((format!("@{name} options must be an object literal"), span)); + }; + for (key, value) in reflect_object_literal(options) { + // ngtsc reports a bad `static` on the predicate, the others on their value. + let flag = |option: &str, span: Span| match evaluator.evaluate(value) { + Value::Bool(b) => Ok(b), + other => Err(( + super::decorator::value_error( + &format!("@{name} options.{option}"), + || format!("@{name} options.{option} must be a boolean"), + &other, + ), + span, + )), + }; + match key.as_str() { + "read" => config.read = convert_oxc_expression(allocator, value, source_text), + "descendants" => config.descendants = flag("descendants", value.span())?, + "emitDistinctChangesOnly" => { + config.emit_distinct_changes_only = + flag("emitDistinctChangesOnly", value.span())?; + } + "static" => config.is_static = flag("static", node.span())?, + _ => {} + } + } + } else if args.len() > 2 { + return Err(at_node(format!("@{name} has too many arguments"))); + } + + Ok(R3QueryMetadata { + property_name: Ident::from(allocator.alloc_str(property_name)), + first: name == "ViewChild" || name == "ContentChild", + predicate, + descendants: config.descendants, + emit_distinct_changes_only: config.emit_distinct_changes_only, + read: config.read, + is_static: config.is_static, + is_signal: false, + }) +} + #[cfg(test)] mod tests { use super::*; diff --git a/crates/oxc_angular_compiler/src/lib.rs b/crates/oxc_angular_compiler/src/lib.rs index 1ac650c5b..4e9375622 100644 --- a/crates/oxc_angular_compiler/src/lib.rs +++ b/crates/oxc_angular_compiler/src/lib.rs @@ -111,9 +111,11 @@ pub use directive::{ DirectiveCompileResult, DirectiveDefinitions, QueryPredicate, R3DirectiveMetadata, R3DirectiveMetadataBuilder, R3HostDirectiveMetadata, R3HostMetadata, R3InputMetadata, R3QueryMetadata, StringConsts, collect_string_consts, compile_directive, - compile_directive_from_metadata, extract_content_queries, extract_directive_metadata, - extract_host_bindings, extract_host_listeners, extract_input_metadata, extract_output_metadata, - extract_view_queries, find_directive_decorator_span, generate_directive_definitions, + compile_directive_from_metadata, extract_class_queries, extract_content_queries, + extract_directive_metadata, extract_host_bindings, extract_host_listeners, + extract_input_metadata, extract_input_metadata_in, extract_output_metadata, + extract_output_metadata_in, extract_view_queries, find_directive_decorator_span, + generate_directive_definitions, }; // Re-export injectable types diff --git a/crates/oxc_angular_compiler/tests/decorator_metadata_ngtsc_test.rs b/crates/oxc_angular_compiler/tests/decorator_metadata_ngtsc_test.rs index a0d5987eb..41ab4d0c2 100644 --- a/crates/oxc_angular_compiler/tests/decorator_metadata_ngtsc_test.rs +++ b/crates/oxc_angular_compiler/tests/decorator_metadata_ngtsc_test.rs @@ -299,7 +299,7 @@ fn decorator_metadata_matches_ngtsc() { failures.len(), failures.join("\n\n") ); - assert_eq!(compared, 575, "fixtures compared"); + assert_eq!(compared, 754, "fixtures compared"); } fn transform(source: &str) -> TransformResult { @@ -660,6 +660,36 @@ export class Dir {{ value = {initializer}; }} } } +/// The same for a signal query also declared in `queries:`: ngtsc 22.1.7 +/// reports it only for Angular's `viewChild()`, `contentChild()`, ... (the +/// snapshot's `initializerApi-viewChild*` probes), and compiles these, whose +/// functions aren't Angular's. oxc still compiles such a member as a signal +/// query too (it recognises them by name), so these compare only the +/// diagnostics. +#[test] +fn only_angular_signal_queries_collide_with_decorator_queries() { + let cases = [ + ("import {viewChild} from './other';", "viewChild('x')", "ViewChild"), + ("import * as other from './other';", "other.viewChild('x')", "ViewChild"), + ( + "function contentChild(x: string): any { return null; }", + "contentChild('x')", + "ContentChild", + ), + ]; + for (declaration, initializer, query) in cases { + let source = format!( + "import {{Directive, {query}}} from '@angular/core'; +{declaration} +@Directive({{selector: '[d]', queries: {{foo: new {query}('x')}}}}) +export class Dir {{ foo = {initializer}; }} +" + ); + let result = transform(&source); + assert_eq!(errors(&result, &source), vec![], "{declaration} {initializer}"); + } +} + /// Inputs ngtsc can't compile either (it overflows its stack on the recursive /// ones and on a chain of 3000 consts) must not overflow oxc's stack or hang. #[test] @@ -926,7 +956,14 @@ export class Cmp { let foreign = "import {Component} from '@angular/core'; import * as NS from 'foreign-decorators'; @Component({selector: 'c', template: '
'})"; - for (header, compiled) in [(core, true), (foreign, false)] { + let core_directive = "import * as NS from '@angular/core'; +@NS.Directive({selector: '[d]'})"; + let foreign_directive = "import {Directive} from '@angular/core'; +import * as NS from 'foreign-decorators'; +@Directive({selector: '[d]'})"; + for (header, compiled) in + [(core, true), (foreign, false), (core_directive, true), (foreign_directive, false)] + { let code = transform(&format!("{header}{members}")).code; for part in ["viewQuery", "ɵɵclassProp(\"a\"", "ɵɵlistener(\"click\""] { assert_eq!(code.contains(part), compiled, "{part} in\n{code}"); @@ -961,3 +998,143 @@ export class Cmp { assert!(code.contains(r#"inputs:{x:"x"}"#), "{}", result.code); assert!(code.contains(r#"outputs:{y:"y"}"#), "{}", result.code); } + +/// The same through the extraction API (what the NAPI +/// `extractComponentMetadataSync` reports): given the file, `@NS.Input()` and +/// friends count only for a namespace import of `@angular/core`; without it, +/// none do. +#[test] +fn namespaced_member_decorators_through_the_extraction_api() { + use oxc_angular_compiler::{ + collect_string_consts, extract_class_queries, extract_input_metadata, + extract_input_metadata_in, extract_output_metadata_in, + }; + use oxc_ast::ast::{Declaration, Statement}; + let members = " +export class Cmp { + @NS.Input() value!: string; + @NS.Output() changed: any; + @NS.ViewChild('ref') ref: any; +} +"; + for (module, extracted) in [("@angular/core", 1), ("foreign-decorators", 0)] { + let source = format!("import * as NS from '{module}';\n{members}"); + let allocator = Allocator::default(); + let program = oxc_parser::Parser::new(&allocator, &source, oxc_span::SourceType::ts()) + .parse() + .program; + let program = allocator.alloc(program); + let class = program + .body + .iter() + .find_map(|stmt| match stmt { + Statement::ExportDeclaration(export) => match &export.declaration { + Declaration::ClassDeclaration(class) => Some(class.as_ref()), + _ => None, + }, + _ => None, + }) + .unwrap(); + let consts = collect_string_consts(&allocator, program); + let inputs = extract_input_metadata_in(&allocator, class, Some(&source), Some(&consts)); + let outputs = extract_output_metadata_in(&allocator, class, Some(&consts)); + let (view, _) = extract_class_queries(&allocator, class, Some(&source), &consts); + assert_eq!((inputs.len(), outputs.len(), view.len()), (extracted, extracted, extracted)); + // Without the file's imports no namespace is known to be Angular's. + assert!(extract_input_metadata(&allocator, class, Some(&source)).is_empty()); + } +} + +/// Query values imported from another file: ngtsc 22.1.7 reads the file +/// and compiles all of these (`probe: queries-imported*`, with +/// `export const FLAG = true; export const SELS = ['a', 'b']; export const SEL +/// = 'b';` in `./flags`). oxc can't, and says so rather than reporting +/// ngtsc's wrong-type error for a value it hasn't read. +#[test] +fn imported_query_values_are_reported_as_unreadable() { + let cases = [ + ( + "new ContentChildren('el', {descendants: FLAG})", + "@ContentChildren options.descendants", + "FLAG", + "FLAG", + ), + ("new ViewChild('el', {static: FLAG})", "@ViewChild options.static", "FLAG", "'el'"), + ( + "new ContentChildren('el', {emitDistinctChangesOnly: FLAG})", + "@ContentChildren options.emitDistinctChangesOnly", + "FLAG", + "FLAG", + ), + ( + "new ContentChildren('el', {descendants: flags.FLAG})", + "@ContentChildren options.descendants", + "FLAG", + "flags.FLAG", + ), + ("new ViewChild([...SELS])", "@ViewChild predicate", "SELS", "[...SELS]"), + ("new ViewChild(['a', SEL])", "@ViewChild predicate", "SEL", "['a', SEL]"), + ("new ViewChild(['a', flags.SEL])", "@ViewChild predicate", "SEL", "['a', flags.SEL]"), + ]; + for (query, subject, name, span) in cases { + let source = format!( + "import {{Component, ViewChild, ContentChildren}} from '@angular/core'; +import {{FLAG, SELS, SEL}} from './flags'; +import * as flags from './flags'; +@Component({{selector: 'c', template: '', queries: {{el: {query}}}}}) +export class Cmp {{ + el: any; +}} +" + ); + let message = format!( + "{subject} depends on '{name}', which is imported from another module. \ + OXC compiles one file at a time and cannot evaluate values from other files." + ); + assert_eq!( + errors(&transform(&source), &source), + vec![(message, span.to_string())], + "{query}" + ); + } + + // The same options on member decorators, read by the same code as ngtsc + // does (`probe: queries-member-*`; ngtsc 22.1.7 compiles these with + // `export const FLAG = false` in the other file). + let cases = [ + ( + "@ViewChildren('el', {emitDistinctChangesOnly: FLAG})", + "@ViewChildren options.emitDistinctChangesOnly", + "FLAG", + ), + ( + "@ContentChildren('el', {descendants: flags.FLAG})", + "@ContentChildren options.descendants", + "flags.FLAG", + ), + ("@ViewChild('el', {static: FLAG})", "@ViewChild options.static", "'el'"), + ("@ContentChild(['a', SEL])", "@ContentChild predicate", "['a', SEL]"), + ]; + for (decorator, subject, span) in cases { + let source = format!( + "import {{Component, ViewChild, ViewChildren, ContentChild, ContentChildren}} from '@angular/core'; +import {{FLAG, SEL}} from './flags'; +import * as flags from './flags'; +@Component({{selector: 'c', template: ''}}) +export class Cmp {{ + {decorator} el: any; +}} +" + ); + let name = if subject.ends_with("predicate") { "SEL" } else { "FLAG" }; + let message = format!( + "{subject} depends on '{name}', which is imported from another module. \ + OXC compiles one file at a time and cannot evaluate values from other files." + ); + assert_eq!( + errors(&transform(&source), &source), + vec![(message, span.to_string())], + "{decorator}" + ); + } +} diff --git a/crates/oxc_angular_compiler/tests/fixtures/decorator_metadata_ngtsc.json b/crates/oxc_angular_compiler/tests/fixtures/decorator_metadata_ngtsc.json index 94c50db12..acfbb4dee 100644 --- a/crates/oxc_angular_compiler/tests/fixtures/decorator_metadata_ngtsc.json +++ b/crates/oxc_angular_compiler/tests/fixtures/decorator_metadata_ngtsc.json @@ -26,6 +26,39 @@ "dtsImports": [], "diagnosticSpans": [] }, + { + "name": "ngtsc_spec: should throw error if @Directive.queries field has wrong type", + "origin": "packages/compiler-cli/test/ngtsc/ngtsc_spec.ts", + "files": { + "test.ts": "\n import {Directive} from '@angular/core';\n\n @Directive({\n selector: 'test-dir',\n // @ts-ignore\n queries: 'invalid-queries-type'\n })\n export class TestDir {}\n " + }, + "diagnostics": ["Decorator queries metadata must be an object literal"], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[157, 179]] + }, + { + "name": "ngtsc_spec: should throw error if @Directive.queries object has incorrect values", + "origin": "packages/compiler-cli/test/ngtsc/ngtsc_spec.ts", + "files": { + "test.ts": "\n import {Directive} from '@angular/core';\n\n @Directive({\n selector: 'test-dir',\n queries: {\n myViewQuery: 'invalid-query-type'\n }\n })\n export class TestDir {}\n " + }, + "diagnostics": ["Decorator query metadata must be an instance of a query type"], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[131, 194]] + }, + { + "name": "ngtsc_spec: should throw error if @Directive.queries object has incorrect values (refs to other decorators)", + "origin": "packages/compiler-cli/test/ngtsc/ngtsc_spec.ts", + "files": { + "test.ts": "\n import {Directive, Input} from '@angular/core';\n\n @Directive({\n selector: 'test-dir',\n queries: {\n myViewQuery: new Input()\n }\n })\n export class TestDir {}\n " + }, + "diagnostics": ["Decorator query metadata must be an instance of a query type"], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[154, 216]] + }, { "name": "ngtsc_spec: should produce a diagnostic if the transform value is not a function", "origin": "packages/compiler-cli/test/ngtsc/ngtsc_spec.ts", @@ -190,6 +223,53 @@ "dtsImports": [], "diagnosticSpans": [] }, + { + "name": "ngtsc_spec: should generate queries for components", + "origin": "packages/compiler-cli/test/ngtsc/ngtsc_spec.ts", + "files": { + "test.ts": "\n import {Component, ContentChild, ContentChildren, TemplateRef, ViewChild} from '@angular/core';\n\n @Component({\n selector: 'test',\n template: '
',\n queries: {\n 'mview': new ViewChild('test1'),\n 'mcontent': new ContentChild('test2'),\n }\n })\n class FooCmp {\n @ContentChild('bar', {read: TemplateRef}) child: any;\n @ContentChildren(TemplateRef) children: any;\n get aview(): any { return null; }\n @ViewChild('accessor') set aview(value: any) {}\n }\n " + }, + "diagnostics": [], + "classes": { + "FooCmp": { + "contentQueries": "{if(rf&1){i0.ɵɵcontentQuery(dirIndex,[\"bar\"],5,TemplateRef)(dirIndex,TemplateRef,4)(dirIndex,[\"test2\"],5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.child=_t.first);i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.children=_t);i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.mcontent=_t.first);}}", + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery([\"accessor\"],5)([\"test1\"],5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.aview=_t.first);i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.mview=_t.first);}}" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "ngtsc_spec: should generate queries for directives", + "origin": "packages/compiler-cli/test/ngtsc/ngtsc_spec.ts", + "files": { + "test.ts": "\n import {Directive, ContentChild, ContentChildren, TemplateRef, ViewChild} from '@angular/core';\n import * as core from '@angular/core';\n\n @Directive({\n selector: '[test]',\n queries: {\n 'mview': new ViewChild('test1'),\n 'mcontent': new core.ContentChild('test2'),\n }\n })\n class FooCmp {\n @ContentChild('bar', {read: TemplateRef}) child: any;\n @ContentChildren(TemplateRef) children: any;\n get aview(): any { return null; }\n @ViewChild('accessor') set aview(value: any) {}\n }\n " + }, + "diagnostics": [], + "classes": { + "FooCmp": { + "contentQueries": "{if(rf&1){i0.ɵɵcontentQuery(dirIndex,[\"bar\"],5,TemplateRef)(dirIndex,TemplateRef,4)(dirIndex,[\"test2\"],5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.child=_t.first);i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.children=_t);i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.mcontent=_t.first);}}", + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery([\"accessor\"],5)([\"test1\"],5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.aview=_t.first);i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.mview=_t.first);}}" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "ngtsc_spec: should handle queries that use forwardRef", + "origin": "packages/compiler-cli/test/ngtsc/ngtsc_spec.ts", + "files": { + "test.ts": "\n import {Component, ContentChild, TemplateRef, ViewContainerRef, forwardRef} from '@angular/core';\n\n @Component({\n selector: 'test',\n template: '
',\n })\n class FooCmp {\n @ContentChild(forwardRef(() => TemplateRef)) child: any;\n\n @ContentChild(forwardRef(function() { return ViewContainerRef; })) child2: any;\n\n @ContentChild((forwardRef((function() { return 'parens'; }) as any))) childInParens: any;\n }\n " + }, + "diagnostics": [], + "classes": { + "FooCmp": { + "contentQueries": "{if(rf&1){i0.ɵɵcontentQuery(dirIndex,TemplateRef,5)(dirIndex,ViewContainerRef,5)(dirIndex,[\"parens\"],5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.child=_t.first);i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.child2=_t.first);i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.childInParens=_t.first);}}" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, { "name": "ngtsc_spec: should handle queries that use an InjectionToken", "origin": "packages/compiler-cli/test/ngtsc/ngtsc_spec.ts", @@ -349,6 +429,43 @@ "dtsImports": [], "diagnosticSpans": [[160, 182]] }, + { + "name": "authoring_queries_spec: should report an error when declared in @Directive metadata", + "origin": "packages/compiler-cli/test/ngtsc/authoring_queries_spec.ts", + "files": { + "test.ts": "\n import {Directive, ViewChild, viewChild} from '@angular/core';\n\n @Directive({\n selector: 'test',\n queries: {\n el: new ViewChild('myLocator'),\n },\n })\n export class TestDir {\n el = viewChild('myLocator');\n }\n " + }, + "diagnostics": [ + "Query is declared multiple times. \"@Directive\" declares a query for the same property." + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[159, 185]] + }, + { + "name": "authoring_queries_spec: should report an error when declared in @Component metadata", + "origin": "packages/compiler-cli/test/ngtsc/authoring_queries_spec.ts", + "files": { + "test.ts": "\n import {Component, ViewChild, viewChild} from '@angular/core';\n\n @Component({\n selector: 'test',\n template: '',\n queries: {\n el: new ViewChild('myLocator'),\n },\n })\n export class TestComp {\n el = viewChild('myLocator');\n }\n " + }, + "diagnostics": [ + "Query is declared multiple times. \"@Component\" declares a query for the same property." + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[183, 209]] + }, + { + "name": "authoring_queries_spec: should report an error when a signal-based query function is used in metadata", + "origin": "packages/compiler-cli/test/ngtsc/authoring_queries_spec.ts", + "files": { + "test.ts": "\n import {Component, viewChild} from '@angular/core';\n\n @Component({\n selector: 'test',\n template: '',\n queries: {\n // @ts-ignore\n el: new viewChild('myLocator'),\n },\n })\n export class TestComp {}\n " + }, + "diagnostics": ["Decorator query metadata must be an instance of a query type"], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[164, 253]] + }, { "name": "compliance/r3_view_compiler_bindings/order_bindings", "origin": "packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_bindings/order_bindings.ts", @@ -1089,1287 +1206,1142 @@ "diagnosticSpans": [[158, 175]] }, { - "name": "probe: resolve-fnMultiStmt", - "origin": "probe", - "files": { - "test.ts": "import {Directive, Input} from \"@angular/core\";\nfunction mk() { const x = [\"w\"]; return x; }\n@Directive({selector: \"[d]\", inputs: mk()})\nexport class Dir { w: any; a: any; }\n" - }, - "diagnostics": [ - "Failed to resolve @Directive.inputs to an array Value could not be determined statically." - ], - "classes": {}, - "dtsImports": [], - "diagnosticSpans": [[130, 134]] - }, - { - "name": "probe: resolve-arrowConstFn", - "origin": "probe", - "files": { - "test.ts": "import {Directive, Input} from \"@angular/core\";\nconst mk = () => [\"w\"];\n@Directive({selector: \"[d]\", inputs: mk()})\nexport class Dir { w: any; a: any; }\n" - }, - "diagnostics": [ - "Failed to resolve @Directive.inputs to an array Value could not be determined statically." - ], - "classes": {}, - "dtsImports": [], - "diagnosticSpans": [[109, 113]] - }, - { - "name": "probe: resolve-letArr", + "name": "probe: queries-qBasic", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from \"@angular/core\";\nlet INPUTS = [\"w\"];\n@Directive({selector: \"[d]\", inputs: INPUTS})\nexport class Dir { w: any; a: any; }\n" + "test.ts": "import {Directive, Component, Input, ViewChild, ViewChildren, ContentChild, ContentChildren, TemplateRef, ElementRef, forwardRef, viewChild} from \"@angular/core\";\nimport * as core from \"@angular/core\";\n\n@Directive({selector: \"[d]\", queries: {a: new ViewChild(\"x\"), b: new ViewChildren(TemplateRef, {read: ElementRef}), c: new ContentChild(\"y\", {descendants: false, static: true}), d: new ContentChildren(TemplateRef, {descendants: true, emitDistinctChangesOnly: false})}})\nexport class Dir { }\n" }, "diagnostics": [], "classes": { "Dir": { - "inputs": "{w:\"w\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "contentQueries": "{if(rf&1){i0.ɵɵcontentQuery(dirIndex,[\"y\"],6)(dirIndex,TemplateRef,1);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.c=_t.first);i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.d=_t);}}", + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery([\"x\"],5)(TemplateRef,5,ElementRef);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.a=_t.first);i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.b=_t);}}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [], "diagnosticSpans": [] }, { - "name": "probe: resolve-varArr", + "name": "probe: queries-qOrderWithFields", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from \"@angular/core\";\nvar INPUTS = [\"w\"];\n@Directive({selector: \"[d]\", inputs: INPUTS})\nexport class Dir { w: any; a: any; }\n" + "test.ts": "import {Directive, Component, Input, ViewChild, ViewChildren, ContentChild, ContentChildren, TemplateRef, ElementRef, forwardRef, viewChild} from \"@angular/core\";\nimport * as core from \"@angular/core\";\n\n@Directive({selector: \"[d]\", queries: {mc: new ContentChild(\"m\"), mv: new ViewChild(\"mv\")}})\nexport class Dir { @ContentChild(\"f\") fc: any; @ViewChild(\"fv\") fv: any; @ContentChildren(\"g\") gc: any; }\n" }, "diagnostics": [], "classes": { "Dir": { - "inputs": "{w:\"w\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "contentQueries": "{if(rf&1){i0.ɵɵcontentQuery(dirIndex,[\"f\"],5)(dirIndex,[\"g\"],4)(dirIndex,[\"m\"],5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.fc=_t.first);i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.gc=_t);i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.mc=_t.first);}}", + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery([\"fv\"],5)([\"mv\"],5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.fv=_t.first);i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.mv=_t.first);}}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [], "diagnosticSpans": [] }, { - "name": "probe: resolve-letStrElem", + "name": "probe: queries-qNs", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from \"@angular/core\";\nlet S = \"w\";\n@Directive({selector: \"[d]\", inputs: [S]})\nexport class Dir { w: any; a: any; }\n" + "test.ts": "import {Directive, Component, Input, ViewChild, ViewChildren, ContentChild, ContentChildren, TemplateRef, ElementRef, forwardRef, viewChild} from \"@angular/core\";\nimport * as core from \"@angular/core\";\n\n@Directive({selector: \"[d]\", queries: {a: new core.ViewChild(\"x\")}})\nexport class Dir { }\n" }, "diagnostics": [], "classes": { "Dir": { - "inputs": "{w:\"w\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery([\"x\"],5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.a=_t.first);}}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [], "diagnosticSpans": [] }, { - "name": "probe: resolve-transformIndexed", - "origin": "probe", - "files": { - "test.ts": "import {Directive, Input} from \"@angular/core\";\n\n@Directive({selector: \"[d]\"})\nexport class Dir { @Input({transform: [(v: string) => 1][0]}) v: any; }\n" - }, - "diagnostics": [ - "Input transform must be a function Value could not be determined statically." - ], - "classes": {}, - "dtsImports": [], - "diagnosticSpans": [[117, 138]] - }, - { - "name": "probe: resolve-transformCondArrow", - "origin": "probe", - "files": { - "test.ts": "import {Directive, Input} from \"@angular/core\";\n\n@Directive({selector: \"[d]\"})\nexport class Dir { @Input({transform: true ? (v: string) => 1 : null}) v: any; }\n" - }, - "diagnostics": [ - "Input transform must be a function Value could not be determined statically." - ], - "classes": {}, - "dtsImports": [], - "diagnosticSpans": [[117, 147]] - }, - { - "name": "probe: resolve-transformParen", - "origin": "probe", - "files": { - "test.ts": "import {Directive, Input} from \"@angular/core\";\n\n@Directive({selector: \"[d]\"})\nexport class Dir { @Input({transform: ((v: string) => 1)}) v: any; }\n" - }, - "diagnostics": [ - "Input transform must be a function Value could not be determined statically." - ], - "classes": {}, - "dtsImports": [], - "diagnosticSpans": [[117, 135]] - }, - { - "name": "probe: resolve-transformAs", + "name": "probe: queries-qStrArr", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from \"@angular/core\";\n\n@Directive({selector: \"[d]\"})\nexport class Dir { @Input({transform: ((v: string) => 1) as any}) v: any; }\n" + "test.ts": "import {Directive, Component, Input, ViewChild, ViewChildren, ContentChild, ContentChildren, TemplateRef, ElementRef, forwardRef, viewChild} from \"@angular/core\";\nimport * as core from \"@angular/core\";\n\n@Directive({selector: \"[d]\", queries: {a: new ViewChildren([\"x\", \"y\"])}})\nexport class Dir { }\n" }, - "diagnostics": [ - "Input transform must be a function Value could not be determined statically." - ], - "classes": {}, - "dtsImports": [], - "diagnosticSpans": [[117, 142]] - }, - { - "name": "probe: resolve-transformObjInline", - "origin": "probe", - "files": { - "test.ts": "import {Directive, Input} from \"@angular/core\";\n\n@Directive({selector: \"[d]\"})\nexport class Dir { @Input({transform: ({f: (v: string) => 1}).f}) v: any; }\n" + "diagnostics": [], + "classes": { + "Dir": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery([\"x\",\"y\"],5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.a=_t);}}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } }, - "diagnostics": [ - "Input transform must be a function Value could not be determined statically." - ], - "classes": {}, "dtsImports": [], - "diagnosticSpans": [[117, 142]] + "diagnosticSpans": [] }, { - "name": "probe: resolve-inputsTplName", + "name": "probe: queries-qCommaStr", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from \"@angular/core\";\nconst P = \"w\";\n@Directive({selector: \"[d]\", inputs: [`${P}`]})\nexport class Dir { w: any; a: any; }\n" + "test.ts": "import {Directive, Component, Input, ViewChild, ViewChildren, ContentChild, ContentChildren, TemplateRef, ElementRef, forwardRef, viewChild} from \"@angular/core\";\nimport * as core from \"@angular/core\";\n\n@Directive({selector: \"[d]\", queries: {a: new ViewChildren(\"x, y\")}})\nexport class Dir { }\n" }, "diagnostics": [], "classes": { "Dir": { - "inputs": "{w:\"w\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery([\"x\",\"y\"],5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.a=_t);}}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [], "diagnosticSpans": [] }, { - "name": "probe: resolve-inputsNameViaConst", + "name": "probe: queries-qConstStr", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from \"@angular/core\";\nconst N = \"w\";\n@Directive({selector: \"[d]\", inputs: [{name: N, alias: `x${N}`}]})\nexport class Dir { w: any; a: any; }\n" + "test.ts": "import {Directive, Component, Input, ViewChild, ViewChildren, ContentChild, ContentChildren, TemplateRef, ElementRef, forwardRef, viewChild} from \"@angular/core\";\nimport * as core from \"@angular/core\";\nconst S = \"sel\";\n@Directive({selector: \"[d]\", queries: {a: new ViewChild(S)}})\nexport class Dir { }\n" }, "diagnostics": [], "classes": { "Dir": { - "inputs": "{w:[0,\"xw\",\"w\"]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery([\"sel\"],5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.a=_t.first);}}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [], "diagnosticSpans": [] }, { - "name": "probe: resolve-inputsHole", - "origin": "probe", - "files": { - "test.ts": "import {Directive, Input} from \"@angular/core\";\n\n@Directive({selector: \"[d]\", inputs: [\"w\", , \"a\"]})\nexport class Dir { w: any; a: any; }\n" - }, - "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." - ], - "classes": {}, - "dtsImports": [], - "diagnosticSpans": [[86, 98]] - }, - { - "name": "probe: basic-all-forms", + "name": "probe: queries-qForwardRef", "origin": "probe", "files": { - "test.ts": "import { Component, Directive, Input, Output, EventEmitter, input } from '@angular/core';\n\nexport function bool(v: unknown): boolean { return v === '' || v === true; }\n\n@Directive({\n selector: 'a',\n inputs: ['x', 'legacy: legacyAlias', { name: 'y', alias: 'why', transform: bool }, { name: 'r', required: true }, { name: 'z' }],\n outputs: ['ev', 'ev2: evAlias'],\n})\nexport class A {\n x?: string; legacy?: string; y?: boolean; r!: string; z?: string;\n ev = new EventEmitter(); ev2 = new EventEmitter();\n}\n\n@Directive({ inputs: ['baseIn', { name: 'baseT', alias: 'bt', transform: bool }], outputs: ['baseOut: bo'] })\nexport abstract class B {\n @Input() p?: string;\n @Input({ alias: 'q-q', transform: bool }) q?: boolean;\n baseIn?: string; baseT?: boolean; baseOut = new EventEmitter();\n}\n\n@Directive({ selector: 'c' })\nexport class C extends B {}\n\n@Component({\n selector: 'd',\n template: '',\n inputs: ['x', 'legacy: legacyAlias', { name: 'y', alias: 'why', transform: bool }, { name: 'r', required: true }],\n outputs: ['ev', 'ev2: evAlias'],\n})\nexport class D extends B {\n @Input('overridden') x?: string;\n sig = input();\n legacy?: string; y?: boolean; r!: string;\n ev = new EventEmitter(); ev2 = new EventEmitter();\n}\n" + "test.ts": "import {Directive, Component, Input, ViewChild, ViewChildren, ContentChild, ContentChildren, TemplateRef, ElementRef, forwardRef, viewChild} from \"@angular/core\";\nimport * as core from \"@angular/core\";\nexport class T {}\n@Directive({selector: \"[d]\", queries: {a: new ContentChild(forwardRef(() => T))}})\nexport class Dir { }\n" }, "diagnostics": [], "classes": { - "A": { - "inputs": "{x:\"x\",legacy:[0,\"legacyAlias\",\"legacy\"],y:[2,\"why\",\"y\",bool],r:\"r\",z:\"z\"}", - "outputs": "{ev:\"ev\",ev2:\"evAlias\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;", - "dts:ngAcceptInputType_y": "staticngAcceptInputType_y:unknown;" - }, - "B": { - "inputs": "{baseIn:\"baseIn\",baseT:[2,\"bt\",\"baseT\",bool],p:\"p\",q:[2,\"q-q\",\"q\",bool]}", - "outputs": "{baseOut:\"bo\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;", - "dts:ngAcceptInputType_baseT": "staticngAcceptInputType_baseT:unknown;", - "dts:ngAcceptInputType_q": "staticngAcceptInputType_q:unknown;" - }, - "C": { - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - }, - "D": { - "inputs": "{x:[0,\"overridden\",\"x\"],legacy:[0,\"legacyAlias\",\"legacy\"],y:[2,\"why\",\"y\",bool],r:\"r\",sig:[1,\"sig\"]}", - "outputs": "{ev:\"ev\",ev2:\"evAlias\"}", - "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;", - "dts:ngAcceptInputType_y": "staticngAcceptInputType_y:unknown;" + "Dir": { + "contentQueries": "{if(rf&1){i0.ɵɵcontentQuery(dirIndex,T,5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.a=_t.first);}}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [], "diagnosticSpans": [] }, { - "name": "probe: review-duplicateMetadataEntries", + "name": "probe: queries-qViewDescFalse", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]', inputs: ['a', 'b', 'a: c'], outputs: ['o', 'p', 'o: q']})\nexport class Dir { a: any; b: any; o: any; p: any; }" + "test.ts": "import {Directive, Component, Input, ViewChild, ViewChildren, ContentChild, ContentChildren, TemplateRef, ElementRef, forwardRef, viewChild} from \"@angular/core\";\nimport * as core from \"@angular/core\";\n\n@Directive({selector: \"[d]\", queries: {a: new ViewChild(\"x\", {descendants: false})}})\nexport class Dir { }\n" }, "diagnostics": [], "classes": { "Dir": { - "inputs": "{a:[0,\"c\",\"a\"],b:\"b\"}", - "outputs": "{o:\"q\",p:\"p\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery([\"x\"],4);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.a=_t.first);}}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [], "diagnosticSpans": [] }, { - "name": "probe: review-extraColonSegments", + "name": "probe: queries-memberViewDescFalse", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]', inputs: ['a: b: c'], outputs: ['o: p: q']})\nexport class Dir { a: any; o: any; }" + "test.ts": "import {Directive, Component, Input, ViewChild, ViewChildren, ContentChild, ContentChildren, TemplateRef, ElementRef, forwardRef, viewChild} from \"@angular/core\";\nimport * as core from \"@angular/core\";\n\n@Directive({selector: \"[d]\"})\nexport class Dir { @ViewChild(\"x\", {descendants: false}) a: any; @ViewChildren(\"y\", {emitDistinctChangesOnly: false}) b: any; }\n" }, "diagnostics": [], "classes": { "Dir": { - "inputs": "{a:[0,\"b\",\"a\"]}", - "outputs": "{o:\"p\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery([\"x\"],4)([\"y\"],1);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.a=_t.first);i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.b=_t);}}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [], "diagnosticSpans": [] }, { - "name": "probe: review-dtsMemberOverridesImportedTransform", + "name": "probe: queries-memberConstSel", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nexport function localFn(v: string) { return 1; }\n@Directive({selector: '[d]', inputs: [{name: 'x', transform: localFn}]})\nexport class Dir { @Input({transform: booleanAttribute}) x: any; }" + "test.ts": "import {Directive, Component, Input, ViewChild, ViewChildren, ContentChild, ContentChildren, TemplateRef, ElementRef, forwardRef, viewChild} from \"@angular/core\";\nimport * as core from \"@angular/core\";\nconst S = \"sel\";\n@Directive({selector: \"[d]\"})\nexport class Dir { @ViewChild(S) a: any; }\n" }, "diagnostics": [], "classes": { "Dir": { - "inputs": "{x:[2,\"x\",\"x\",booleanAttribute]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;", - "dts:ngAcceptInputType_x": "staticngAcceptInputType_x:unknown;" + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery([\"sel\"],5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.a=_t.first);}}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [], "diagnosticSpans": [] }, { - "name": "probe: review-namespacedInput", + "name": "probe: queries-qNotObject", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nimport * as core from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir { @core.Input({transform: null}) v: any; }" + "test.ts": "import {Directive, Component, Input, ViewChild, ViewChildren, ContentChild, ContentChildren, TemplateRef, ElementRef, forwardRef, viewChild} from \"@angular/core\";\nimport * as core from \"@angular/core\";\n\n@Directive({selector: \"[d]\", queries: \"bad\"})\nexport class Dir { }\n" }, - "diagnostics": ["Input transform must be a function Value is of type 'null'."], + "diagnostics": ["Decorator queries metadata must be an object literal"], "classes": {}, "dtsImports": [], - "diagnosticSpans": [[166, 183]] + "diagnosticSpans": [[241, 246]] }, { - "name": "probe: review-aliasedInput", + "name": "probe: queries-qStringValue", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nimport {Input as In} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir { @In({transform: null}) v: any; }" + "test.ts": "import {Directive, Component, Input, ViewChild, ViewChildren, ContentChild, ContentChildren, TemplateRef, ElementRef, forwardRef, viewChild} from \"@angular/core\";\nimport * as core from \"@angular/core\";\n\n@Directive({selector: \"[d]\", queries: {a: \"bad\"}})\nexport class Dir { }\n" }, - "diagnostics": ["Input transform must be a function Value is of type 'null'."], + "diagnostics": ["Decorator query metadata must be an instance of a query type"], "classes": {}, "dtsImports": [], - "skip": "member decorators imported under another name (`import {Input as In}`) are matched by name throughout oxc, so `@In` isn't recognised as `@Input`" + "diagnosticSpans": [[241, 251]] }, { - "name": "probe: review-numberSmall", + "name": "probe: queries-qInput", "origin": "probe", "files": { - "test.ts": "import {Directive} from \"@angular/core\";\n@Directive({selector: \"[d]\", inputs: [`b${1e-7}`]})\nexport class Dir {}" - }, - "diagnostics": [], - "classes": { - "Dir": { - "inputs": "{\"b1e-7\":\"b1e-7\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "test.ts": "import {Directive, Component, Input, ViewChild, ViewChildren, ContentChild, ContentChildren, TemplateRef, ElementRef, forwardRef, viewChild} from \"@angular/core\";\nimport * as core from \"@angular/core\";\n\n@Directive({selector: \"[d]\", queries: {a: new Input()}})\nexport class Dir { }\n" }, + "diagnostics": ["Decorator query metadata must be an instance of a query type"], + "classes": {}, "dtsImports": [], - "diagnosticSpans": [] + "diagnosticSpans": [[241, 257]] }, { - "name": "probe: review-numberLarge", + "name": "probe: queries-qSignalFn", "origin": "probe", "files": { - "test.ts": "import {Directive} from \"@angular/core\";\n@Directive({selector: \"[d]\", inputs: [`d${123456789012345680000}`]})\nexport class Dir {}" + "test.ts": "import {Directive, Component, Input, ViewChild, ViewChildren, ContentChild, ContentChildren, TemplateRef, ElementRef, forwardRef, viewChild} from \"@angular/core\";\nimport * as core from \"@angular/core\";\n\n@Directive({selector: \"[d]\", queries: {a: new (viewChild as any)(\"x\")}})\nexport class Dir { }\n" }, - "diagnostics": [], - "classes": { - "Dir": { - "inputs": "{d123456789012345680000:\"d123456789012345680000\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "diagnostics": ["Decorator query metadata must be an instance of a query type"], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[241, 273]] + }, + { + "name": "probe: queries-qSignalFnBare", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Component, Input, ViewChild, ViewChildren, ContentChild, ContentChildren, TemplateRef, ElementRef, forwardRef, viewChild} from \"@angular/core\";\nimport * as core from \"@angular/core\";\n\n@Directive({selector: \"[d]\", queries: {a: new viewChild(\"x\")}})\nexport class Dir { }\n" }, + "diagnostics": ["Decorator query metadata must be an instance of a query type"], + "classes": {}, "dtsImports": [], - "diagnosticSpans": [] + "diagnosticSpans": [[241, 264]] }, { - "name": "probe: review-numberMicro", + "name": "probe: queries-qCallNotNew", "origin": "probe", "files": { - "test.ts": "import {Directive} from \"@angular/core\";\n@Directive({selector: \"[d]\", inputs: [`e${0.000001}`]})\nexport class Dir {}" + "test.ts": "import {Directive, Component, Input, ViewChild, ViewChildren, ContentChild, ContentChildren, TemplateRef, ElementRef, forwardRef, viewChild} from \"@angular/core\";\nimport * as core from \"@angular/core\";\n\n@Directive({selector: \"[d]\", queries: {a: viewChild(\"x\")}})\nexport class Dir { }\n" }, - "diagnostics": [], - "classes": { - "Dir": { - "inputs": "{\"e0.000001\":\"e0.000001\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "skip": "ngtsc also reports its separate check for signal query functions called outside a member initializer, which oxc doesn't implement" + }, + { + "name": "probe: queries-qNoArgs", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Component, Input, ViewChild, ViewChildren, ContentChild, ContentChildren, TemplateRef, ElementRef, forwardRef, viewChild} from \"@angular/core\";\nimport * as core from \"@angular/core\";\n\n@Directive({selector: \"[d]\", queries: {a: new ViewChild()}})\nexport class Dir { }\n" }, + "diagnostics": ["@ViewChild must have arguments"], + "classes": {}, "dtsImports": [], - "diagnosticSpans": [] + "diagnosticSpans": [[245, 260]] }, { - "name": "probe: review-numberFraction", + "name": "probe: queries-qTooMany", "origin": "probe", "files": { - "test.ts": "import {Directive} from \"@angular/core\";\n@Directive({selector: \"[d]\", inputs: [`f${1.5}`]})\nexport class Dir {}" - }, - "diagnostics": [], - "classes": { - "Dir": { - "inputs": "{\"f1.5\":\"f1.5\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "test.ts": "import {Directive, Component, Input, ViewChild, ViewChildren, ContentChild, ContentChildren, TemplateRef, ElementRef, forwardRef, viewChild} from \"@angular/core\";\nimport * as core from \"@angular/core\";\n\n@Directive({selector: \"[d]\", queries: {a: new ViewChild(\"x\", {}, 1)}})\nexport class Dir { }\n" }, + "diagnostics": ["@ViewChild has too many arguments"], + "classes": {}, "dtsImports": [], - "diagnosticSpans": [] + "diagnosticSpans": [[259, 262]] }, { - "name": "probe: review-infinityGlobal", + "name": "probe: queries-qOptsNotObj", "origin": "probe", "files": { - "test.ts": "import {Directive} from \"@angular/core\";\n@Directive({selector: \"[d]\", inputs: [`c${Infinity}`]})\nexport class Dir {}" + "test.ts": "import {Directive, Component, Input, ViewChild, ViewChildren, ContentChild, ContentChildren, TemplateRef, ElementRef, forwardRef, viewChild} from \"@angular/core\";\nimport * as core from \"@angular/core\";\n\n@Directive({selector: \"[d]\", queries: {a: new ViewChild(\"x\", 1)}})\nexport class Dir { }\n" }, "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." + "@ViewChild options must be an object literal. Find more at https://next.angular.dev/errors/NG1001" ], "classes": {}, "dtsImports": [], - "diagnosticSpans": [[78, 94]] + "diagnosticSpans": [[264, 265]] }, { - "name": "probe: review-nanGlobal", + "name": "probe: queries-qDescNotBool", "origin": "probe", "files": { - "test.ts": "import {Directive} from \"@angular/core\";\n@Directive({selector: \"[d]\", inputs: [`n${NaN}`]})\nexport class Dir {}" + "test.ts": "import {Directive, Component, Input, ViewChild, ViewChildren, ContentChild, ContentChildren, TemplateRef, ElementRef, forwardRef, viewChild} from \"@angular/core\";\nimport * as core from \"@angular/core\";\n\n@Directive({selector: \"[d]\", queries: {a: new ViewChild(\"x\", {descendants: 1})}})\nexport class Dir { }\n" }, "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." + "@ViewChild options.descendants must be a boolean Value is of type 'number'." ], "classes": {}, "dtsImports": [], - "diagnosticSpans": [[78, 89]] + "diagnosticSpans": [[278, 279]] }, { - "name": "probe: review-undefinedKeyword", + "name": "probe: queries-qStaticNotBool", "origin": "probe", "files": { - "test.ts": "import {Directive} from \"@angular/core\";\n@Directive({selector: \"[d]\", inputs: [`u${undefined}`]})\nexport class Dir {}" - }, - "diagnostics": [], - "classes": { - "Dir": { - "inputs": "{uundefined:\"uundefined\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "test.ts": "import {Directive, Component, Input, ViewChild, ViewChildren, ContentChild, ContentChildren, TemplateRef, ElementRef, forwardRef, viewChild} from \"@angular/core\";\nimport * as core from \"@angular/core\";\n\n@Directive({selector: \"[d]\", queries: {a: new ViewChild(\"x\", {static: \"y\"})}})\nexport class Dir { }\n" }, + "diagnostics": ["@ViewChild options.static must be a boolean Value is of type 'string'."], + "classes": {}, "dtsImports": [], - "diagnosticSpans": [] + "diagnosticSpans": [[259, 262]] }, { - "name": "probe: review-numberExponent", + "name": "probe: queries-qEdcoNotBool", "origin": "probe", "files": { - "test.ts": "import {Directive} from \"@angular/core\";\n@Directive({selector: \"[d]\", inputs: [`a: x${1e21}`, `b: y${2.5e300}`]})\nexport class Dir {}" - }, - "diagnostics": [], - "classes": { - "Dir": { - "inputs": "{a:[0,\"x1e+21\",\"a\"],b:[0,\"y2.5e+300\",\"b\"]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "test.ts": "import {Directive, Component, Input, ViewChild, ViewChildren, ContentChild, ContentChildren, TemplateRef, ElementRef, forwardRef, viewChild} from \"@angular/core\";\nimport * as core from \"@angular/core\";\n\n@Directive({selector: \"[d]\", queries: {a: new ViewChild(\"x\", {emitDistinctChangesOnly: 1})}})\nexport class Dir { }\n" }, + "diagnostics": [ + "@ViewChild options.emitDistinctChangesOnly must be a boolean Value is of type 'number'." + ], + "classes": {}, "dtsImports": [], - "diagnosticSpans": [] + "diagnosticSpans": [[290, 291]] }, { - "name": "probe: eval-binaryPlus", + "name": "probe: queries-qPredNum", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: ['a' + '', 'b' + 1, 'c' + true, 'd' + null]})\nexport class Dir {}\n" - }, - "diagnostics": [], - "diagnosticSpans": [], - "classes": { - "Dir": { - "inputs": "{a:\"a\",b1:\"b1\",ctrue:\"ctrue\",dnull:\"dnull\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "test.ts": "import {Directive, Component, Input, ViewChild, ViewChildren, ContentChild, ContentChildren, TemplateRef, ElementRef, forwardRef, viewChild} from \"@angular/core\";\nimport * as core from \"@angular/core\";\n\n@Directive({selector: \"[d]\", queries: {a: new ViewChild(1)}})\nexport class Dir { }\n" }, - "dtsImports": [] + "diagnostics": ["@ViewChild predicate cannot be interpreted Value is of type 'number'."], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[259, 260]] }, { - "name": "probe: eval-binaryArith", + "name": "probe: queries-qPredArrMixed", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: [`x${1 + 2 * 3 - 4 / 2 % 3}`, `y${2 ** 10}`, `z${5 & 3}${5 | 3}${5 ^ 3}${1 << 3}${-16 >> 2}${-16 >>> 28}`]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Component, Input, ViewChild, ViewChildren, ContentChild, ContentChildren, TemplateRef, ElementRef, forwardRef, viewChild} from \"@angular/core\";\nimport * as core from \"@angular/core\";\n\n@Directive({selector: \"[d]\", queries: {a: new ViewChildren([\"x\", 1])}})\nexport class Dir { }\n" }, - "diagnostics": [], - "diagnosticSpans": [], - "classes": { - "Dir": { - "inputs": "{x5:\"x5\",y1024:\"y1024\",\"z1768-415\":\"z1768-415\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "diagnostics": [ + "Failed to resolve @ViewChildren predicate at position 1 to a string Value is of type 'number'." + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[262, 270]] + }, + { + "name": "probe: queries-qSignalCollision", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Component, Input, ViewChild, ViewChildren, ContentChild, ContentChildren, TemplateRef, ElementRef, forwardRef, viewChild} from \"@angular/core\";\nimport * as core from \"@angular/core\";\n\n@Directive({selector: \"[d]\", queries: {el: new ViewChild(\"x\")}})\nexport class Dir { el = viewChild(\"x\"); }\n" }, - "dtsImports": [] + "diagnostics": [ + "Query is declared multiple times. \"@Directive\" declares a query for the same property." + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[246, 264]] }, { - "name": "probe: eval-binaryCompare", + "name": "probe: queries-qSignalCollisionContent", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: [`a${1 < 2}${1 <= 1}${2 > 3}${2 >= 3}${1 == 1}${'1' === '1'}${1 != 2}${1 !== 1}`]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Component, Input, ViewChild, ViewChildren, ContentChild, ContentChildren, TemplateRef, ElementRef, forwardRef, viewChild} from \"@angular/core\";\nimport * as core from \"@angular/core\";\n\n@Directive({selector: \"[d]\", queries: {el: new ContentChild(\"x\"), v: new ViewChild(\"y\")}})\nexport class Dir { el = core.contentChild(\"x\"); v = viewChild(\"y\"); }\n" }, - "diagnostics": [], - "diagnosticSpans": [], - "classes": { - "Dir": { - "inputs": "{atruetruefalsefalsetruetruetruefalse:\"atruetruefalsefalsetruetruetruefalse\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "diagnostics": [ + "Query is declared multiple times. \"@Directive\" declares a query for the same property." + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[246, 267]] + }, + { + "name": "probe: queries-qLocalClass", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Component, Input, ViewChild, ViewChildren, ContentChild, ContentChildren, TemplateRef, ElementRef, forwardRef, viewChild} from \"@angular/core\";\nimport * as core from \"@angular/core\";\nclass ViewChild2 {}\n@Directive({selector: \"[d]\", queries: {a: new ViewChild2(\"x\")}})\nexport class Dir { }\n" }, - "dtsImports": [] + "diagnostics": ["Decorator query metadata must be an instance of a query type"], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[260, 284]] }, { - "name": "probe: eval-conditional", + "name": "probe: queries-qComponent", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nconst C = true;\n@Directive({selector: '[d]', inputs: C ? ['a'] : ['b']})\nexport class Dir {}\n" + "test.ts": "import {Directive, Component, Input, ViewChild, ViewChildren, ContentChild, ContentChildren, TemplateRef, ElementRef, forwardRef, viewChild} from \"@angular/core\";\nimport * as core from \"@angular/core\";\n\n@Component({selector: \"c\", template: \"
\", queries: {v: new ViewChild(\"x\"), c: new ContentChild(\"y\")}})\nexport class Cmp {}\n" }, "diagnostics": [], - "diagnosticSpans": [], "classes": { - "Dir": { - "inputs": "{a:\"a\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "Cmp": { + "contentQueries": "{if(rf&1){i0.ɵɵcontentQuery(dirIndex,[\"y\"],5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.c=_t.first);}}", + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery([\"x\"],5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.v=_t.first);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" } }, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [] }, { - "name": "probe: eval-conditionalFalsy", + "name": "probe: resolve-fnMultiStmt", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nconst C = '';\n@Directive({selector: '[d]', inputs: C ? ['a'] : ['b']})\nexport class Dir {}\n" - }, - "diagnostics": [], - "diagnosticSpans": [], - "classes": { - "Dir": { - "inputs": "{b:\"b\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "test.ts": "import {Directive, Input} from \"@angular/core\";\nfunction mk() { const x = [\"w\"]; return x; }\n@Directive({selector: \"[d]\", inputs: mk()})\nexport class Dir { w: any; a: any; }\n" }, - "dtsImports": [] + "diagnostics": [ + "Failed to resolve @Directive.inputs to an array Value could not be determined statically." + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[130, 134]] }, { - "name": "probe: eval-conditionalDynamic", + "name": "probe: resolve-arrowConstFn", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\ndeclare function f(): boolean;\n@Directive({selector: '[d]', inputs: f() ? ['a'] : ['b']})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from \"@angular/core\";\nconst mk = () => [\"w\"];\n@Directive({selector: \"[d]\", inputs: mk()})\nexport class Dir { w: any; a: any; }\n" }, "diagnostics": [ "Failed to resolve @Directive.inputs to an array Value could not be determined statically." ], - "diagnosticSpans": [[116, 135]], "classes": {}, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [[109, 113]] }, { - "name": "probe: eval-logicalOr", + "name": "probe: resolve-letArr", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nconst N = null;\n@Directive({selector: '[d]', inputs: N || ['a']})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from \"@angular/core\";\nlet INPUTS = [\"w\"];\n@Directive({selector: \"[d]\", inputs: INPUTS})\nexport class Dir { w: any; a: any; }\n" }, "diagnostics": [], - "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{a:\"a\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{w:\"w\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [] }, { - "name": "probe: eval-logicalAnd", + "name": "probe: resolve-varArr", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: ['a'] && ['b']})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from \"@angular/core\";\nvar INPUTS = [\"w\"];\n@Directive({selector: \"[d]\", inputs: INPUTS})\nexport class Dir { w: any; a: any; }\n" }, "diagnostics": [], - "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{b:\"b\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{w:\"w\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [] }, { - "name": "probe: eval-logicalElem", + "name": "probe: resolve-letStrElem", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: [false || 'a', 'b' && 'c', '' || 'd']})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from \"@angular/core\";\nlet S = \"w\";\n@Directive({selector: \"[d]\", inputs: [S]})\nexport class Dir { w: any; a: any; }\n" }, "diagnostics": [], - "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{a:\"a\",c:\"c\",d:\"d\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{w:\"w\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [] }, { - "name": "probe: eval-nullish", + "name": "probe: resolve-transformIndexed", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nconst N = null;\n@Directive({selector: '[d]', inputs: N ?? ['a']})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from \"@angular/core\";\n\n@Directive({selector: \"[d]\"})\nexport class Dir { @Input({transform: [(v: string) => 1][0]}) v: any; }\n" }, "diagnostics": [ - "Failed to resolve @Directive.inputs to an array Value could not be determined statically." + "Input transform must be a function Value could not be determined statically." ], - "diagnosticSpans": [[101, 111]], "classes": {}, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [[117, 138]] }, { - "name": "probe: eval-unary", + "name": "probe: resolve-transformCondArrow", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: [`a${-1}`, `b${+'3'}`, `c${!0}`, `d${~1}`, `e${-'x'}`]})\nexport class Dir {}\n" - }, - "diagnostics": [], - "diagnosticSpans": [], - "classes": { - "Dir": { - "inputs": "{\"a-1\":\"a-1\",b3:\"b3\",ctrue:\"ctrue\",\"d-2\":\"d-2\",eNaN:\"eNaN\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "test.ts": "import {Directive, Input} from \"@angular/core\";\n\n@Directive({selector: \"[d]\"})\nexport class Dir { @Input({transform: true ? (v: string) => 1 : null}) v: any; }\n" }, - "dtsImports": [] + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[117, 147]] }, { - "name": "probe: eval-typeof", + "name": "probe: resolve-transformParen", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: [typeof 'a']})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from \"@angular/core\";\n\n@Directive({selector: \"[d]\"})\nexport class Dir { @Input({transform: ((v: string) => 1)}) v: any; }\n" }, "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." + "Input transform must be a function Value could not be determined statically." ], - "diagnosticSpans": [[85, 97]], "classes": {}, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [[117, 135]] }, { - "name": "probe: eval-void", + "name": "probe: resolve-transformAs", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: [void 0]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from \"@angular/core\";\n\n@Directive({selector: \"[d]\"})\nexport class Dir { @Input({transform: ((v: string) => 1) as any}) v: any; }\n" }, "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." + "Input transform must be a function Value could not be determined statically." ], - "diagnosticSpans": [[85, 93]], "classes": {}, - "dtsImports": [] - }, - { - "name": "probe: eval-tplEnum", - "origin": "probe", - "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nenum E { A = 'x', B = 2 }\nenum N { A, B }\n@Directive({selector: '[d]', inputs: [`a${E.A}`, `b${E.B}`, `c${N.B}`]})\nexport class Dir {}\n" - }, - "diagnostics": [], - "diagnosticSpans": [], - "classes": { - "Dir": { - "inputs": "{ax:\"ax\",b2:\"b2\",c1:\"c1\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } - }, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [[117, 142]] }, { - "name": "probe: eval-enumMember", + "name": "probe: resolve-transformObjInline", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nenum E { A = 'x' }\n@Directive({selector: '[d]', inputs: [E.A]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from \"@angular/core\";\n\n@Directive({selector: \"[d]\"})\nexport class Dir { @Input({transform: ({f: (v: string) => 1}).f}) v: any; }\n" }, "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value is of type 'E'." + "Input transform must be a function Value could not be determined statically." ], - "diagnosticSpans": [[104, 109]], "classes": {}, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [[117, 142]] }, { - "name": "probe: eval-enumMemberBinary", + "name": "probe: resolve-inputsTplName", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nenum E { A = 'x' }\n@Directive({selector: '[d]', inputs: [E.A + '', 'y' + E.A]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from \"@angular/core\";\nconst P = \"w\";\n@Directive({selector: \"[d]\", inputs: [`${P}`]})\nexport class Dir { w: any; a: any; }\n" }, "diagnostics": [], - "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{x:\"x\",yx:\"yx\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{w:\"w\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, - "dtsImports": [] - }, - { - "name": "probe: eval-enumWhole", - "origin": "probe", - "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nenum E { A = 'x' }\n@Directive({selector: '[d]', inputs: E})\nexport class Dir {}\n" - }, - "diagnostics": [ - "Failed to resolve @Directive.inputs to an array Value is of type '{ A: E }'." - ], - "diagnosticSpans": [[104, 105]], - "classes": {}, - "dtsImports": [] - }, - { - "name": "probe: eval-enumMissing", - "origin": "probe", - "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nenum E { A = 'x' }\n@Directive({selector: '[d]', inputs: [E.B]})\nexport class Dir {}\n" - }, - "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value is of type 'undefined'." - ], - "diagnosticSpans": [[104, 109]], - "classes": {}, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [] }, { - "name": "probe: eval-constEnum", + "name": "probe: resolve-inputsNameViaConst", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nconst enum E { A = 'x' }\n@Directive({selector: '[d]', inputs: [`${E.A}`]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from \"@angular/core\";\nconst N = \"w\";\n@Directive({selector: \"[d]\", inputs: [{name: N, alias: `x${N}`}]})\nexport class Dir { w: any; a: any; }\n" }, "diagnostics": [], - "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{x:\"x\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{w:[0,\"xw\",\"w\"]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [] }, { - "name": "probe: eval-enumComputedInit", + "name": "probe: resolve-inputsHole", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nenum E { A = 'x', B = A + 'y' }\n@Directive({selector: '[d]', inputs: [`${E.B}`]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from \"@angular/core\";\n\n@Directive({selector: \"[d]\", inputs: [\"w\", , \"a\"]})\nexport class Dir { w: any; a: any; }\n" }, "diagnostics": [ "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." ], - "diagnosticSpans": [[117, 127]], "classes": {}, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [[86, 98]] }, { - "name": "probe: eval-destructObj", + "name": "probe: basic-all-forms", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nconst {A} = {A: ['a']};\n@Directive({selector: '[d]', inputs: A})\nexport class Dir {}\n" + "test.ts": "import { Component, Directive, Input, Output, EventEmitter, input } from '@angular/core';\n\nexport function bool(v: unknown): boolean { return v === '' || v === true; }\n\n@Directive({\n selector: 'a',\n inputs: ['x', 'legacy: legacyAlias', { name: 'y', alias: 'why', transform: bool }, { name: 'r', required: true }, { name: 'z' }],\n outputs: ['ev', 'ev2: evAlias'],\n})\nexport class A {\n x?: string; legacy?: string; y?: boolean; r!: string; z?: string;\n ev = new EventEmitter(); ev2 = new EventEmitter();\n}\n\n@Directive({ inputs: ['baseIn', { name: 'baseT', alias: 'bt', transform: bool }], outputs: ['baseOut: bo'] })\nexport abstract class B {\n @Input() p?: string;\n @Input({ alias: 'q-q', transform: bool }) q?: boolean;\n baseIn?: string; baseT?: boolean; baseOut = new EventEmitter();\n}\n\n@Directive({ selector: 'c' })\nexport class C extends B {}\n\n@Component({\n selector: 'd',\n template: '',\n inputs: ['x', 'legacy: legacyAlias', { name: 'y', alias: 'why', transform: bool }, { name: 'r', required: true }],\n outputs: ['ev', 'ev2: evAlias'],\n})\nexport class D extends B {\n @Input('overridden') x?: string;\n sig = input();\n legacy?: string; y?: boolean; r!: string;\n ev = new EventEmitter(); ev2 = new EventEmitter();\n}\n" }, "diagnostics": [], - "diagnosticSpans": [], "classes": { - "Dir": { - "inputs": "{a:\"a\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "A": { + "inputs": "{x:\"x\",legacy:[0,\"legacyAlias\",\"legacy\"],y:[2,\"why\",\"y\",bool],r:\"r\",z:\"z\"}", + "outputs": "{ev:\"ev\",ev2:\"evAlias\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;", + "dts:ngAcceptInputType_y": "staticngAcceptInputType_y:unknown;" + }, + "B": { + "inputs": "{baseIn:\"baseIn\",baseT:[2,\"bt\",\"baseT\",bool],p:\"p\",q:[2,\"q-q\",\"q\",bool]}", + "outputs": "{baseOut:\"bo\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;", + "dts:ngAcceptInputType_baseT": "staticngAcceptInputType_baseT:unknown;", + "dts:ngAcceptInputType_q": "staticngAcceptInputType_q:unknown;" + }, + "C": { + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + }, + "D": { + "inputs": "{x:[0,\"overridden\",\"x\"],legacy:[0,\"legacyAlias\",\"legacy\"],y:[2,\"why\",\"y\",bool],r:\"r\",sig:[1,\"sig\"]}", + "outputs": "{ev:\"ev\",ev2:\"evAlias\"}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;", + "dts:ngAcceptInputType_y": "staticngAcceptInputType_y:unknown;" } }, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [] }, { - "name": "probe: eval-destructObjRename", + "name": "probe: review-duplicateMetadataEntries", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nconst {A: B} = {A: ['a']};\n@Directive({selector: '[d]', inputs: B})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]', inputs: ['a', 'b', 'a: c'], outputs: ['o', 'p', 'o: q']})\nexport class Dir { a: any; b: any; o: any; p: any; }" }, "diagnostics": [], - "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{a:\"a\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{a:[0,\"c\",\"a\"],b:\"b\"}", + "outputs": "{o:\"q\",p:\"p\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [] }, { - "name": "probe: eval-destructObjNested", + "name": "probe: review-extraColonSegments", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nconst {A: {B}} = {A: {B: ['a']}};\n@Directive({selector: '[d]', inputs: B})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]', inputs: ['a: b: c'], outputs: ['o: p: q']})\nexport class Dir { a: any; o: any; }" }, "diagnostics": [], - "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{a:\"a\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{a:[0,\"b\",\"a\"]}", + "outputs": "{o:\"p\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [] }, { - "name": "probe: eval-destructArr", + "name": "probe: review-dtsMemberOverridesImportedTransform", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nconst [A, , B] = [['a'], 0, ['b']];\n@Directive({selector: '[d]', inputs: [...A, ...B]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nexport function localFn(v: string) { return 1; }\n@Directive({selector: '[d]', inputs: [{name: 'x', transform: localFn}]})\nexport class Dir { @Input({transform: booleanAttribute}) x: any; }" }, "diagnostics": [], - "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{a:\"a\",b:\"b\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{x:[2,\"x\",\"x\",booleanAttribute]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;", + "dts:ngAcceptInputType_x": "staticngAcceptInputType_x:unknown;" } }, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [] }, { - "name": "probe: eval-destructDefault", + "name": "probe: review-namespacedInput", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nconst {A = ['z']} = {} as any;\n@Directive({selector: '[d]', inputs: A})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nimport * as core from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir { @core.Input({transform: null}) v: any; }" }, - "diagnostics": [ - "Failed to resolve @Directive.inputs to an array Value is of type 'undefined'." - ], - "diagnosticSpans": [[116, 117]], + "diagnostics": ["Input transform must be a function Value is of type 'null'."], "classes": {}, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [[166, 183]] }, { - "name": "probe: eval-destructRestArr", + "name": "probe: review-aliasedInput", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nconst [, ...R] = ['a', 'b', 'c'];\n@Directive({selector: '[d]', inputs: R})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nimport {Input as In} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir { @In({transform: null}) v: any; }" }, - "diagnostics": ["Failed to resolve @Directive.inputs to an array Value is of type 'string'."], - "diagnosticSpans": [[119, 120]], + "diagnostics": ["Input transform must be a function Value is of type 'null'."], "classes": {}, - "dtsImports": [] + "dtsImports": [], + "skip": "member decorators imported under another name (`import {Input as In}`) are matched by name throughout oxc, so `@In` isn't recognised as `@Input`" }, { - "name": "probe: eval-destructRestObj", + "name": "probe: review-numberSmall", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nconst {...R} = {R: ['a']};\n@Directive({selector: '[d]', inputs: R})\nexport class Dir {}\n" + "test.ts": "import {Directive} from \"@angular/core\";\n@Directive({selector: \"[d]\", inputs: [`b${1e-7}`]})\nexport class Dir {}" }, "diagnostics": [], - "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{a:\"a\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{\"b1e-7\":\"b1e-7\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [] }, { - "name": "probe: eval-destructFromConst", + "name": "probe: review-numberLarge", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nconst O = {A: ['a']};\nconst {A} = O;\n@Directive({selector: '[d]', inputs: A})\nexport class Dir {}\n" + "test.ts": "import {Directive} from \"@angular/core\";\n@Directive({selector: \"[d]\", inputs: [`d${123456789012345680000}`]})\nexport class Dir {}" }, "diagnostics": [], - "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{a:\"a\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{d123456789012345680000:\"d123456789012345680000\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, - "dtsImports": [] - }, - { - "name": "probe: eval-destructStringKey", - "origin": "probe", - "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nconst {'A': B} = {A: ['a']};\n@Directive({selector: '[d]', inputs: B})\nexport class Dir {}\n" - }, - "diagnostics": [ - "Failed to resolve @Directive.inputs to an array Value could not be determined statically." - ], - "diagnosticSpans": [[114, 115]], - "classes": {}, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [] }, { - "name": "probe: eval-fnCall", + "name": "probe: review-numberMicro", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nfunction mk() { return ['a']; }\n@Directive({selector: '[d]', inputs: mk()})\nexport class Dir {}\n" + "test.ts": "import {Directive} from \"@angular/core\";\n@Directive({selector: \"[d]\", inputs: [`e${0.000001}`]})\nexport class Dir {}" }, "diagnostics": [], - "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{a:\"a\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{\"e0.000001\":\"e0.000001\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [] }, { - "name": "probe: eval-fnCallParams", + "name": "probe: review-numberFraction", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nfunction mk(x: string, y: string) { return [x, y + '2']; }\n@Directive({selector: '[d]', inputs: mk('a', 'b')})\nexport class Dir {}\n" + "test.ts": "import {Directive} from \"@angular/core\";\n@Directive({selector: \"[d]\", inputs: [`f${1.5}`]})\nexport class Dir {}" }, "diagnostics": [], - "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{a:\"a\",b2:\"b2\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{\"f1.5\":\"f1.5\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [] }, { - "name": "probe: eval-fnCallDefault", + "name": "probe: review-infinityGlobal", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nfunction mk(x = 'd') { return [x]; }\n@Directive({selector: '[d]', inputs: mk()})\nexport class Dir {}\n" - }, - "diagnostics": [], - "diagnosticSpans": [], - "classes": { - "Dir": { - "inputs": "{d:\"d\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "test.ts": "import {Directive} from \"@angular/core\";\n@Directive({selector: \"[d]\", inputs: [`c${Infinity}`]})\nexport class Dir {}" }, - "dtsImports": [] - }, - { - "name": "probe: eval-fnCallRest", - "origin": "probe", - "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nfunction mk(...xs: string[]) { return xs; }\n@Directive({selector: '[d]', inputs: mk('a', 'b')})\nexport class Dir {}\n" - }, - "diagnostics": [], - "diagnosticSpans": [], - "classes": { - "Dir": { - "inputs": "{a:\"a\",b:\"b\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } - }, - "dtsImports": [] + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[78, 94]] }, { - "name": "probe: eval-fnCallMissingArg", + "name": "probe: review-nanGlobal", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nfunction mk(x?: string) { return [x]; }\n@Directive({selector: '[d]', inputs: mk()})\nexport class Dir {}\n" + "test.ts": "import {Directive} from \"@angular/core\";\n@Directive({selector: \"[d]\", inputs: [`n${NaN}`]})\nexport class Dir {}" }, "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value is of type 'undefined'." + "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." ], - "diagnosticSpans": [[125, 129]], "classes": {}, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [[78, 89]] }, { - "name": "probe: eval-fnCallNested", + "name": "probe: review-undefinedKeyword", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nfunction a(x: string) { return x + '1'; }\nfunction b(x: string) { return [a(x), a(x + 'z')]; }\n@Directive({selector: '[d]', inputs: b('q')})\nexport class Dir {}\n" + "test.ts": "import {Directive} from \"@angular/core\";\n@Directive({selector: \"[d]\", inputs: [`u${undefined}`]})\nexport class Dir {}" }, "diagnostics": [], - "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{q1:\"q1\",qz1:\"qz1\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{uundefined:\"uundefined\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [] }, { - "name": "probe: eval-fnCallExported", + "name": "probe: review-numberExponent", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nexport function mk() { return ['a']; }\n@Directive({selector: '[d]', inputs: mk()})\nexport class Dir {}\n" + "test.ts": "import {Directive} from \"@angular/core\";\n@Directive({selector: \"[d]\", inputs: [`a: x${1e21}`, `b: y${2.5e300}`]})\nexport class Dir {}" }, "diagnostics": [], - "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{a:\"a\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{a:[0,\"x1e+21\",\"a\"],b:[0,\"y2.5e+300\",\"b\"]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [] }, { - "name": "probe: eval-fnCallConstRef", + "name": "probe: eval-binaryPlus", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nconst P = 'p';\nfunction mk() { return [P]; }\n@Directive({selector: '[d]', inputs: mk()})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: ['a' + '', 'b' + 1, 'c' + true, 'd' + null]})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{p:\"p\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{a:\"a\",b1:\"b1\",ctrue:\"ctrue\",dnull:\"dnull\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: eval-fnCallEmptyReturn", + "name": "probe: eval-binaryArith", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nfunction mk() { return; }\n@Directive({selector: '[d]', inputs: mk()})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: [`x${1 + 2 * 3 - 4 / 2 % 3}`, `y${2 ** 10}`, `z${5 & 3}${5 | 3}${5 ^ 3}${1 << 3}${-16 >> 2}${-16 >>> 28}`]})\nexport class Dir {}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{x5:\"x5\",y1024:\"y1024\",\"z1768-415\":\"z1768-415\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } }, - "diagnostics": [ - "Failed to resolve @Directive.inputs to an array Value is of type 'undefined'." - ], - "diagnosticSpans": [[111, 115]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: eval-fnCallSpreadArgs", + "name": "probe: eval-binaryCompare", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nfunction mk(a: string, b: string) { return [a, b]; }\nconst ARGS = ['x', 'y'] as const;\n@Directive({selector: '[d]', inputs: mk(...ARGS)})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: [`a${1 < 2}${1 <= 1}${2 > 3}${2 >= 3}${1 == 1}${'1' === '1'}${1 != 2}${1 !== 1}`]})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{x:\"x\",y:\"y\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{atruetruefalsefalsetruetruetruefalse:\"atruetruefalsefalsetruetruetruefalse\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: eval-fnOverload", + "name": "probe: eval-conditional", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nfunction mk(): string[];\nfunction mk(x?: string) { return ['a']; }\n@Directive({selector: '[d]', inputs: mk()})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nconst C = true;\n@Directive({selector: '[d]', inputs: C ? ['a'] : ['b']})\nexport class Dir {}\n" }, - "diagnostics": [ - "Failed to resolve @Directive.inputs to an array Value could not be determined statically." - ], - "diagnosticSpans": [[152, 156]], - "classes": {}, - "dtsImports": [] - }, - { - "name": "probe: eval-fnDeclare", - "origin": "probe", - "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\ndeclare function mk(): string[];\n@Directive({selector: '[d]', inputs: mk()})\nexport class Dir {}\n" + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{a:\"a\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } }, - "diagnostics": [ - "Failed to resolve @Directive.inputs to an array Value could not be determined statically." - ], - "diagnosticSpans": [[118, 122]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: eval-fnExpressionConst", + "name": "probe: eval-conditionalFalsy", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nconst mk = function () { return ['a']; };\n@Directive({selector: '[d]', inputs: mk()})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nconst C = '';\n@Directive({selector: '[d]', inputs: C ? ['a'] : ['b']})\nexport class Dir {}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{b:\"b\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } }, - "diagnostics": [ - "Failed to resolve @Directive.inputs to an array Value could not be determined statically." - ], - "diagnosticSpans": [[127, 131]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: eval-fnParamDestructured", + "name": "probe: eval-conditionalDynamic", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nfunction mk({a}: {a: string}) { return [a]; }\n@Directive({selector: '[d]', inputs: mk({a: 'x'})})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\ndeclare function f(): boolean;\n@Directive({selector: '[d]', inputs: f() ? ['a'] : ['b']})\nexport class Dir {}\n" }, "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." + "Failed to resolve @Directive.inputs to an array Value could not be determined statically." ], - "diagnosticSpans": [[131, 143]], + "diagnosticSpans": [[116, 135]], "classes": {}, "dtsImports": [] }, { - "name": "probe: eval-fnParamShadow", + "name": "probe: eval-logicalOr", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nconst x = 'outer';\nfunction mk(x: string) { return [x]; }\n@Directive({selector: '[d]', inputs: mk('inner')})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nconst N = null;\n@Directive({selector: '[d]', inputs: N || ['a']})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{inner:\"inner\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{a:\"a\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: eval-fnUsesOuterParam", + "name": "probe: eval-logicalAnd", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nfunction mk(x: string) { return [x]; }\nfunction outer(y: string) { return mk(y); }\n@Directive({selector: '[d]', inputs: outer('z')})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: ['a'] && ['b']})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{z:\"z\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{b:\"b\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: eval-staticMethodCall", + "name": "probe: eval-logicalElem", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nclass U { static mk() { return ['a']; } }\n@Directive({selector: '[d]', inputs: U.mk()})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: [false || 'a', 'b' && 'c', '' || 'd']})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{a:\"a\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{a:\"a\",c:\"c\",d:\"d\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: eval-staticMethodArrowProp", + "name": "probe: eval-nullish", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nclass U { static mk = () => ['a']; }\n@Directive({selector: '[d]', inputs: U.mk()})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nconst N = null;\n@Directive({selector: '[d]', inputs: N ?? ['a']})\nexport class Dir {}\n" }, "diagnostics": [ "Failed to resolve @Directive.inputs to an array Value could not be determined statically." ], - "diagnosticSpans": [[122, 128]], + "diagnosticSpans": [[101, 111]], "classes": {}, "dtsImports": [] }, { - "name": "probe: eval-callNonFunction", + "name": "probe: eval-unary", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nconst X = ['a'];\n@Directive({selector: '[d]', inputs: X()})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: [`a${-1}`, `b${+'3'}`, `c${!0}`, `d${~1}`, `e${-'x'}`]})\nexport class Dir {}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{\"a-1\":\"a-1\",b3:\"b3\",ctrue:\"ctrue\",\"d-2\":\"d-2\",eNaN:\"eNaN\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } }, - "diagnostics": [ - "Failed to resolve @Directive.inputs to an array Value could not be determined statically." - ], - "diagnosticSpans": [[102, 105]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: eval-callClass", + "name": "probe: eval-typeof", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nclass U {}\n@Directive({selector: '[d]', inputs: U()})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: [typeof 'a']})\nexport class Dir {}\n" }, "diagnostics": [ - "Failed to resolve @Directive.inputs to an array Value could not be determined statically." + "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." ], - "diagnosticSpans": [[96, 99]], + "diagnosticSpans": [[85, 97]], "classes": {}, "dtsImports": [] }, { - "name": "probe: eval-concat", + "name": "probe: eval-void", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nconst A = ['a'];\n@Directive({selector: '[d]', inputs: A.concat(['b'], 'c', [['d']])})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: [void 0]})\nexport class Dir {}\n" }, "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value is of type '[string]'." + "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." ], - "diagnosticSpans": [[102, 131]], + "diagnosticSpans": [[85, 93]], "classes": {}, "dtsImports": [] }, { - "name": "probe: eval-concatSpread", - "origin": "probe", - "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nconst A = ['a'];\nconst B = ['b'];\n@Directive({selector: '[d]', inputs: [...A.concat(B)]})\nexport class Dir {}\n" - }, - "diagnostics": [], - "diagnosticSpans": [], - "classes": { - "Dir": { - "inputs": "{a:\"a\",b:\"b\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } - }, - "dtsImports": [] - }, - { - "name": "probe: eval-slice", + "name": "probe: eval-tplEnum", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nconst A = ['a', 'b'];\n@Directive({selector: '[d]', inputs: A.slice()})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nenum E { A = 'x', B = 2 }\nenum N { A, B }\n@Directive({selector: '[d]', inputs: [`a${E.A}`, `b${E.B}`, `c${N.B}`]})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{a:\"a\",b:\"b\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{ax:\"ax\",b2:\"b2\",c1:\"c1\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: eval-sliceArgs", + "name": "probe: eval-enumMember", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nconst A = ['a', 'b'];\n@Directive({selector: '[d]', inputs: A.slice(1)})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nenum E { A = 'x' }\n@Directive({selector: '[d]', inputs: [E.A]})\nexport class Dir {}\n" }, "diagnostics": [ - "Failed to resolve @Directive.inputs to an array Value could not be determined statically." + "@Directive.inputs array can only contain strings or object literals Value is of type 'E'." ], - "diagnosticSpans": [[107, 117]], + "diagnosticSpans": [[104, 109]], "classes": {}, "dtsImports": [] }, { - "name": "probe: eval-length", + "name": "probe: eval-enumMemberBinary", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nconst A = ['a', 'b'];\n@Directive({selector: '[d]', inputs: [`n${A.length}`]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nenum E { A = 'x' }\n@Directive({selector: '[d]', inputs: [E.A + '', 'y' + E.A]})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{n2:\"n2\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{x:\"x\",yx:\"yx\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: eval-stringConcat", + "name": "probe: eval-enumWhole", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: ['a'.concat('b', 1, true, null)]})\nexport class Dir {}\n" - }, - "diagnostics": [], - "diagnosticSpans": [], - "classes": { - "Dir": { - "inputs": "{ab1truenull:\"ab1truenull\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "test.ts": "import {Directive, Input} from '@angular/core';\nenum E { A = 'x' }\n@Directive({selector: '[d]', inputs: E})\nexport class Dir {}\n" }, + "diagnostics": [ + "Failed to resolve @Directive.inputs to an array Value is of type '{ A: E }'." + ], + "diagnosticSpans": [[104, 105]], + "classes": {}, "dtsImports": [] }, { - "name": "probe: eval-stringConcatBad", + "name": "probe: eval-enumMissing", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: ['a'.concat({} as any)]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nenum E { A = 'x' }\n@Directive({selector: '[d]', inputs: [E.B]})\nexport class Dir {}\n" }, "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." + "@Directive.inputs array can only contain strings or object literals Value is of type 'undefined'." ], - "diagnosticSpans": [[85, 108]], + "diagnosticSpans": [[104, 109]], "classes": {}, "dtsImports": [] }, { - "name": "probe: eval-stringLength", + "name": "probe: eval-constEnum", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: [`n${'😀'.length}`, `m${'abc'.length}`]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nconst enum E { A = 'x' }\n@Directive({selector: '[d]', inputs: [`${E.A}`]})\nexport class Dir {}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{x:\"x\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } }, - "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." - ], - "diagnosticSpans": [[85, 124]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: eval-stringIndex", + "name": "probe: eval-enumComputedInit", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: ['abc'[0]]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nenum E { A = 'x', B = A + 'y' }\n@Directive({selector: '[d]', inputs: [`${E.B}`]})\nexport class Dir {}\n" }, "diagnostics": [ "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." ], - "diagnosticSpans": [[85, 95]], + "diagnosticSpans": [[117, 127]], "classes": {}, "dtsImports": [] }, { - "name": "probe: eval-arrayMethodOther", + "name": "probe: eval-destructObj", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nconst A = ['a'];\n@Directive({selector: '[d]', inputs: A.map(x => x)})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nconst {A} = {A: ['a']};\n@Directive({selector: '[d]', inputs: A})\nexport class Dir {}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{a:\"a\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } }, - "diagnostics": [ - "Failed to resolve @Directive.inputs to an array Value could not be determined statically." - ], - "diagnosticSpans": [[102, 115]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: eval-declareTuple", + "name": "probe: eval-destructObjRename", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\ndeclare const X: ['a', 'b'];\n@Directive({selector: '[d]', inputs: X})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nconst {A: B} = {A: ['a']};\n@Directive({selector: '[d]', inputs: B})\nexport class Dir {}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{a:\"a\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: eval-destructObjNested", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input} from '@angular/core';\nconst {A: {B}} = {A: {B: ['a']}};\n@Directive({selector: '[d]', inputs: B})\nexport class Dir {}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{a:\"a\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: eval-destructArr", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input} from '@angular/core';\nconst [A, , B] = [['a'], 0, ['b']];\n@Directive({selector: '[d]', inputs: [...A, ...B]})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], @@ -2382,26 +2354,50 @@ "dtsImports": [] }, { - "name": "probe: eval-declareReadonlyTuple", + "name": "probe: eval-destructDefault", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\ndeclare const X: readonly ['a', 'b: c'];\n@Directive({selector: '[d]', inputs: X})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nconst {A = ['z']} = {} as any;\n@Directive({selector: '[d]', inputs: A})\nexport class Dir {}\n" + }, + "diagnostics": [ + "Failed to resolve @Directive.inputs to an array Value is of type 'undefined'." + ], + "diagnosticSpans": [[116, 117]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: eval-destructRestArr", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input} from '@angular/core';\nconst [, ...R] = ['a', 'b', 'c'];\n@Directive({selector: '[d]', inputs: R})\nexport class Dir {}\n" + }, + "diagnostics": ["Failed to resolve @Directive.inputs to an array Value is of type 'string'."], + "diagnosticSpans": [[119, 120]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: eval-destructRestObj", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input} from '@angular/core';\nconst {...R} = {R: ['a']};\n@Directive({selector: '[d]', inputs: R})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{a:\"a\",b:[0,\"c\",\"b\"]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{a:\"a\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: eval-declareNamedTuple", + "name": "probe: eval-destructFromConst", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\ndeclare const X: [first: 'a'];\n@Directive({selector: '[d]', inputs: X})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nconst O = {A: ['a']};\nconst {A} = O;\n@Directive({selector: '[d]', inputs: A})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], @@ -2414,23 +2410,23 @@ "dtsImports": [] }, { - "name": "probe: eval-declareStringArray", + "name": "probe: eval-destructStringKey", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\ndeclare const X: string[];\n@Directive({selector: '[d]', inputs: X})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nconst {'A': B} = {A: ['a']};\n@Directive({selector: '[d]', inputs: B})\nexport class Dir {}\n" }, "diagnostics": [ - "Failed to resolve @Directive.inputs to an array Value is a reference to 'X'." + "Failed to resolve @Directive.inputs to an array Value could not be determined statically." ], - "diagnosticSpans": [[112, 113]], + "diagnosticSpans": [[114, 115]], "classes": {}, "dtsImports": [] }, { - "name": "probe: eval-declareTypeof", + "name": "probe: eval-fnCall", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nconst Y = ['a'];\ndeclare const X: typeof Y;\n@Directive({selector: '[d]', inputs: X})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nfunction mk() { return ['a']; }\n@Directive({selector: '[d]', inputs: mk()})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], @@ -2443,84 +2439,87 @@ "dtsImports": [] }, { - "name": "probe: eval-declareLiteralElem", + "name": "probe: eval-fnCallParams", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\ndeclare const S: 'a';\n@Directive({selector: '[d]', inputs: [S]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nfunction mk(x: string, y: string) { return [x, y + '2']; }\n@Directive({selector: '[d]', inputs: mk('a', 'b')})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{a:\"a\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{a:\"a\",b2:\"b2\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: eval-declareNumberElem", + "name": "probe: eval-fnCallDefault", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\ndeclare const S: 1;\n@Directive({selector: '[d]', inputs: [`n${S}`]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nfunction mk(x = 'd') { return [x]; }\n@Directive({selector: '[d]', inputs: mk()})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{n1:\"n1\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{d:\"d\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: eval-declareLet", + "name": "probe: eval-fnCallRest", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\ndeclare let X: ['a'];\n@Directive({selector: '[d]', inputs: X})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nfunction mk(...xs: string[]) { return xs; }\n@Directive({selector: '[d]', inputs: mk('a', 'b')})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{a:\"a\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{a:\"a\",b:\"b\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: eval-letNoInit", + "name": "probe: eval-fnCallMissingArg", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nlet X;\n@Directive({selector: '[d]', inputs: X})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nfunction mk(x?: string) { return [x]; }\n@Directive({selector: '[d]', inputs: mk()})\nexport class Dir {}\n" }, "diagnostics": [ - "Failed to resolve @Directive.inputs to an array Value is of type 'undefined'." + "@Directive.inputs array can only contain strings or object literals Value is of type 'undefined'." ], - "diagnosticSpans": [[92, 93]], + "diagnosticSpans": [[125, 129]], "classes": {}, "dtsImports": [] }, { - "name": "probe: eval-letNoInitElem", + "name": "probe: eval-fnCallNested", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nlet X: string;\n@Directive({selector: '[d]', inputs: [X]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nfunction a(x: string) { return x + '1'; }\nfunction b(x: string) { return [a(x), a(x + 'z')]; }\n@Directive({selector: '[d]', inputs: b('q')})\nexport class Dir {}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{q1:\"q1\",qz1:\"qz1\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } }, - "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value is of type 'undefined'." - ], - "diagnosticSpans": [[100, 103]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: eval-varTwice", + "name": "probe: eval-fnCallExported", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nvar X = ['a'];\nvar X = ['b'];\n@Directive({selector: '[d]', inputs: X})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nexport function mk() { return ['a']; }\n@Directive({selector: '[d]', inputs: mk()})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], @@ -2533,146 +2532,139 @@ "dtsImports": [] }, { - "name": "probe: eval-varTwiceFirstEmpty", + "name": "probe: eval-fnCallConstRef", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nvar X;\nvar X = ['b'];\n@Directive({selector: '[d]', inputs: X})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nconst P = 'p';\nfunction mk() { return [P]; }\n@Directive({selector: '[d]', inputs: mk()})\nexport class Dir {}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{p:\"p\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } }, - "diagnostics": [ - "Failed to resolve @Directive.inputs to an array Value is of type 'undefined'." - ], - "diagnosticSpans": [[107, 108]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: eval-unknownName", + "name": "probe: eval-fnCallEmptyReturn", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: FOO})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nfunction mk() { return; }\n@Directive({selector: '[d]', inputs: mk()})\nexport class Dir {}\n" }, "diagnostics": [ - "Failed to resolve @Directive.inputs to an array Value could not be determined statically." + "Failed to resolve @Directive.inputs to an array Value is of type 'undefined'." ], - "diagnosticSpans": [[85, 88]], + "diagnosticSpans": [[111, 115]], "classes": {}, "dtsImports": [] }, { - "name": "probe: eval-unknownNameElem", + "name": "probe: eval-fnCallSpreadArgs", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: [FOO]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nfunction mk(a: string, b: string) { return [a, b]; }\nconst ARGS = ['x', 'y'] as const;\n@Directive({selector: '[d]', inputs: mk(...ARGS)})\nexport class Dir {}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{x:\"x\",y:\"y\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } }, - "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." - ], - "diagnosticSpans": [[85, 90]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: eval-libGlobal", + "name": "probe: eval-fnOverload", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: [Infinity]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nfunction mk(): string[];\nfunction mk(x?: string) { return ['a']; }\n@Directive({selector: '[d]', inputs: mk()})\nexport class Dir {}\n" }, "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value is a reference to 'Infinity'." + "Failed to resolve @Directive.inputs to an array Value could not be determined statically." ], - "diagnosticSpans": [[85, 95]], + "diagnosticSpans": [[152, 156]], "classes": {}, "dtsImports": [] }, { - "name": "probe: eval-namespaceImport", + "name": "probe: eval-fnDeclare", "origin": "probe", "files": { - "test.ts": "import {Directive} from '@angular/core';\nimport * as core from '@angular/core';\n@Directive({selector: '[d]', inputs: core})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\ndeclare function mk(): string[];\n@Directive({selector: '[d]', inputs: mk()})\nexport class Dir {}\n" }, "diagnostics": [ - "Failed to resolve @Directive.inputs to an array Value is of type '(module)'." + "Failed to resolve @Directive.inputs to an array Value could not be determined statically." ], - "diagnosticSpans": [[117, 121]], + "diagnosticSpans": [[118, 122]], "classes": {}, "dtsImports": [] }, { - "name": "probe: eval-namespaceImportElem", + "name": "probe: eval-fnExpressionConst", "origin": "probe", "files": { - "test.ts": "import {Directive} from '@angular/core';\nimport * as core from '@angular/core';\n@Directive({selector: '[d]', inputs: [core]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nconst mk = function () { return ['a']; };\n@Directive({selector: '[d]', inputs: mk()})\nexport class Dir {}\n" }, "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value is of type '(module)'." + "Failed to resolve @Directive.inputs to an array Value could not be determined statically." ], - "diagnosticSpans": [[117, 123]], + "diagnosticSpans": [[127, 131]], "classes": {}, "dtsImports": [] }, { - "name": "probe: eval-objMethod", + "name": "probe: eval-fnParamDestructured", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: [{name: 'a', m() {}}]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nfunction mk({a}: {a: string}) { return [a]; }\n@Directive({selector: '[d]', inputs: mk({a: 'x'})})\nexport class Dir {}\n" }, "diagnostics": [ "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." ], - "diagnosticSpans": [[85, 106]], + "diagnosticSpans": [[131, 143]], "classes": {}, "dtsImports": [] }, { - "name": "probe: eval-objShorthand", + "name": "probe: eval-fnParamShadow", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nconst name = 'a';\n@Directive({selector: '[d]', inputs: [{name}]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nconst x = 'outer';\nfunction mk(x: string) { return [x]; }\n@Directive({selector: '[d]', inputs: mk('inner')})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{a:\"a\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{inner:\"inner\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: eval-objComputedStr", + "name": "probe: eval-fnUsesOuterParam", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nconst K = 'name';\n@Directive({selector: '[d]', inputs: [{[K]: 'a'}]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nfunction mk(x: string) { return [x]; }\nfunction outer(y: string) { return mk(y); }\n@Directive({selector: '[d]', inputs: outer('z')})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{a:\"a\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{z:\"z\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: eval-objComputedNum", - "origin": "probe", - "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: [{[1]: 'x', name: 'a'}]})\nexport class Dir {}\n" - }, - "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." - ], - "diagnosticSpans": [[85, 108]], - "classes": {}, - "dtsImports": [] - }, - { - "name": "probe: eval-objNumericKey", + "name": "probe: eval-staticMethodCall", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: [{1: 'x', name: 'a'}]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nclass U { static mk() { return ['a']; } }\n@Directive({selector: '[d]', inputs: U.mk()})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], @@ -2685,284 +2677,268 @@ "dtsImports": [] }, { - "name": "probe: eval-objComputedNumDescribe", + "name": "probe: eval-staticMethodArrowProp", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: {[1]: 'x'}})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nclass U { static mk = () => ['a']; }\n@Directive({selector: '[d]', inputs: U.mk()})\nexport class Dir {}\n" }, "diagnostics": [ "Failed to resolve @Directive.inputs to an array Value could not be determined statically." ], - "diagnosticSpans": [[85, 95]], + "diagnosticSpans": [[122, 128]], "classes": {}, "dtsImports": [] }, { - "name": "probe: eval-objSpreadArray", + "name": "probe: eval-callNonFunction", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: [{...['x'], name: 'a'}]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nconst X = ['a'];\n@Directive({selector: '[d]', inputs: X()})\nexport class Dir {}\n" }, "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." + "Failed to resolve @Directive.inputs to an array Value could not be determined statically." ], - "diagnosticSpans": [[85, 108]], + "diagnosticSpans": [[102, 105]], "classes": {}, "dtsImports": [] }, { - "name": "probe: eval-objGetter", + "name": "probe: eval-callClass", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: [{name: 'a', get x() { return 1; }}]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nclass U {}\n@Directive({selector: '[d]', inputs: U()})\nexport class Dir {}\n" }, "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." + "Failed to resolve @Directive.inputs to an array Value could not be determined statically." ], - "diagnosticSpans": [[85, 121]], + "diagnosticSpans": [[96, 99]], "classes": {}, "dtsImports": [] }, { - "name": "probe: msg-spreadNonArray", + "name": "probe: eval-concat", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nconst S = 'ab';\n@Directive({selector: '[d]', inputs: ['x', ...S]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nconst A = ['a'];\n@Directive({selector: '[d]', inputs: A.concat(['b'], 'c', [['d']])})\nexport class Dir {}\n" }, "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." + "@Directive.inputs array can only contain strings or object literals Value is of type '[string]'." ], - "diagnosticSpans": [[101, 112]], + "diagnosticSpans": [[102, 131]], "classes": {}, "dtsImports": [] }, { - "name": "probe: msg-spreadUnknown", + "name": "probe: eval-concatSpread", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\ndeclare function f(): any;\n@Directive({selector: '[d]', inputs: ['x', ...f()]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nconst A = ['a'];\nconst B = ['b'];\n@Directive({selector: '[d]', inputs: [...A.concat(B)]})\nexport class Dir {}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{a:\"a\",b:\"b\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } }, - "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." - ], - "diagnosticSpans": [[112, 125]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: msg-spreadRef", + "name": "probe: eval-slice", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nclass U {}\n@Directive({selector: '[d]', inputs: ['x', ...U]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nconst A = ['a', 'b'];\n@Directive({selector: '[d]', inputs: A.slice()})\nexport class Dir {}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{a:\"a\",b:\"b\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } }, - "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." - ], - "diagnosticSpans": [[96, 107]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: msg-spreadNonArrayOutputs", + "name": "probe: eval-sliceArgs", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nconst S = {a: 1};\n@Directive({selector: '[d]', outputs: ['x', ...S]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nconst A = ['a', 'b'];\n@Directive({selector: '[d]', inputs: A.slice(1)})\nexport class Dir {}\n" }, "diagnostics": [ - "Failed to resolve outputs at position 1 to a string Value could not be determined statically." + "Failed to resolve @Directive.inputs to an array Value could not be determined statically." ], - "diagnosticSpans": [[104, 115]], + "diagnosticSpans": [[107, 117]], "classes": {}, "dtsImports": [] }, { - "name": "probe: msg-spreadObjInArr", + "name": "probe: eval-length", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nconst S = {a: 1};\n@Directive({selector: '[d]', inputs: [...S]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nconst A = ['a', 'b'];\n@Directive({selector: '[d]', inputs: [`n${A.length}`]})\nexport class Dir {}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{n2:\"n2\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } }, - "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." - ], - "diagnosticSpans": [[103, 109]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: msg-objSpreadNonObject", + "name": "probe: eval-stringConcat", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: [{...'x', name: 'a'}]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: ['a'.concat('b', 1, true, null)]})\nexport class Dir {}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{ab1truenull:\"ab1truenull\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } }, - "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." - ], - "diagnosticSpans": [[85, 106]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: msg-objSpreadDynamic", + "name": "probe: eval-stringConcatBad", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\ndeclare function f(): any;\n@Directive({selector: '[d]', inputs: [{...f(), name: 'a'}]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: ['a'.concat({} as any)]})\nexport class Dir {}\n" }, "diagnostics": [ "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." ], - "diagnosticSpans": [[112, 133]], - "classes": {}, - "dtsImports": [] - }, - { - "name": "probe: msg-enumOutputs", - "origin": "probe", - "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nenum E { A = 'x' }\n@Directive({selector: '[d]', outputs: [E.A]})\nexport class Dir {}\n" - }, - "diagnostics": ["Failed to resolve outputs at position 0 to a string Value is of type 'E'."], - "diagnosticSpans": [[105, 110]], + "diagnosticSpans": [[85, 108]], "classes": {}, "dtsImports": [] }, { - "name": "probe: msg-anonymousClassRef", + "name": "probe: eval-stringLength", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: [class {}]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: [`n${'😀'.length}`, `m${'abc'.length}`]})\nexport class Dir {}\n" }, "diagnostics": [ "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." ], - "diagnosticSpans": [[85, 95]], + "diagnosticSpans": [[85, 124]], "classes": {}, "dtsImports": [] }, { - "name": "probe: rej-satisfies", + "name": "probe: eval-stringIndex", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: ['a'] satisfies string[]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: ['abc'[0]]})\nexport class Dir {}\n" }, "diagnostics": [ - "Failed to resolve @Directive.inputs to an array Value could not be determined statically." + "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." ], - "diagnosticSpans": [[85, 109]], + "diagnosticSpans": [[85, 95]], "classes": {}, "dtsImports": [] }, { - "name": "probe: rej-typeAssertion", + "name": "probe: eval-arrayMethodOther", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: ['a']})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nconst A = ['a'];\n@Directive({selector: '[d]', inputs: A.map(x => x)})\nexport class Dir {}\n" }, "diagnostics": [ "Failed to resolve @Directive.inputs to an array Value could not be determined statically." ], - "diagnosticSpans": [[85, 100]], + "diagnosticSpans": [[102, 115]], "classes": {}, "dtsImports": [] }, { - "name": "probe: rej-elemSatisfies", + "name": "probe: eval-declareTuple", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: ['a' satisfies string]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\ndeclare const X: ['a', 'b'];\n@Directive({selector: '[d]', inputs: X})\nexport class Dir {}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{a:\"a\",b:\"b\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } }, - "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." - ], - "diagnosticSpans": [[85, 107]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: rej-arrayStringIndex", + "name": "probe: eval-declareReadonlyTuple", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nconst X = ['a', 'b'];\n@Directive({selector: '[d]', inputs: [X['0']]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\ndeclare const X: readonly ['a', 'b: c'];\n@Directive({selector: '[d]', inputs: X})\nexport class Dir {}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{a:\"a\",b:[0,\"c\",\"b\"]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } }, - "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." - ], - "diagnosticSpans": [[107, 115]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: rej-arrayNumIndex", + "name": "probe: eval-declareNamedTuple", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nconst X = ['a', 'b'];\n@Directive({selector: '[d]', inputs: [X[1]]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\ndeclare const X: [first: 'a'];\n@Directive({selector: '[d]', inputs: X})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{b:\"b\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{a:\"a\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: rej-arrayFloatIndex", + "name": "probe: eval-declareStringArray", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nconst X = ['a', 'b'];\n@Directive({selector: '[d]', inputs: [X[0.5]]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\ndeclare const X: string[];\n@Directive({selector: '[d]', inputs: X})\nexport class Dir {}\n" }, "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." + "Failed to resolve @Directive.inputs to an array Value is a reference to 'X'." ], - "diagnosticSpans": [[107, 115]], + "diagnosticSpans": [[112, 113]], "classes": {}, "dtsImports": [] }, { - "name": "probe: rej-arrayOutOfRange", + "name": "probe: eval-declareTypeof", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nconst X = ['a', 'b'];\n@Directive({selector: '[d]', inputs: [X[5]]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nconst Y = ['a'];\ndeclare const X: typeof Y;\n@Directive({selector: '[d]', inputs: X})\nexport class Dir {}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{a:\"a\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } }, - "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value is of type 'undefined'." - ], - "diagnosticSpans": [[107, 113]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: rej-arrayNegIndex", + "name": "probe: eval-declareLiteralElem", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nconst X = ['a', 'b'];\n@Directive({selector: '[d]', inputs: [X[-1]]})\nexport class Dir {}\n" - }, - "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value is of type 'undefined'." - ], - "diagnosticSpans": [[107, 114]], - "classes": {}, - "dtsImports": [] - }, - { - "name": "probe: rej-arrayPropOther", - "origin": "probe", - "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nconst X = ['a', 'b'];\n@Directive({selector: '[d]', inputs: [X.foo]})\nexport class Dir {}\n" - }, - "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." - ], - "diagnosticSpans": [[107, 114]], - "classes": {}, - "dtsImports": [] - }, - { - "name": "probe: rej-objectIndexNum", - "origin": "probe", - "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nconst O = {1: 'a'};\n@Directive({selector: '[d]', inputs: [O[1]]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\ndeclare const S: 'a';\n@Directive({selector: '[d]', inputs: [S]})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], @@ -2975,217 +2951,175 @@ "dtsImports": [] }, { - "name": "probe: rej-computedConfigKey", - "origin": "probe", - "files": { - "test.ts": "import {Directive} from '@angular/core';\nconst K = 'inputs';\n@Directive({selector: '[d]', [K]: ['a']})\nexport class Dir {}\n" - }, - "diagnostics": [], - "diagnosticSpans": [], - "classes": { - "Dir": { - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } - }, - "dtsImports": [] - }, - { - "name": "probe: rej-computedConfigKeyLiteral", + "name": "probe: eval-declareNumberElem", "origin": "probe", "files": { - "test.ts": "import {Directive} from '@angular/core';\n@Directive({selector: '[d]', ['inputs']: ['a']})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\ndeclare const S: 1;\n@Directive({selector: '[d]', inputs: [`n${S}`]})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { "Dir": { - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{n1:\"n1\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: rej-stringConfigKey", + "name": "probe: eval-declareLet", "origin": "probe", "files": { - "test.ts": "import {Directive} from '@angular/core';\n@Directive({selector: '[d]', 'inputs': ['a'], \"outputs\": ['o']})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\ndeclare let X: ['a'];\n@Directive({selector: '[d]', inputs: X})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { "Dir": { "inputs": "{a:\"a\"}", - "outputs": "{o:\"o\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: rej-shorthandConfigKey", + "name": "probe: eval-letNoInit", "origin": "probe", "files": { - "test.ts": "import {Directive} from '@angular/core';\nconst inputs = ['a'];\n@Directive({selector: '[d]', inputs})\nexport class Dir {}\n" - }, - "diagnostics": [], - "diagnosticSpans": [], - "classes": { - "Dir": { - "inputs": "{a:\"a\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "test.ts": "import {Directive, Input} from '@angular/core';\nlet X;\n@Directive({selector: '[d]', inputs: X})\nexport class Dir {}\n" }, + "diagnostics": [ + "Failed to resolve @Directive.inputs to an array Value is of type 'undefined'." + ], + "diagnosticSpans": [[92, 93]], + "classes": {}, "dtsImports": [] }, { - "name": "probe: rej-duplicateConfigKey", + "name": "probe: eval-letNoInitElem", "origin": "probe", "files": { - "test.ts": "import {Directive} from '@angular/core';\n@Directive({selector: '[d]', inputs: ['a'], inputs: ['b']})\nexport class Dir {}\n" - }, - "diagnostics": [], - "diagnosticSpans": [], - "classes": { - "Dir": { - "inputs": "{b:\"b\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "test.ts": "import {Directive, Input} from '@angular/core';\nlet X: string;\n@Directive({selector: '[d]', inputs: [X]})\nexport class Dir {}\n" }, + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value is of type 'undefined'." + ], + "diagnosticSpans": [[100, 103]], + "classes": {}, "dtsImports": [] }, { - "name": "probe: key-proto", + "name": "probe: eval-varTwice", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: ['__proto__', 'b']})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nvar X = ['a'];\nvar X = ['b'];\n@Directive({selector: '[d]', inputs: X})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{b:\"b\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{a:\"a\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: key-protoObj", + "name": "probe: eval-varTwiceFirstEmpty", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: [{name: '__proto__'}, 'b']})\nexport class Dir {}\n" - }, - "diagnostics": [], - "diagnosticSpans": [], - "classes": { - "Dir": { - "inputs": "{b:\"b\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "test.ts": "import {Directive, Input} from '@angular/core';\nvar X;\nvar X = ['b'];\n@Directive({selector: '[d]', inputs: X})\nexport class Dir {}\n" }, + "diagnostics": [ + "Failed to resolve @Directive.inputs to an array Value is of type 'undefined'." + ], + "diagnosticSpans": [[107, 108]], + "classes": {}, "dtsImports": [] }, { - "name": "probe: key-protoAlias", + "name": "probe: eval-unknownName", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: ['a: __proto__', 'b']})\nexport class Dir {}\n" - }, - "diagnostics": [], - "diagnosticSpans": [], - "classes": { - "Dir": { - "inputs": "{a:[0,\"__proto__\",\"a\"],b:\"b\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: FOO})\nexport class Dir {}\n" }, + "diagnostics": [ + "Failed to resolve @Directive.inputs to an array Value could not be determined statically." + ], + "diagnosticSpans": [[85, 88]], + "classes": {}, "dtsImports": [] }, { - "name": "probe: key-protoOutputs", + "name": "probe: eval-unknownNameElem", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', outputs: ['__proto__', 'b']})\nexport class Dir {}\n" - }, - "diagnostics": [], - "diagnosticSpans": [], - "classes": { - "Dir": { - "outputs": "{b:\"b\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: [FOO]})\nexport class Dir {}\n" }, + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." + ], + "diagnosticSpans": [[85, 90]], + "classes": {}, "dtsImports": [] }, { - "name": "probe: key-integerOrder", + "name": "probe: eval-libGlobal", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: ['b', '1', 'a', '0', '10', '2']})\nexport class Dir {}\n" - }, - "diagnostics": [], - "diagnosticSpans": [], - "classes": { - "Dir": { - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: [Infinity]})\nexport class Dir {}\n" }, - "dtsImports": [], - "note": "ngtsc leaves integer-like keys unquoted in the JS map (and `01`, `1e3` too, which changes or breaks them); oxc quotes them. The order is compared through the .d.ts." + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value is a reference to 'Infinity'." + ], + "diagnosticSpans": [[85, 95]], + "classes": {}, + "dtsImports": [] }, { - "name": "probe: key-integerLike", + "name": "probe: eval-namespaceImport", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: ['b', '01', '4294967294', '4294967295', '-1', '1.5', '1e3', ' 3']})\nexport class Dir {}\n" - }, - "diagnostics": [], - "diagnosticSpans": [], - "classes": { - "Dir": { - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "test.ts": "import {Directive} from '@angular/core';\nimport * as core from '@angular/core';\n@Directive({selector: '[d]', inputs: core})\nexport class Dir {}\n" }, - "dtsImports": [], - "note": "ngtsc leaves integer-like keys unquoted in the JS map (and `01`, `1e3` too, which changes or breaks them); oxc quotes them. The order is compared through the .d.ts." + "diagnostics": [ + "Failed to resolve @Directive.inputs to an array Value is of type '(module)'." + ], + "diagnosticSpans": [[117, 121]], + "classes": {}, + "dtsImports": [] }, { - "name": "probe: key-integerOutputs", + "name": "probe: eval-namespaceImportElem", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', outputs: ['b', '1', 'a']})\nexport class Dir {}\n" - }, - "diagnostics": [], - "diagnosticSpans": [], - "classes": { - "Dir": { - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "test.ts": "import {Directive} from '@angular/core';\nimport * as core from '@angular/core';\n@Directive({selector: '[d]', inputs: [core]})\nexport class Dir {}\n" }, - "dtsImports": [], - "note": "ngtsc leaves integer-like keys unquoted in the JS map (and `01`, `1e3` too, which changes or breaks them); oxc quotes them. The order is compared through the .d.ts." + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value is of type '(module)'." + ], + "diagnosticSpans": [[117, 123]], + "classes": {}, + "dtsImports": [] }, { - "name": "probe: key-integerMerge", + "name": "probe: eval-objMethod", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: ['b', '1']})\nexport class Dir { @Input() a: any; @Input() c: any; }\n" - }, - "diagnostics": [], - "diagnosticSpans": [], - "classes": { - "Dir": { - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: [{name: 'a', m() {}}]})\nexport class Dir {}\n" }, - "dtsImports": [], - "note": "ngtsc leaves integer-like keys unquoted in the JS map (and `01`, `1e3` too, which changes or breaks them); oxc quotes them. The order is compared through the .d.ts." + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." + ], + "diagnosticSpans": [[85, 106]], + "classes": {}, + "dtsImports": [] }, { - "name": "probe: key-protoWithMember", + "name": "probe: eval-objShorthand", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: ['__proto__']})\nexport class Dir { @Input() a: any; }\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nconst name = 'a';\n@Directive({selector: '[d]', inputs: [{name}]})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], @@ -3198,42 +3132,39 @@ "dtsImports": [] }, { - "name": "probe: key-whitespaceAlias", + "name": "probe: eval-objComputedStr", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: ['a: spaced alias ', ' b ']})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nconst K = 'name';\n@Directive({selector: '[d]', inputs: [{[K]: 'a'}]})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{a:[0,\"spaced alias\",\"a\"],b:\"b\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{a:\"a\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: depth-chain300", + "name": "probe: eval-objComputedNum", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nconst X0 = ['a'];\nconst X1 = X0;\nconst X2 = X1;\nconst X3 = X2;\nconst X4 = X3;\nconst X5 = X4;\nconst X6 = X5;\nconst X7 = X6;\nconst X8 = X7;\nconst X9 = X8;\nconst X10 = X9;\nconst X11 = X10;\nconst X12 = X11;\nconst X13 = X12;\nconst X14 = X13;\nconst X15 = X14;\nconst X16 = X15;\nconst X17 = X16;\nconst X18 = X17;\nconst X19 = X18;\nconst X20 = X19;\nconst X21 = X20;\nconst X22 = X21;\nconst X23 = X22;\nconst X24 = X23;\nconst X25 = X24;\nconst X26 = X25;\nconst X27 = X26;\nconst X28 = X27;\nconst X29 = X28;\nconst X30 = X29;\nconst X31 = X30;\nconst X32 = X31;\nconst X33 = X32;\nconst X34 = X33;\nconst X35 = X34;\nconst X36 = X35;\nconst X37 = X36;\nconst X38 = X37;\nconst X39 = X38;\nconst X40 = X39;\nconst X41 = X40;\nconst X42 = X41;\nconst X43 = X42;\nconst X44 = X43;\nconst X45 = X44;\nconst X46 = X45;\nconst X47 = X46;\nconst X48 = X47;\nconst X49 = X48;\nconst X50 = X49;\nconst X51 = X50;\nconst X52 = X51;\nconst X53 = X52;\nconst X54 = X53;\nconst X55 = X54;\nconst X56 = X55;\nconst X57 = X56;\nconst X58 = X57;\nconst X59 = X58;\nconst X60 = X59;\nconst X61 = X60;\nconst X62 = X61;\nconst X63 = X62;\nconst X64 = X63;\nconst X65 = X64;\nconst X66 = X65;\nconst X67 = X66;\nconst X68 = X67;\nconst X69 = X68;\nconst X70 = X69;\nconst X71 = X70;\nconst X72 = X71;\nconst X73 = X72;\nconst X74 = X73;\nconst X75 = X74;\nconst X76 = X75;\nconst X77 = X76;\nconst X78 = X77;\nconst X79 = X78;\nconst X80 = X79;\nconst X81 = X80;\nconst X82 = X81;\nconst X83 = X82;\nconst X84 = X83;\nconst X85 = X84;\nconst X86 = X85;\nconst X87 = X86;\nconst X88 = X87;\nconst X89 = X88;\nconst X90 = X89;\nconst X91 = X90;\nconst X92 = X91;\nconst X93 = X92;\nconst X94 = X93;\nconst X95 = X94;\nconst X96 = X95;\nconst X97 = X96;\nconst X98 = X97;\nconst X99 = X98;\nconst X100 = X99;\nconst X101 = X100;\nconst X102 = X101;\nconst X103 = X102;\nconst X104 = X103;\nconst X105 = X104;\nconst X106 = X105;\nconst X107 = X106;\nconst X108 = X107;\nconst X109 = X108;\nconst X110 = X109;\nconst X111 = X110;\nconst X112 = X111;\nconst X113 = X112;\nconst X114 = X113;\nconst X115 = X114;\nconst X116 = X115;\nconst X117 = X116;\nconst X118 = X117;\nconst X119 = X118;\nconst X120 = X119;\nconst X121 = X120;\nconst X122 = X121;\nconst X123 = X122;\nconst X124 = X123;\nconst X125 = X124;\nconst X126 = X125;\nconst X127 = X126;\nconst X128 = X127;\nconst X129 = X128;\nconst X130 = X129;\nconst X131 = X130;\nconst X132 = X131;\nconst X133 = X132;\nconst X134 = X133;\nconst X135 = X134;\nconst X136 = X135;\nconst X137 = X136;\nconst X138 = X137;\nconst X139 = X138;\nconst X140 = X139;\nconst X141 = X140;\nconst X142 = X141;\nconst X143 = X142;\nconst X144 = X143;\nconst X145 = X144;\nconst X146 = X145;\nconst X147 = X146;\nconst X148 = X147;\nconst X149 = X148;\nconst X150 = X149;\nconst X151 = X150;\nconst X152 = X151;\nconst X153 = X152;\nconst X154 = X153;\nconst X155 = X154;\nconst X156 = X155;\nconst X157 = X156;\nconst X158 = X157;\nconst X159 = X158;\nconst X160 = X159;\nconst X161 = X160;\nconst X162 = X161;\nconst X163 = X162;\nconst X164 = X163;\nconst X165 = X164;\nconst X166 = X165;\nconst X167 = X166;\nconst X168 = X167;\nconst X169 = X168;\nconst X170 = X169;\nconst X171 = X170;\nconst X172 = X171;\nconst X173 = X172;\nconst X174 = X173;\nconst X175 = X174;\nconst X176 = X175;\nconst X177 = X176;\nconst X178 = X177;\nconst X179 = X178;\nconst X180 = X179;\nconst X181 = X180;\nconst X182 = X181;\nconst X183 = X182;\nconst X184 = X183;\nconst X185 = X184;\nconst X186 = X185;\nconst X187 = X186;\nconst X188 = X187;\nconst X189 = X188;\nconst X190 = X189;\nconst X191 = X190;\nconst X192 = X191;\nconst X193 = X192;\nconst X194 = X193;\nconst X195 = X194;\nconst X196 = X195;\nconst X197 = X196;\nconst X198 = X197;\nconst X199 = X198;\nconst X200 = X199;\nconst X201 = X200;\nconst X202 = X201;\nconst X203 = X202;\nconst X204 = X203;\nconst X205 = X204;\nconst X206 = X205;\nconst X207 = X206;\nconst X208 = X207;\nconst X209 = X208;\nconst X210 = X209;\nconst X211 = X210;\nconst X212 = X211;\nconst X213 = X212;\nconst X214 = X213;\nconst X215 = X214;\nconst X216 = X215;\nconst X217 = X216;\nconst X218 = X217;\nconst X219 = X218;\nconst X220 = X219;\nconst X221 = X220;\nconst X222 = X221;\nconst X223 = X222;\nconst X224 = X223;\nconst X225 = X224;\nconst X226 = X225;\nconst X227 = X226;\nconst X228 = X227;\nconst X229 = X228;\nconst X230 = X229;\nconst X231 = X230;\nconst X232 = X231;\nconst X233 = X232;\nconst X234 = X233;\nconst X235 = X234;\nconst X236 = X235;\nconst X237 = X236;\nconst X238 = X237;\nconst X239 = X238;\nconst X240 = X239;\nconst X241 = X240;\nconst X242 = X241;\nconst X243 = X242;\nconst X244 = X243;\nconst X245 = X244;\nconst X246 = X245;\nconst X247 = X246;\nconst X248 = X247;\nconst X249 = X248;\nconst X250 = X249;\nconst X251 = X250;\nconst X252 = X251;\nconst X253 = X252;\nconst X254 = X253;\nconst X255 = X254;\nconst X256 = X255;\nconst X257 = X256;\nconst X258 = X257;\nconst X259 = X258;\nconst X260 = X259;\nconst X261 = X260;\nconst X262 = X261;\nconst X263 = X262;\nconst X264 = X263;\nconst X265 = X264;\nconst X266 = X265;\nconst X267 = X266;\nconst X268 = X267;\nconst X269 = X268;\nconst X270 = X269;\nconst X271 = X270;\nconst X272 = X271;\nconst X273 = X272;\nconst X274 = X273;\nconst X275 = X274;\nconst X276 = X275;\nconst X277 = X276;\nconst X278 = X277;\nconst X279 = X278;\nconst X280 = X279;\nconst X281 = X280;\nconst X282 = X281;\nconst X283 = X282;\nconst X284 = X283;\nconst X285 = X284;\nconst X286 = X285;\nconst X287 = X286;\nconst X288 = X287;\nconst X289 = X288;\nconst X290 = X289;\nconst X291 = X290;\nconst X292 = X291;\nconst X293 = X292;\nconst X294 = X293;\nconst X295 = X294;\nconst X296 = X295;\nconst X297 = X296;\nconst X298 = X297;\nconst X299 = X298;\n\n@Directive({selector: '[d]', inputs: X299})\nexport class Dir {}\n" - }, - "diagnostics": [], - "diagnosticSpans": [], - "classes": { - "Dir": { - "inputs": "{a:\"a\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: [{[1]: 'x', name: 'a'}]})\nexport class Dir {}\n" }, + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." + ], + "diagnosticSpans": [[85, 108]], + "classes": {}, "dtsImports": [] }, { - "name": "probe: depth-chain1000", + "name": "probe: eval-objNumericKey", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nconst X0 = ['a'];\nconst X1 = X0;\nconst X2 = X1;\nconst X3 = X2;\nconst X4 = X3;\nconst X5 = X4;\nconst X6 = X5;\nconst X7 = X6;\nconst X8 = X7;\nconst X9 = X8;\nconst X10 = X9;\nconst X11 = X10;\nconst X12 = X11;\nconst X13 = X12;\nconst X14 = X13;\nconst X15 = X14;\nconst X16 = X15;\nconst X17 = X16;\nconst X18 = X17;\nconst X19 = X18;\nconst X20 = X19;\nconst X21 = X20;\nconst X22 = X21;\nconst X23 = X22;\nconst X24 = X23;\nconst X25 = X24;\nconst X26 = X25;\nconst X27 = X26;\nconst X28 = X27;\nconst X29 = X28;\nconst X30 = X29;\nconst X31 = X30;\nconst X32 = X31;\nconst X33 = X32;\nconst X34 = X33;\nconst X35 = X34;\nconst X36 = X35;\nconst X37 = X36;\nconst X38 = X37;\nconst X39 = X38;\nconst X40 = X39;\nconst X41 = X40;\nconst X42 = X41;\nconst X43 = X42;\nconst X44 = X43;\nconst X45 = X44;\nconst X46 = X45;\nconst X47 = X46;\nconst X48 = X47;\nconst X49 = X48;\nconst X50 = X49;\nconst X51 = X50;\nconst X52 = X51;\nconst X53 = X52;\nconst X54 = X53;\nconst X55 = X54;\nconst X56 = X55;\nconst X57 = X56;\nconst X58 = X57;\nconst X59 = X58;\nconst X60 = X59;\nconst X61 = X60;\nconst X62 = X61;\nconst X63 = X62;\nconst X64 = X63;\nconst X65 = X64;\nconst X66 = X65;\nconst X67 = X66;\nconst X68 = X67;\nconst X69 = X68;\nconst X70 = X69;\nconst X71 = X70;\nconst X72 = X71;\nconst X73 = X72;\nconst X74 = X73;\nconst X75 = X74;\nconst X76 = X75;\nconst X77 = X76;\nconst X78 = X77;\nconst X79 = X78;\nconst X80 = X79;\nconst X81 = X80;\nconst X82 = X81;\nconst X83 = X82;\nconst X84 = X83;\nconst X85 = X84;\nconst X86 = X85;\nconst X87 = X86;\nconst X88 = X87;\nconst X89 = X88;\nconst X90 = X89;\nconst X91 = X90;\nconst X92 = X91;\nconst X93 = X92;\nconst X94 = X93;\nconst X95 = X94;\nconst X96 = X95;\nconst X97 = X96;\nconst X98 = X97;\nconst X99 = X98;\nconst X100 = X99;\nconst X101 = X100;\nconst X102 = X101;\nconst X103 = X102;\nconst X104 = X103;\nconst X105 = X104;\nconst X106 = X105;\nconst X107 = X106;\nconst X108 = X107;\nconst X109 = X108;\nconst X110 = X109;\nconst X111 = X110;\nconst X112 = X111;\nconst X113 = X112;\nconst X114 = X113;\nconst X115 = X114;\nconst X116 = X115;\nconst X117 = X116;\nconst X118 = X117;\nconst X119 = X118;\nconst X120 = X119;\nconst X121 = X120;\nconst X122 = X121;\nconst X123 = X122;\nconst X124 = X123;\nconst X125 = X124;\nconst X126 = X125;\nconst X127 = X126;\nconst X128 = X127;\nconst X129 = X128;\nconst X130 = X129;\nconst X131 = X130;\nconst X132 = X131;\nconst X133 = X132;\nconst X134 = X133;\nconst X135 = X134;\nconst X136 = X135;\nconst X137 = X136;\nconst X138 = X137;\nconst X139 = X138;\nconst X140 = X139;\nconst X141 = X140;\nconst X142 = X141;\nconst X143 = X142;\nconst X144 = X143;\nconst X145 = X144;\nconst X146 = X145;\nconst X147 = X146;\nconst X148 = X147;\nconst X149 = X148;\nconst X150 = X149;\nconst X151 = X150;\nconst X152 = X151;\nconst X153 = X152;\nconst X154 = X153;\nconst X155 = X154;\nconst X156 = X155;\nconst X157 = X156;\nconst X158 = X157;\nconst X159 = X158;\nconst X160 = X159;\nconst X161 = X160;\nconst X162 = X161;\nconst X163 = X162;\nconst X164 = X163;\nconst X165 = X164;\nconst X166 = X165;\nconst X167 = X166;\nconst X168 = X167;\nconst X169 = X168;\nconst X170 = X169;\nconst X171 = X170;\nconst X172 = X171;\nconst X173 = X172;\nconst X174 = X173;\nconst X175 = X174;\nconst X176 = X175;\nconst X177 = X176;\nconst X178 = X177;\nconst X179 = X178;\nconst X180 = X179;\nconst X181 = X180;\nconst X182 = X181;\nconst X183 = X182;\nconst X184 = X183;\nconst X185 = X184;\nconst X186 = X185;\nconst X187 = X186;\nconst X188 = X187;\nconst X189 = X188;\nconst X190 = X189;\nconst X191 = X190;\nconst X192 = X191;\nconst X193 = X192;\nconst X194 = X193;\nconst X195 = X194;\nconst X196 = X195;\nconst X197 = X196;\nconst X198 = X197;\nconst X199 = X198;\nconst X200 = X199;\nconst X201 = X200;\nconst X202 = X201;\nconst X203 = X202;\nconst X204 = X203;\nconst X205 = X204;\nconst X206 = X205;\nconst X207 = X206;\nconst X208 = X207;\nconst X209 = X208;\nconst X210 = X209;\nconst X211 = X210;\nconst X212 = X211;\nconst X213 = X212;\nconst X214 = X213;\nconst X215 = X214;\nconst X216 = X215;\nconst X217 = X216;\nconst X218 = X217;\nconst X219 = X218;\nconst X220 = X219;\nconst X221 = X220;\nconst X222 = X221;\nconst X223 = X222;\nconst X224 = X223;\nconst X225 = X224;\nconst X226 = X225;\nconst X227 = X226;\nconst X228 = X227;\nconst X229 = X228;\nconst X230 = X229;\nconst X231 = X230;\nconst X232 = X231;\nconst X233 = X232;\nconst X234 = X233;\nconst X235 = X234;\nconst X236 = X235;\nconst X237 = X236;\nconst X238 = X237;\nconst X239 = X238;\nconst X240 = X239;\nconst X241 = X240;\nconst X242 = X241;\nconst X243 = X242;\nconst X244 = X243;\nconst X245 = X244;\nconst X246 = X245;\nconst X247 = X246;\nconst X248 = X247;\nconst X249 = X248;\nconst X250 = X249;\nconst X251 = X250;\nconst X252 = X251;\nconst X253 = X252;\nconst X254 = X253;\nconst X255 = X254;\nconst X256 = X255;\nconst X257 = X256;\nconst X258 = X257;\nconst X259 = X258;\nconst X260 = X259;\nconst X261 = X260;\nconst X262 = X261;\nconst X263 = X262;\nconst X264 = X263;\nconst X265 = X264;\nconst X266 = X265;\nconst X267 = X266;\nconst X268 = X267;\nconst X269 = X268;\nconst X270 = X269;\nconst X271 = X270;\nconst X272 = X271;\nconst X273 = X272;\nconst X274 = X273;\nconst X275 = X274;\nconst X276 = X275;\nconst X277 = X276;\nconst X278 = X277;\nconst X279 = X278;\nconst X280 = X279;\nconst X281 = X280;\nconst X282 = X281;\nconst X283 = X282;\nconst X284 = X283;\nconst X285 = X284;\nconst X286 = X285;\nconst X287 = X286;\nconst X288 = X287;\nconst X289 = X288;\nconst X290 = X289;\nconst X291 = X290;\nconst X292 = X291;\nconst X293 = X292;\nconst X294 = X293;\nconst X295 = X294;\nconst X296 = X295;\nconst X297 = X296;\nconst X298 = X297;\nconst X299 = X298;\nconst X300 = X299;\nconst X301 = X300;\nconst X302 = X301;\nconst X303 = X302;\nconst X304 = X303;\nconst X305 = X304;\nconst X306 = X305;\nconst X307 = X306;\nconst X308 = X307;\nconst X309 = X308;\nconst X310 = X309;\nconst X311 = X310;\nconst X312 = X311;\nconst X313 = X312;\nconst X314 = X313;\nconst X315 = X314;\nconst X316 = X315;\nconst X317 = X316;\nconst X318 = X317;\nconst X319 = X318;\nconst X320 = X319;\nconst X321 = X320;\nconst X322 = X321;\nconst X323 = X322;\nconst X324 = X323;\nconst X325 = X324;\nconst X326 = X325;\nconst X327 = X326;\nconst X328 = X327;\nconst X329 = X328;\nconst X330 = X329;\nconst X331 = X330;\nconst X332 = X331;\nconst X333 = X332;\nconst X334 = X333;\nconst X335 = X334;\nconst X336 = X335;\nconst X337 = X336;\nconst X338 = X337;\nconst X339 = X338;\nconst X340 = X339;\nconst X341 = X340;\nconst X342 = X341;\nconst X343 = X342;\nconst X344 = X343;\nconst X345 = X344;\nconst X346 = X345;\nconst X347 = X346;\nconst X348 = X347;\nconst X349 = X348;\nconst X350 = X349;\nconst X351 = X350;\nconst X352 = X351;\nconst X353 = X352;\nconst X354 = X353;\nconst X355 = X354;\nconst X356 = X355;\nconst X357 = X356;\nconst X358 = X357;\nconst X359 = X358;\nconst X360 = X359;\nconst X361 = X360;\nconst X362 = X361;\nconst X363 = X362;\nconst X364 = X363;\nconst X365 = X364;\nconst X366 = X365;\nconst X367 = X366;\nconst X368 = X367;\nconst X369 = X368;\nconst X370 = X369;\nconst X371 = X370;\nconst X372 = X371;\nconst X373 = X372;\nconst X374 = X373;\nconst X375 = X374;\nconst X376 = X375;\nconst X377 = X376;\nconst X378 = X377;\nconst X379 = X378;\nconst X380 = X379;\nconst X381 = X380;\nconst X382 = X381;\nconst X383 = X382;\nconst X384 = X383;\nconst X385 = X384;\nconst X386 = X385;\nconst X387 = X386;\nconst X388 = X387;\nconst X389 = X388;\nconst X390 = X389;\nconst X391 = X390;\nconst X392 = X391;\nconst X393 = X392;\nconst X394 = X393;\nconst X395 = X394;\nconst X396 = X395;\nconst X397 = X396;\nconst X398 = X397;\nconst X399 = X398;\nconst X400 = X399;\nconst X401 = X400;\nconst X402 = X401;\nconst X403 = X402;\nconst X404 = X403;\nconst X405 = X404;\nconst X406 = X405;\nconst X407 = X406;\nconst X408 = X407;\nconst X409 = X408;\nconst X410 = X409;\nconst X411 = X410;\nconst X412 = X411;\nconst X413 = X412;\nconst X414 = X413;\nconst X415 = X414;\nconst X416 = X415;\nconst X417 = X416;\nconst X418 = X417;\nconst X419 = X418;\nconst X420 = X419;\nconst X421 = X420;\nconst X422 = X421;\nconst X423 = X422;\nconst X424 = X423;\nconst X425 = X424;\nconst X426 = X425;\nconst X427 = X426;\nconst X428 = X427;\nconst X429 = X428;\nconst X430 = X429;\nconst X431 = X430;\nconst X432 = X431;\nconst X433 = X432;\nconst X434 = X433;\nconst X435 = X434;\nconst X436 = X435;\nconst X437 = X436;\nconst X438 = X437;\nconst X439 = X438;\nconst X440 = X439;\nconst X441 = X440;\nconst X442 = X441;\nconst X443 = X442;\nconst X444 = X443;\nconst X445 = X444;\nconst X446 = X445;\nconst X447 = X446;\nconst X448 = X447;\nconst X449 = X448;\nconst X450 = X449;\nconst X451 = X450;\nconst X452 = X451;\nconst X453 = X452;\nconst X454 = X453;\nconst X455 = X454;\nconst X456 = X455;\nconst X457 = X456;\nconst X458 = X457;\nconst X459 = X458;\nconst X460 = X459;\nconst X461 = X460;\nconst X462 = X461;\nconst X463 = X462;\nconst X464 = X463;\nconst X465 = X464;\nconst X466 = X465;\nconst X467 = X466;\nconst X468 = X467;\nconst X469 = X468;\nconst X470 = X469;\nconst X471 = X470;\nconst X472 = X471;\nconst X473 = X472;\nconst X474 = X473;\nconst X475 = X474;\nconst X476 = X475;\nconst X477 = X476;\nconst X478 = X477;\nconst X479 = X478;\nconst X480 = X479;\nconst X481 = X480;\nconst X482 = X481;\nconst X483 = X482;\nconst X484 = X483;\nconst X485 = X484;\nconst X486 = X485;\nconst X487 = X486;\nconst X488 = X487;\nconst X489 = X488;\nconst X490 = X489;\nconst X491 = X490;\nconst X492 = X491;\nconst X493 = X492;\nconst X494 = X493;\nconst X495 = X494;\nconst X496 = X495;\nconst X497 = X496;\nconst X498 = X497;\nconst X499 = X498;\nconst X500 = X499;\nconst X501 = X500;\nconst X502 = X501;\nconst X503 = X502;\nconst X504 = X503;\nconst X505 = X504;\nconst X506 = X505;\nconst X507 = X506;\nconst X508 = X507;\nconst X509 = X508;\nconst X510 = X509;\nconst X511 = X510;\nconst X512 = X511;\nconst X513 = X512;\nconst X514 = X513;\nconst X515 = X514;\nconst X516 = X515;\nconst X517 = X516;\nconst X518 = X517;\nconst X519 = X518;\nconst X520 = X519;\nconst X521 = X520;\nconst X522 = X521;\nconst X523 = X522;\nconst X524 = X523;\nconst X525 = X524;\nconst X526 = X525;\nconst X527 = X526;\nconst X528 = X527;\nconst X529 = X528;\nconst X530 = X529;\nconst X531 = X530;\nconst X532 = X531;\nconst X533 = X532;\nconst X534 = X533;\nconst X535 = X534;\nconst X536 = X535;\nconst X537 = X536;\nconst X538 = X537;\nconst X539 = X538;\nconst X540 = X539;\nconst X541 = X540;\nconst X542 = X541;\nconst X543 = X542;\nconst X544 = X543;\nconst X545 = X544;\nconst X546 = X545;\nconst X547 = X546;\nconst X548 = X547;\nconst X549 = X548;\nconst X550 = X549;\nconst X551 = X550;\nconst X552 = X551;\nconst X553 = X552;\nconst X554 = X553;\nconst X555 = X554;\nconst X556 = X555;\nconst X557 = X556;\nconst X558 = X557;\nconst X559 = X558;\nconst X560 = X559;\nconst X561 = X560;\nconst X562 = X561;\nconst X563 = X562;\nconst X564 = X563;\nconst X565 = X564;\nconst X566 = X565;\nconst X567 = X566;\nconst X568 = X567;\nconst X569 = X568;\nconst X570 = X569;\nconst X571 = X570;\nconst X572 = X571;\nconst X573 = X572;\nconst X574 = X573;\nconst X575 = X574;\nconst X576 = X575;\nconst X577 = X576;\nconst X578 = X577;\nconst X579 = X578;\nconst X580 = X579;\nconst X581 = X580;\nconst X582 = X581;\nconst X583 = X582;\nconst X584 = X583;\nconst X585 = X584;\nconst X586 = X585;\nconst X587 = X586;\nconst X588 = X587;\nconst X589 = X588;\nconst X590 = X589;\nconst X591 = X590;\nconst X592 = X591;\nconst X593 = X592;\nconst X594 = X593;\nconst X595 = X594;\nconst X596 = X595;\nconst X597 = X596;\nconst X598 = X597;\nconst X599 = X598;\nconst X600 = X599;\nconst X601 = X600;\nconst X602 = X601;\nconst X603 = X602;\nconst X604 = X603;\nconst X605 = X604;\nconst X606 = X605;\nconst X607 = X606;\nconst X608 = X607;\nconst X609 = X608;\nconst X610 = X609;\nconst X611 = X610;\nconst X612 = X611;\nconst X613 = X612;\nconst X614 = X613;\nconst X615 = X614;\nconst X616 = X615;\nconst X617 = X616;\nconst X618 = X617;\nconst X619 = X618;\nconst X620 = X619;\nconst X621 = X620;\nconst X622 = X621;\nconst X623 = X622;\nconst X624 = X623;\nconst X625 = X624;\nconst X626 = X625;\nconst X627 = X626;\nconst X628 = X627;\nconst X629 = X628;\nconst X630 = X629;\nconst X631 = X630;\nconst X632 = X631;\nconst X633 = X632;\nconst X634 = X633;\nconst X635 = X634;\nconst X636 = X635;\nconst X637 = X636;\nconst X638 = X637;\nconst X639 = X638;\nconst X640 = X639;\nconst X641 = X640;\nconst X642 = X641;\nconst X643 = X642;\nconst X644 = X643;\nconst X645 = X644;\nconst X646 = X645;\nconst X647 = X646;\nconst X648 = X647;\nconst X649 = X648;\nconst X650 = X649;\nconst X651 = X650;\nconst X652 = X651;\nconst X653 = X652;\nconst X654 = X653;\nconst X655 = X654;\nconst X656 = X655;\nconst X657 = X656;\nconst X658 = X657;\nconst X659 = X658;\nconst X660 = X659;\nconst X661 = X660;\nconst X662 = X661;\nconst X663 = X662;\nconst X664 = X663;\nconst X665 = X664;\nconst X666 = X665;\nconst X667 = X666;\nconst X668 = X667;\nconst X669 = X668;\nconst X670 = X669;\nconst X671 = X670;\nconst X672 = X671;\nconst X673 = X672;\nconst X674 = X673;\nconst X675 = X674;\nconst X676 = X675;\nconst X677 = X676;\nconst X678 = X677;\nconst X679 = X678;\nconst X680 = X679;\nconst X681 = X680;\nconst X682 = X681;\nconst X683 = X682;\nconst X684 = X683;\nconst X685 = X684;\nconst X686 = X685;\nconst X687 = X686;\nconst X688 = X687;\nconst X689 = X688;\nconst X690 = X689;\nconst X691 = X690;\nconst X692 = X691;\nconst X693 = X692;\nconst X694 = X693;\nconst X695 = X694;\nconst X696 = X695;\nconst X697 = X696;\nconst X698 = X697;\nconst X699 = X698;\nconst X700 = X699;\nconst X701 = X700;\nconst X702 = X701;\nconst X703 = X702;\nconst X704 = X703;\nconst X705 = X704;\nconst X706 = X705;\nconst X707 = X706;\nconst X708 = X707;\nconst X709 = X708;\nconst X710 = X709;\nconst X711 = X710;\nconst X712 = X711;\nconst X713 = X712;\nconst X714 = X713;\nconst X715 = X714;\nconst X716 = X715;\nconst X717 = X716;\nconst X718 = X717;\nconst X719 = X718;\nconst X720 = X719;\nconst X721 = X720;\nconst X722 = X721;\nconst X723 = X722;\nconst X724 = X723;\nconst X725 = X724;\nconst X726 = X725;\nconst X727 = X726;\nconst X728 = X727;\nconst X729 = X728;\nconst X730 = X729;\nconst X731 = X730;\nconst X732 = X731;\nconst X733 = X732;\nconst X734 = X733;\nconst X735 = X734;\nconst X736 = X735;\nconst X737 = X736;\nconst X738 = X737;\nconst X739 = X738;\nconst X740 = X739;\nconst X741 = X740;\nconst X742 = X741;\nconst X743 = X742;\nconst X744 = X743;\nconst X745 = X744;\nconst X746 = X745;\nconst X747 = X746;\nconst X748 = X747;\nconst X749 = X748;\nconst X750 = X749;\nconst X751 = X750;\nconst X752 = X751;\nconst X753 = X752;\nconst X754 = X753;\nconst X755 = X754;\nconst X756 = X755;\nconst X757 = X756;\nconst X758 = X757;\nconst X759 = X758;\nconst X760 = X759;\nconst X761 = X760;\nconst X762 = X761;\nconst X763 = X762;\nconst X764 = X763;\nconst X765 = X764;\nconst X766 = X765;\nconst X767 = X766;\nconst X768 = X767;\nconst X769 = X768;\nconst X770 = X769;\nconst X771 = X770;\nconst X772 = X771;\nconst X773 = X772;\nconst X774 = X773;\nconst X775 = X774;\nconst X776 = X775;\nconst X777 = X776;\nconst X778 = X777;\nconst X779 = X778;\nconst X780 = X779;\nconst X781 = X780;\nconst X782 = X781;\nconst X783 = X782;\nconst X784 = X783;\nconst X785 = X784;\nconst X786 = X785;\nconst X787 = X786;\nconst X788 = X787;\nconst X789 = X788;\nconst X790 = X789;\nconst X791 = X790;\nconst X792 = X791;\nconst X793 = X792;\nconst X794 = X793;\nconst X795 = X794;\nconst X796 = X795;\nconst X797 = X796;\nconst X798 = X797;\nconst X799 = X798;\nconst X800 = X799;\nconst X801 = X800;\nconst X802 = X801;\nconst X803 = X802;\nconst X804 = X803;\nconst X805 = X804;\nconst X806 = X805;\nconst X807 = X806;\nconst X808 = X807;\nconst X809 = X808;\nconst X810 = X809;\nconst X811 = X810;\nconst X812 = X811;\nconst X813 = X812;\nconst X814 = X813;\nconst X815 = X814;\nconst X816 = X815;\nconst X817 = X816;\nconst X818 = X817;\nconst X819 = X818;\nconst X820 = X819;\nconst X821 = X820;\nconst X822 = X821;\nconst X823 = X822;\nconst X824 = X823;\nconst X825 = X824;\nconst X826 = X825;\nconst X827 = X826;\nconst X828 = X827;\nconst X829 = X828;\nconst X830 = X829;\nconst X831 = X830;\nconst X832 = X831;\nconst X833 = X832;\nconst X834 = X833;\nconst X835 = X834;\nconst X836 = X835;\nconst X837 = X836;\nconst X838 = X837;\nconst X839 = X838;\nconst X840 = X839;\nconst X841 = X840;\nconst X842 = X841;\nconst X843 = X842;\nconst X844 = X843;\nconst X845 = X844;\nconst X846 = X845;\nconst X847 = X846;\nconst X848 = X847;\nconst X849 = X848;\nconst X850 = X849;\nconst X851 = X850;\nconst X852 = X851;\nconst X853 = X852;\nconst X854 = X853;\nconst X855 = X854;\nconst X856 = X855;\nconst X857 = X856;\nconst X858 = X857;\nconst X859 = X858;\nconst X860 = X859;\nconst X861 = X860;\nconst X862 = X861;\nconst X863 = X862;\nconst X864 = X863;\nconst X865 = X864;\nconst X866 = X865;\nconst X867 = X866;\nconst X868 = X867;\nconst X869 = X868;\nconst X870 = X869;\nconst X871 = X870;\nconst X872 = X871;\nconst X873 = X872;\nconst X874 = X873;\nconst X875 = X874;\nconst X876 = X875;\nconst X877 = X876;\nconst X878 = X877;\nconst X879 = X878;\nconst X880 = X879;\nconst X881 = X880;\nconst X882 = X881;\nconst X883 = X882;\nconst X884 = X883;\nconst X885 = X884;\nconst X886 = X885;\nconst X887 = X886;\nconst X888 = X887;\nconst X889 = X888;\nconst X890 = X889;\nconst X891 = X890;\nconst X892 = X891;\nconst X893 = X892;\nconst X894 = X893;\nconst X895 = X894;\nconst X896 = X895;\nconst X897 = X896;\nconst X898 = X897;\nconst X899 = X898;\nconst X900 = X899;\nconst X901 = X900;\nconst X902 = X901;\nconst X903 = X902;\nconst X904 = X903;\nconst X905 = X904;\nconst X906 = X905;\nconst X907 = X906;\nconst X908 = X907;\nconst X909 = X908;\nconst X910 = X909;\nconst X911 = X910;\nconst X912 = X911;\nconst X913 = X912;\nconst X914 = X913;\nconst X915 = X914;\nconst X916 = X915;\nconst X917 = X916;\nconst X918 = X917;\nconst X919 = X918;\nconst X920 = X919;\nconst X921 = X920;\nconst X922 = X921;\nconst X923 = X922;\nconst X924 = X923;\nconst X925 = X924;\nconst X926 = X925;\nconst X927 = X926;\nconst X928 = X927;\nconst X929 = X928;\nconst X930 = X929;\nconst X931 = X930;\nconst X932 = X931;\nconst X933 = X932;\nconst X934 = X933;\nconst X935 = X934;\nconst X936 = X935;\nconst X937 = X936;\nconst X938 = X937;\nconst X939 = X938;\nconst X940 = X939;\nconst X941 = X940;\nconst X942 = X941;\nconst X943 = X942;\nconst X944 = X943;\nconst X945 = X944;\nconst X946 = X945;\nconst X947 = X946;\nconst X948 = X947;\nconst X949 = X948;\nconst X950 = X949;\nconst X951 = X950;\nconst X952 = X951;\nconst X953 = X952;\nconst X954 = X953;\nconst X955 = X954;\nconst X956 = X955;\nconst X957 = X956;\nconst X958 = X957;\nconst X959 = X958;\nconst X960 = X959;\nconst X961 = X960;\nconst X962 = X961;\nconst X963 = X962;\nconst X964 = X963;\nconst X965 = X964;\nconst X966 = X965;\nconst X967 = X966;\nconst X968 = X967;\nconst X969 = X968;\nconst X970 = X969;\nconst X971 = X970;\nconst X972 = X971;\nconst X973 = X972;\nconst X974 = X973;\nconst X975 = X974;\nconst X976 = X975;\nconst X977 = X976;\nconst X978 = X977;\nconst X979 = X978;\nconst X980 = X979;\nconst X981 = X980;\nconst X982 = X981;\nconst X983 = X982;\nconst X984 = X983;\nconst X985 = X984;\nconst X986 = X985;\nconst X987 = X986;\nconst X988 = X987;\nconst X989 = X988;\nconst X990 = X989;\nconst X991 = X990;\nconst X992 = X991;\nconst X993 = X992;\nconst X994 = X993;\nconst X995 = X994;\nconst X996 = X995;\nconst X997 = X996;\nconst X998 = X997;\nconst X999 = X998;\n\n@Directive({selector: '[d]', inputs: X999})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: [{1: 'x', name: 'a'}]})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], @@ -3246,1314 +3177,3295 @@ "dtsImports": [] }, { - "name": "probe: depth-chainSpread300", + "name": "probe: eval-objComputedNumDescribe", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nconst X0 = ['a'];\nconst X1 = [...X0];\nconst X2 = [...X1];\nconst X3 = [...X2];\nconst X4 = [...X3];\nconst X5 = [...X4];\nconst X6 = [...X5];\nconst X7 = [...X6];\nconst X8 = [...X7];\nconst X9 = [...X8];\nconst X10 = [...X9];\nconst X11 = [...X10];\nconst X12 = [...X11];\nconst X13 = [...X12];\nconst X14 = [...X13];\nconst X15 = [...X14];\nconst X16 = [...X15];\nconst X17 = [...X16];\nconst X18 = [...X17];\nconst X19 = [...X18];\nconst X20 = [...X19];\nconst X21 = [...X20];\nconst X22 = [...X21];\nconst X23 = [...X22];\nconst X24 = [...X23];\nconst X25 = [...X24];\nconst X26 = [...X25];\nconst X27 = [...X26];\nconst X28 = [...X27];\nconst X29 = [...X28];\nconst X30 = [...X29];\nconst X31 = [...X30];\nconst X32 = [...X31];\nconst X33 = [...X32];\nconst X34 = [...X33];\nconst X35 = [...X34];\nconst X36 = [...X35];\nconst X37 = [...X36];\nconst X38 = [...X37];\nconst X39 = [...X38];\nconst X40 = [...X39];\nconst X41 = [...X40];\nconst X42 = [...X41];\nconst X43 = [...X42];\nconst X44 = [...X43];\nconst X45 = [...X44];\nconst X46 = [...X45];\nconst X47 = [...X46];\nconst X48 = [...X47];\nconst X49 = [...X48];\nconst X50 = [...X49];\nconst X51 = [...X50];\nconst X52 = [...X51];\nconst X53 = [...X52];\nconst X54 = [...X53];\nconst X55 = [...X54];\nconst X56 = [...X55];\nconst X57 = [...X56];\nconst X58 = [...X57];\nconst X59 = [...X58];\nconst X60 = [...X59];\nconst X61 = [...X60];\nconst X62 = [...X61];\nconst X63 = [...X62];\nconst X64 = [...X63];\nconst X65 = [...X64];\nconst X66 = [...X65];\nconst X67 = [...X66];\nconst X68 = [...X67];\nconst X69 = [...X68];\nconst X70 = [...X69];\nconst X71 = [...X70];\nconst X72 = [...X71];\nconst X73 = [...X72];\nconst X74 = [...X73];\nconst X75 = [...X74];\nconst X76 = [...X75];\nconst X77 = [...X76];\nconst X78 = [...X77];\nconst X79 = [...X78];\nconst X80 = [...X79];\nconst X81 = [...X80];\nconst X82 = [...X81];\nconst X83 = [...X82];\nconst X84 = [...X83];\nconst X85 = [...X84];\nconst X86 = [...X85];\nconst X87 = [...X86];\nconst X88 = [...X87];\nconst X89 = [...X88];\nconst X90 = [...X89];\nconst X91 = [...X90];\nconst X92 = [...X91];\nconst X93 = [...X92];\nconst X94 = [...X93];\nconst X95 = [...X94];\nconst X96 = [...X95];\nconst X97 = [...X96];\nconst X98 = [...X97];\nconst X99 = [...X98];\nconst X100 = [...X99];\nconst X101 = [...X100];\nconst X102 = [...X101];\nconst X103 = [...X102];\nconst X104 = [...X103];\nconst X105 = [...X104];\nconst X106 = [...X105];\nconst X107 = [...X106];\nconst X108 = [...X107];\nconst X109 = [...X108];\nconst X110 = [...X109];\nconst X111 = [...X110];\nconst X112 = [...X111];\nconst X113 = [...X112];\nconst X114 = [...X113];\nconst X115 = [...X114];\nconst X116 = [...X115];\nconst X117 = [...X116];\nconst X118 = [...X117];\nconst X119 = [...X118];\nconst X120 = [...X119];\nconst X121 = [...X120];\nconst X122 = [...X121];\nconst X123 = [...X122];\nconst X124 = [...X123];\nconst X125 = [...X124];\nconst X126 = [...X125];\nconst X127 = [...X126];\nconst X128 = [...X127];\nconst X129 = [...X128];\nconst X130 = [...X129];\nconst X131 = [...X130];\nconst X132 = [...X131];\nconst X133 = [...X132];\nconst X134 = [...X133];\nconst X135 = [...X134];\nconst X136 = [...X135];\nconst X137 = [...X136];\nconst X138 = [...X137];\nconst X139 = [...X138];\nconst X140 = [...X139];\nconst X141 = [...X140];\nconst X142 = [...X141];\nconst X143 = [...X142];\nconst X144 = [...X143];\nconst X145 = [...X144];\nconst X146 = [...X145];\nconst X147 = [...X146];\nconst X148 = [...X147];\nconst X149 = [...X148];\nconst X150 = [...X149];\nconst X151 = [...X150];\nconst X152 = [...X151];\nconst X153 = [...X152];\nconst X154 = [...X153];\nconst X155 = [...X154];\nconst X156 = [...X155];\nconst X157 = [...X156];\nconst X158 = [...X157];\nconst X159 = [...X158];\nconst X160 = [...X159];\nconst X161 = [...X160];\nconst X162 = [...X161];\nconst X163 = [...X162];\nconst X164 = [...X163];\nconst X165 = [...X164];\nconst X166 = [...X165];\nconst X167 = [...X166];\nconst X168 = [...X167];\nconst X169 = [...X168];\nconst X170 = [...X169];\nconst X171 = [...X170];\nconst X172 = [...X171];\nconst X173 = [...X172];\nconst X174 = [...X173];\nconst X175 = [...X174];\nconst X176 = [...X175];\nconst X177 = [...X176];\nconst X178 = [...X177];\nconst X179 = [...X178];\nconst X180 = [...X179];\nconst X181 = [...X180];\nconst X182 = [...X181];\nconst X183 = [...X182];\nconst X184 = [...X183];\nconst X185 = [...X184];\nconst X186 = [...X185];\nconst X187 = [...X186];\nconst X188 = [...X187];\nconst X189 = [...X188];\nconst X190 = [...X189];\nconst X191 = [...X190];\nconst X192 = [...X191];\nconst X193 = [...X192];\nconst X194 = [...X193];\nconst X195 = [...X194];\nconst X196 = [...X195];\nconst X197 = [...X196];\nconst X198 = [...X197];\nconst X199 = [...X198];\nconst X200 = [...X199];\nconst X201 = [...X200];\nconst X202 = [...X201];\nconst X203 = [...X202];\nconst X204 = [...X203];\nconst X205 = [...X204];\nconst X206 = [...X205];\nconst X207 = [...X206];\nconst X208 = [...X207];\nconst X209 = [...X208];\nconst X210 = [...X209];\nconst X211 = [...X210];\nconst X212 = [...X211];\nconst X213 = [...X212];\nconst X214 = [...X213];\nconst X215 = [...X214];\nconst X216 = [...X215];\nconst X217 = [...X216];\nconst X218 = [...X217];\nconst X219 = [...X218];\nconst X220 = [...X219];\nconst X221 = [...X220];\nconst X222 = [...X221];\nconst X223 = [...X222];\nconst X224 = [...X223];\nconst X225 = [...X224];\nconst X226 = [...X225];\nconst X227 = [...X226];\nconst X228 = [...X227];\nconst X229 = [...X228];\nconst X230 = [...X229];\nconst X231 = [...X230];\nconst X232 = [...X231];\nconst X233 = [...X232];\nconst X234 = [...X233];\nconst X235 = [...X234];\nconst X236 = [...X235];\nconst X237 = [...X236];\nconst X238 = [...X237];\nconst X239 = [...X238];\nconst X240 = [...X239];\nconst X241 = [...X240];\nconst X242 = [...X241];\nconst X243 = [...X242];\nconst X244 = [...X243];\nconst X245 = [...X244];\nconst X246 = [...X245];\nconst X247 = [...X246];\nconst X248 = [...X247];\nconst X249 = [...X248];\nconst X250 = [...X249];\nconst X251 = [...X250];\nconst X252 = [...X251];\nconst X253 = [...X252];\nconst X254 = [...X253];\nconst X255 = [...X254];\nconst X256 = [...X255];\nconst X257 = [...X256];\nconst X258 = [...X257];\nconst X259 = [...X258];\nconst X260 = [...X259];\nconst X261 = [...X260];\nconst X262 = [...X261];\nconst X263 = [...X262];\nconst X264 = [...X263];\nconst X265 = [...X264];\nconst X266 = [...X265];\nconst X267 = [...X266];\nconst X268 = [...X267];\nconst X269 = [...X268];\nconst X270 = [...X269];\nconst X271 = [...X270];\nconst X272 = [...X271];\nconst X273 = [...X272];\nconst X274 = [...X273];\nconst X275 = [...X274];\nconst X276 = [...X275];\nconst X277 = [...X276];\nconst X278 = [...X277];\nconst X279 = [...X278];\nconst X280 = [...X279];\nconst X281 = [...X280];\nconst X282 = [...X281];\nconst X283 = [...X282];\nconst X284 = [...X283];\nconst X285 = [...X284];\nconst X286 = [...X285];\nconst X287 = [...X286];\nconst X288 = [...X287];\nconst X289 = [...X288];\nconst X290 = [...X289];\nconst X291 = [...X290];\nconst X292 = [...X291];\nconst X293 = [...X292];\nconst X294 = [...X293];\nconst X295 = [...X294];\nconst X296 = [...X295];\nconst X297 = [...X296];\nconst X298 = [...X297];\nconst X299 = [...X298];\n\n@Directive({selector: '[d]', inputs: X299})\nexport class Dir {}\n" - }, - "diagnostics": [], - "diagnosticSpans": [], - "classes": { - "Dir": { - "inputs": "{a:\"a\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } - }, - "dtsImports": [] - }, - { - "name": "probe: depth-chainSpread1000", - "origin": "probe", - "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nconst X0 = ['a'];\nconst X1 = [...X0];\nconst X2 = [...X1];\nconst X3 = [...X2];\nconst X4 = [...X3];\nconst X5 = [...X4];\nconst X6 = [...X5];\nconst X7 = [...X6];\nconst X8 = [...X7];\nconst X9 = [...X8];\nconst X10 = [...X9];\nconst X11 = [...X10];\nconst X12 = [...X11];\nconst X13 = [...X12];\nconst X14 = [...X13];\nconst X15 = [...X14];\nconst X16 = [...X15];\nconst X17 = [...X16];\nconst X18 = [...X17];\nconst X19 = [...X18];\nconst X20 = [...X19];\nconst X21 = [...X20];\nconst X22 = [...X21];\nconst X23 = [...X22];\nconst X24 = [...X23];\nconst X25 = [...X24];\nconst X26 = [...X25];\nconst X27 = [...X26];\nconst X28 = [...X27];\nconst X29 = [...X28];\nconst X30 = [...X29];\nconst X31 = [...X30];\nconst X32 = [...X31];\nconst X33 = [...X32];\nconst X34 = [...X33];\nconst X35 = [...X34];\nconst X36 = [...X35];\nconst X37 = [...X36];\nconst X38 = [...X37];\nconst X39 = [...X38];\nconst X40 = [...X39];\nconst X41 = [...X40];\nconst X42 = [...X41];\nconst X43 = [...X42];\nconst X44 = [...X43];\nconst X45 = [...X44];\nconst X46 = [...X45];\nconst X47 = [...X46];\nconst X48 = [...X47];\nconst X49 = [...X48];\nconst X50 = [...X49];\nconst X51 = [...X50];\nconst X52 = [...X51];\nconst X53 = [...X52];\nconst X54 = [...X53];\nconst X55 = [...X54];\nconst X56 = [...X55];\nconst X57 = [...X56];\nconst X58 = [...X57];\nconst X59 = [...X58];\nconst X60 = [...X59];\nconst X61 = [...X60];\nconst X62 = [...X61];\nconst X63 = [...X62];\nconst X64 = [...X63];\nconst X65 = [...X64];\nconst X66 = [...X65];\nconst X67 = [...X66];\nconst X68 = [...X67];\nconst X69 = [...X68];\nconst X70 = [...X69];\nconst X71 = [...X70];\nconst X72 = [...X71];\nconst X73 = [...X72];\nconst X74 = [...X73];\nconst X75 = [...X74];\nconst X76 = [...X75];\nconst X77 = [...X76];\nconst X78 = [...X77];\nconst X79 = [...X78];\nconst X80 = [...X79];\nconst X81 = [...X80];\nconst X82 = [...X81];\nconst X83 = [...X82];\nconst X84 = [...X83];\nconst X85 = [...X84];\nconst X86 = [...X85];\nconst X87 = [...X86];\nconst X88 = [...X87];\nconst X89 = [...X88];\nconst X90 = [...X89];\nconst X91 = [...X90];\nconst X92 = [...X91];\nconst X93 = [...X92];\nconst X94 = [...X93];\nconst X95 = [...X94];\nconst X96 = [...X95];\nconst X97 = [...X96];\nconst X98 = [...X97];\nconst X99 = [...X98];\nconst X100 = [...X99];\nconst X101 = [...X100];\nconst X102 = [...X101];\nconst X103 = [...X102];\nconst X104 = [...X103];\nconst X105 = [...X104];\nconst X106 = [...X105];\nconst X107 = [...X106];\nconst X108 = [...X107];\nconst X109 = [...X108];\nconst X110 = [...X109];\nconst X111 = [...X110];\nconst X112 = [...X111];\nconst X113 = [...X112];\nconst X114 = [...X113];\nconst X115 = [...X114];\nconst X116 = [...X115];\nconst X117 = [...X116];\nconst X118 = [...X117];\nconst X119 = [...X118];\nconst X120 = [...X119];\nconst X121 = [...X120];\nconst X122 = [...X121];\nconst X123 = [...X122];\nconst X124 = [...X123];\nconst X125 = [...X124];\nconst X126 = [...X125];\nconst X127 = [...X126];\nconst X128 = [...X127];\nconst X129 = [...X128];\nconst X130 = [...X129];\nconst X131 = [...X130];\nconst X132 = [...X131];\nconst X133 = [...X132];\nconst X134 = [...X133];\nconst X135 = [...X134];\nconst X136 = [...X135];\nconst X137 = [...X136];\nconst X138 = [...X137];\nconst X139 = [...X138];\nconst X140 = [...X139];\nconst X141 = [...X140];\nconst X142 = [...X141];\nconst X143 = [...X142];\nconst X144 = [...X143];\nconst X145 = [...X144];\nconst X146 = [...X145];\nconst X147 = [...X146];\nconst X148 = [...X147];\nconst X149 = [...X148];\nconst X150 = [...X149];\nconst X151 = [...X150];\nconst X152 = [...X151];\nconst X153 = [...X152];\nconst X154 = [...X153];\nconst X155 = [...X154];\nconst X156 = [...X155];\nconst X157 = [...X156];\nconst X158 = [...X157];\nconst X159 = [...X158];\nconst X160 = [...X159];\nconst X161 = [...X160];\nconst X162 = [...X161];\nconst X163 = [...X162];\nconst X164 = [...X163];\nconst X165 = [...X164];\nconst X166 = [...X165];\nconst X167 = [...X166];\nconst X168 = [...X167];\nconst X169 = [...X168];\nconst X170 = [...X169];\nconst X171 = [...X170];\nconst X172 = [...X171];\nconst X173 = [...X172];\nconst X174 = [...X173];\nconst X175 = [...X174];\nconst X176 = [...X175];\nconst X177 = [...X176];\nconst X178 = [...X177];\nconst X179 = [...X178];\nconst X180 = [...X179];\nconst X181 = [...X180];\nconst X182 = [...X181];\nconst X183 = [...X182];\nconst X184 = [...X183];\nconst X185 = [...X184];\nconst X186 = [...X185];\nconst X187 = [...X186];\nconst X188 = [...X187];\nconst X189 = [...X188];\nconst X190 = [...X189];\nconst X191 = [...X190];\nconst X192 = [...X191];\nconst X193 = [...X192];\nconst X194 = [...X193];\nconst X195 = [...X194];\nconst X196 = [...X195];\nconst X197 = [...X196];\nconst X198 = [...X197];\nconst X199 = [...X198];\nconst X200 = [...X199];\nconst X201 = [...X200];\nconst X202 = [...X201];\nconst X203 = [...X202];\nconst X204 = [...X203];\nconst X205 = [...X204];\nconst X206 = [...X205];\nconst X207 = [...X206];\nconst X208 = [...X207];\nconst X209 = [...X208];\nconst X210 = [...X209];\nconst X211 = [...X210];\nconst X212 = [...X211];\nconst X213 = [...X212];\nconst X214 = [...X213];\nconst X215 = [...X214];\nconst X216 = [...X215];\nconst X217 = [...X216];\nconst X218 = [...X217];\nconst X219 = [...X218];\nconst X220 = [...X219];\nconst X221 = [...X220];\nconst X222 = [...X221];\nconst X223 = [...X222];\nconst X224 = [...X223];\nconst X225 = [...X224];\nconst X226 = [...X225];\nconst X227 = [...X226];\nconst X228 = [...X227];\nconst X229 = [...X228];\nconst X230 = [...X229];\nconst X231 = [...X230];\nconst X232 = [...X231];\nconst X233 = [...X232];\nconst X234 = [...X233];\nconst X235 = [...X234];\nconst X236 = [...X235];\nconst X237 = [...X236];\nconst X238 = [...X237];\nconst X239 = [...X238];\nconst X240 = [...X239];\nconst X241 = [...X240];\nconst X242 = [...X241];\nconst X243 = [...X242];\nconst X244 = [...X243];\nconst X245 = [...X244];\nconst X246 = [...X245];\nconst X247 = [...X246];\nconst X248 = [...X247];\nconst X249 = [...X248];\nconst X250 = [...X249];\nconst X251 = [...X250];\nconst X252 = [...X251];\nconst X253 = [...X252];\nconst X254 = [...X253];\nconst X255 = [...X254];\nconst X256 = [...X255];\nconst X257 = [...X256];\nconst X258 = [...X257];\nconst X259 = [...X258];\nconst X260 = [...X259];\nconst X261 = [...X260];\nconst X262 = [...X261];\nconst X263 = [...X262];\nconst X264 = [...X263];\nconst X265 = [...X264];\nconst X266 = [...X265];\nconst X267 = [...X266];\nconst X268 = [...X267];\nconst X269 = [...X268];\nconst X270 = [...X269];\nconst X271 = [...X270];\nconst X272 = [...X271];\nconst X273 = [...X272];\nconst X274 = [...X273];\nconst X275 = [...X274];\nconst X276 = [...X275];\nconst X277 = [...X276];\nconst X278 = [...X277];\nconst X279 = [...X278];\nconst X280 = [...X279];\nconst X281 = [...X280];\nconst X282 = [...X281];\nconst X283 = [...X282];\nconst X284 = [...X283];\nconst X285 = [...X284];\nconst X286 = [...X285];\nconst X287 = [...X286];\nconst X288 = [...X287];\nconst X289 = [...X288];\nconst X290 = [...X289];\nconst X291 = [...X290];\nconst X292 = [...X291];\nconst X293 = [...X292];\nconst X294 = [...X293];\nconst X295 = [...X294];\nconst X296 = [...X295];\nconst X297 = [...X296];\nconst X298 = [...X297];\nconst X299 = [...X298];\nconst X300 = [...X299];\nconst X301 = [...X300];\nconst X302 = [...X301];\nconst X303 = [...X302];\nconst X304 = [...X303];\nconst X305 = [...X304];\nconst X306 = [...X305];\nconst X307 = [...X306];\nconst X308 = [...X307];\nconst X309 = [...X308];\nconst X310 = [...X309];\nconst X311 = [...X310];\nconst X312 = [...X311];\nconst X313 = [...X312];\nconst X314 = [...X313];\nconst X315 = [...X314];\nconst X316 = [...X315];\nconst X317 = [...X316];\nconst X318 = [...X317];\nconst X319 = [...X318];\nconst X320 = [...X319];\nconst X321 = [...X320];\nconst X322 = [...X321];\nconst X323 = [...X322];\nconst X324 = [...X323];\nconst X325 = [...X324];\nconst X326 = [...X325];\nconst X327 = [...X326];\nconst X328 = [...X327];\nconst X329 = [...X328];\nconst X330 = [...X329];\nconst X331 = [...X330];\nconst X332 = [...X331];\nconst X333 = [...X332];\nconst X334 = [...X333];\nconst X335 = [...X334];\nconst X336 = [...X335];\nconst X337 = [...X336];\nconst X338 = [...X337];\nconst X339 = [...X338];\nconst X340 = [...X339];\nconst X341 = [...X340];\nconst X342 = [...X341];\nconst X343 = [...X342];\nconst X344 = [...X343];\nconst X345 = [...X344];\nconst X346 = [...X345];\nconst X347 = [...X346];\nconst X348 = [...X347];\nconst X349 = [...X348];\nconst X350 = [...X349];\nconst X351 = [...X350];\nconst X352 = [...X351];\nconst X353 = [...X352];\nconst X354 = [...X353];\nconst X355 = [...X354];\nconst X356 = [...X355];\nconst X357 = [...X356];\nconst X358 = [...X357];\nconst X359 = [...X358];\nconst X360 = [...X359];\nconst X361 = [...X360];\nconst X362 = [...X361];\nconst X363 = [...X362];\nconst X364 = [...X363];\nconst X365 = [...X364];\nconst X366 = [...X365];\nconst X367 = [...X366];\nconst X368 = [...X367];\nconst X369 = [...X368];\nconst X370 = [...X369];\nconst X371 = [...X370];\nconst X372 = [...X371];\nconst X373 = [...X372];\nconst X374 = [...X373];\nconst X375 = [...X374];\nconst X376 = [...X375];\nconst X377 = [...X376];\nconst X378 = [...X377];\nconst X379 = [...X378];\nconst X380 = [...X379];\nconst X381 = [...X380];\nconst X382 = [...X381];\nconst X383 = [...X382];\nconst X384 = [...X383];\nconst X385 = [...X384];\nconst X386 = [...X385];\nconst X387 = [...X386];\nconst X388 = [...X387];\nconst X389 = [...X388];\nconst X390 = [...X389];\nconst X391 = [...X390];\nconst X392 = [...X391];\nconst X393 = [...X392];\nconst X394 = [...X393];\nconst X395 = [...X394];\nconst X396 = [...X395];\nconst X397 = [...X396];\nconst X398 = [...X397];\nconst X399 = [...X398];\nconst X400 = [...X399];\nconst X401 = [...X400];\nconst X402 = [...X401];\nconst X403 = [...X402];\nconst X404 = [...X403];\nconst X405 = [...X404];\nconst X406 = [...X405];\nconst X407 = [...X406];\nconst X408 = [...X407];\nconst X409 = [...X408];\nconst X410 = [...X409];\nconst X411 = [...X410];\nconst X412 = [...X411];\nconst X413 = [...X412];\nconst X414 = [...X413];\nconst X415 = [...X414];\nconst X416 = [...X415];\nconst X417 = [...X416];\nconst X418 = [...X417];\nconst X419 = [...X418];\nconst X420 = [...X419];\nconst X421 = [...X420];\nconst X422 = [...X421];\nconst X423 = [...X422];\nconst X424 = [...X423];\nconst X425 = [...X424];\nconst X426 = [...X425];\nconst X427 = [...X426];\nconst X428 = [...X427];\nconst X429 = [...X428];\nconst X430 = [...X429];\nconst X431 = [...X430];\nconst X432 = [...X431];\nconst X433 = [...X432];\nconst X434 = [...X433];\nconst X435 = [...X434];\nconst X436 = [...X435];\nconst X437 = [...X436];\nconst X438 = [...X437];\nconst X439 = [...X438];\nconst X440 = [...X439];\nconst X441 = [...X440];\nconst X442 = [...X441];\nconst X443 = [...X442];\nconst X444 = [...X443];\nconst X445 = [...X444];\nconst X446 = [...X445];\nconst X447 = [...X446];\nconst X448 = [...X447];\nconst X449 = [...X448];\nconst X450 = [...X449];\nconst X451 = [...X450];\nconst X452 = [...X451];\nconst X453 = [...X452];\nconst X454 = [...X453];\nconst X455 = [...X454];\nconst X456 = [...X455];\nconst X457 = [...X456];\nconst X458 = [...X457];\nconst X459 = [...X458];\nconst X460 = [...X459];\nconst X461 = [...X460];\nconst X462 = [...X461];\nconst X463 = [...X462];\nconst X464 = [...X463];\nconst X465 = [...X464];\nconst X466 = [...X465];\nconst X467 = [...X466];\nconst X468 = [...X467];\nconst X469 = [...X468];\nconst X470 = [...X469];\nconst X471 = [...X470];\nconst X472 = [...X471];\nconst X473 = [...X472];\nconst X474 = [...X473];\nconst X475 = [...X474];\nconst X476 = [...X475];\nconst X477 = [...X476];\nconst X478 = [...X477];\nconst X479 = [...X478];\nconst X480 = [...X479];\nconst X481 = [...X480];\nconst X482 = [...X481];\nconst X483 = [...X482];\nconst X484 = [...X483];\nconst X485 = [...X484];\nconst X486 = [...X485];\nconst X487 = [...X486];\nconst X488 = [...X487];\nconst X489 = [...X488];\nconst X490 = [...X489];\nconst X491 = [...X490];\nconst X492 = [...X491];\nconst X493 = [...X492];\nconst X494 = [...X493];\nconst X495 = [...X494];\nconst X496 = [...X495];\nconst X497 = [...X496];\nconst X498 = [...X497];\nconst X499 = [...X498];\nconst X500 = [...X499];\nconst X501 = [...X500];\nconst X502 = [...X501];\nconst X503 = [...X502];\nconst X504 = [...X503];\nconst X505 = [...X504];\nconst X506 = [...X505];\nconst X507 = [...X506];\nconst X508 = [...X507];\nconst X509 = [...X508];\nconst X510 = [...X509];\nconst X511 = [...X510];\nconst X512 = [...X511];\nconst X513 = [...X512];\nconst X514 = [...X513];\nconst X515 = [...X514];\nconst X516 = [...X515];\nconst X517 = [...X516];\nconst X518 = [...X517];\nconst X519 = [...X518];\nconst X520 = [...X519];\nconst X521 = [...X520];\nconst X522 = [...X521];\nconst X523 = [...X522];\nconst X524 = [...X523];\nconst X525 = [...X524];\nconst X526 = [...X525];\nconst X527 = [...X526];\nconst X528 = [...X527];\nconst X529 = [...X528];\nconst X530 = [...X529];\nconst X531 = [...X530];\nconst X532 = [...X531];\nconst X533 = [...X532];\nconst X534 = [...X533];\nconst X535 = [...X534];\nconst X536 = [...X535];\nconst X537 = [...X536];\nconst X538 = [...X537];\nconst X539 = [...X538];\nconst X540 = [...X539];\nconst X541 = [...X540];\nconst X542 = [...X541];\nconst X543 = [...X542];\nconst X544 = [...X543];\nconst X545 = [...X544];\nconst X546 = [...X545];\nconst X547 = [...X546];\nconst X548 = [...X547];\nconst X549 = [...X548];\nconst X550 = [...X549];\nconst X551 = [...X550];\nconst X552 = [...X551];\nconst X553 = [...X552];\nconst X554 = [...X553];\nconst X555 = [...X554];\nconst X556 = [...X555];\nconst X557 = [...X556];\nconst X558 = [...X557];\nconst X559 = [...X558];\nconst X560 = [...X559];\nconst X561 = [...X560];\nconst X562 = [...X561];\nconst X563 = [...X562];\nconst X564 = [...X563];\nconst X565 = [...X564];\nconst X566 = [...X565];\nconst X567 = [...X566];\nconst X568 = [...X567];\nconst X569 = [...X568];\nconst X570 = [...X569];\nconst X571 = [...X570];\nconst X572 = [...X571];\nconst X573 = [...X572];\nconst X574 = [...X573];\nconst X575 = [...X574];\nconst X576 = [...X575];\nconst X577 = [...X576];\nconst X578 = [...X577];\nconst X579 = [...X578];\nconst X580 = [...X579];\nconst X581 = [...X580];\nconst X582 = [...X581];\nconst X583 = [...X582];\nconst X584 = [...X583];\nconst X585 = [...X584];\nconst X586 = [...X585];\nconst X587 = [...X586];\nconst X588 = [...X587];\nconst X589 = [...X588];\nconst X590 = [...X589];\nconst X591 = [...X590];\nconst X592 = [...X591];\nconst X593 = [...X592];\nconst X594 = [...X593];\nconst X595 = [...X594];\nconst X596 = [...X595];\nconst X597 = [...X596];\nconst X598 = [...X597];\nconst X599 = [...X598];\nconst X600 = [...X599];\nconst X601 = [...X600];\nconst X602 = [...X601];\nconst X603 = [...X602];\nconst X604 = [...X603];\nconst X605 = [...X604];\nconst X606 = [...X605];\nconst X607 = [...X606];\nconst X608 = [...X607];\nconst X609 = [...X608];\nconst X610 = [...X609];\nconst X611 = [...X610];\nconst X612 = [...X611];\nconst X613 = [...X612];\nconst X614 = [...X613];\nconst X615 = [...X614];\nconst X616 = [...X615];\nconst X617 = [...X616];\nconst X618 = [...X617];\nconst X619 = [...X618];\nconst X620 = [...X619];\nconst X621 = [...X620];\nconst X622 = [...X621];\nconst X623 = [...X622];\nconst X624 = [...X623];\nconst X625 = [...X624];\nconst X626 = [...X625];\nconst X627 = [...X626];\nconst X628 = [...X627];\nconst X629 = [...X628];\nconst X630 = [...X629];\nconst X631 = [...X630];\nconst X632 = [...X631];\nconst X633 = [...X632];\nconst X634 = [...X633];\nconst X635 = [...X634];\nconst X636 = [...X635];\nconst X637 = [...X636];\nconst X638 = [...X637];\nconst X639 = [...X638];\nconst X640 = [...X639];\nconst X641 = [...X640];\nconst X642 = [...X641];\nconst X643 = [...X642];\nconst X644 = [...X643];\nconst X645 = [...X644];\nconst X646 = [...X645];\nconst X647 = [...X646];\nconst X648 = [...X647];\nconst X649 = [...X648];\nconst X650 = [...X649];\nconst X651 = [...X650];\nconst X652 = [...X651];\nconst X653 = [...X652];\nconst X654 = [...X653];\nconst X655 = [...X654];\nconst X656 = [...X655];\nconst X657 = [...X656];\nconst X658 = [...X657];\nconst X659 = [...X658];\nconst X660 = [...X659];\nconst X661 = [...X660];\nconst X662 = [...X661];\nconst X663 = [...X662];\nconst X664 = [...X663];\nconst X665 = [...X664];\nconst X666 = [...X665];\nconst X667 = [...X666];\nconst X668 = [...X667];\nconst X669 = [...X668];\nconst X670 = [...X669];\nconst X671 = [...X670];\nconst X672 = [...X671];\nconst X673 = [...X672];\nconst X674 = [...X673];\nconst X675 = [...X674];\nconst X676 = [...X675];\nconst X677 = [...X676];\nconst X678 = [...X677];\nconst X679 = [...X678];\nconst X680 = [...X679];\nconst X681 = [...X680];\nconst X682 = [...X681];\nconst X683 = [...X682];\nconst X684 = [...X683];\nconst X685 = [...X684];\nconst X686 = [...X685];\nconst X687 = [...X686];\nconst X688 = [...X687];\nconst X689 = [...X688];\nconst X690 = [...X689];\nconst X691 = [...X690];\nconst X692 = [...X691];\nconst X693 = [...X692];\nconst X694 = [...X693];\nconst X695 = [...X694];\nconst X696 = [...X695];\nconst X697 = [...X696];\nconst X698 = [...X697];\nconst X699 = [...X698];\nconst X700 = [...X699];\nconst X701 = [...X700];\nconst X702 = [...X701];\nconst X703 = [...X702];\nconst X704 = [...X703];\nconst X705 = [...X704];\nconst X706 = [...X705];\nconst X707 = [...X706];\nconst X708 = [...X707];\nconst X709 = [...X708];\nconst X710 = [...X709];\nconst X711 = [...X710];\nconst X712 = [...X711];\nconst X713 = [...X712];\nconst X714 = [...X713];\nconst X715 = [...X714];\nconst X716 = [...X715];\nconst X717 = [...X716];\nconst X718 = [...X717];\nconst X719 = [...X718];\nconst X720 = [...X719];\nconst X721 = [...X720];\nconst X722 = [...X721];\nconst X723 = [...X722];\nconst X724 = [...X723];\nconst X725 = [...X724];\nconst X726 = [...X725];\nconst X727 = [...X726];\nconst X728 = [...X727];\nconst X729 = [...X728];\nconst X730 = [...X729];\nconst X731 = [...X730];\nconst X732 = [...X731];\nconst X733 = [...X732];\nconst X734 = [...X733];\nconst X735 = [...X734];\nconst X736 = [...X735];\nconst X737 = [...X736];\nconst X738 = [...X737];\nconst X739 = [...X738];\nconst X740 = [...X739];\nconst X741 = [...X740];\nconst X742 = [...X741];\nconst X743 = [...X742];\nconst X744 = [...X743];\nconst X745 = [...X744];\nconst X746 = [...X745];\nconst X747 = [...X746];\nconst X748 = [...X747];\nconst X749 = [...X748];\nconst X750 = [...X749];\nconst X751 = [...X750];\nconst X752 = [...X751];\nconst X753 = [...X752];\nconst X754 = [...X753];\nconst X755 = [...X754];\nconst X756 = [...X755];\nconst X757 = [...X756];\nconst X758 = [...X757];\nconst X759 = [...X758];\nconst X760 = [...X759];\nconst X761 = [...X760];\nconst X762 = [...X761];\nconst X763 = [...X762];\nconst X764 = [...X763];\nconst X765 = [...X764];\nconst X766 = [...X765];\nconst X767 = [...X766];\nconst X768 = [...X767];\nconst X769 = [...X768];\nconst X770 = [...X769];\nconst X771 = [...X770];\nconst X772 = [...X771];\nconst X773 = [...X772];\nconst X774 = [...X773];\nconst X775 = [...X774];\nconst X776 = [...X775];\nconst X777 = [...X776];\nconst X778 = [...X777];\nconst X779 = [...X778];\nconst X780 = [...X779];\nconst X781 = [...X780];\nconst X782 = [...X781];\nconst X783 = [...X782];\nconst X784 = [...X783];\nconst X785 = [...X784];\nconst X786 = [...X785];\nconst X787 = [...X786];\nconst X788 = [...X787];\nconst X789 = [...X788];\nconst X790 = [...X789];\nconst X791 = [...X790];\nconst X792 = [...X791];\nconst X793 = [...X792];\nconst X794 = [...X793];\nconst X795 = [...X794];\nconst X796 = [...X795];\nconst X797 = [...X796];\nconst X798 = [...X797];\nconst X799 = [...X798];\nconst X800 = [...X799];\nconst X801 = [...X800];\nconst X802 = [...X801];\nconst X803 = [...X802];\nconst X804 = [...X803];\nconst X805 = [...X804];\nconst X806 = [...X805];\nconst X807 = [...X806];\nconst X808 = [...X807];\nconst X809 = [...X808];\nconst X810 = [...X809];\nconst X811 = [...X810];\nconst X812 = [...X811];\nconst X813 = [...X812];\nconst X814 = [...X813];\nconst X815 = [...X814];\nconst X816 = [...X815];\nconst X817 = [...X816];\nconst X818 = [...X817];\nconst X819 = [...X818];\nconst X820 = [...X819];\nconst X821 = [...X820];\nconst X822 = [...X821];\nconst X823 = [...X822];\nconst X824 = [...X823];\nconst X825 = [...X824];\nconst X826 = [...X825];\nconst X827 = [...X826];\nconst X828 = [...X827];\nconst X829 = [...X828];\nconst X830 = [...X829];\nconst X831 = [...X830];\nconst X832 = [...X831];\nconst X833 = [...X832];\nconst X834 = [...X833];\nconst X835 = [...X834];\nconst X836 = [...X835];\nconst X837 = [...X836];\nconst X838 = [...X837];\nconst X839 = [...X838];\nconst X840 = [...X839];\nconst X841 = [...X840];\nconst X842 = [...X841];\nconst X843 = [...X842];\nconst X844 = [...X843];\nconst X845 = [...X844];\nconst X846 = [...X845];\nconst X847 = [...X846];\nconst X848 = [...X847];\nconst X849 = [...X848];\nconst X850 = [...X849];\nconst X851 = [...X850];\nconst X852 = [...X851];\nconst X853 = [...X852];\nconst X854 = [...X853];\nconst X855 = [...X854];\nconst X856 = [...X855];\nconst X857 = [...X856];\nconst X858 = [...X857];\nconst X859 = [...X858];\nconst X860 = [...X859];\nconst X861 = [...X860];\nconst X862 = [...X861];\nconst X863 = [...X862];\nconst X864 = [...X863];\nconst X865 = [...X864];\nconst X866 = [...X865];\nconst X867 = [...X866];\nconst X868 = [...X867];\nconst X869 = [...X868];\nconst X870 = [...X869];\nconst X871 = [...X870];\nconst X872 = [...X871];\nconst X873 = [...X872];\nconst X874 = [...X873];\nconst X875 = [...X874];\nconst X876 = [...X875];\nconst X877 = [...X876];\nconst X878 = [...X877];\nconst X879 = [...X878];\nconst X880 = [...X879];\nconst X881 = [...X880];\nconst X882 = [...X881];\nconst X883 = [...X882];\nconst X884 = [...X883];\nconst X885 = [...X884];\nconst X886 = [...X885];\nconst X887 = [...X886];\nconst X888 = [...X887];\nconst X889 = [...X888];\nconst X890 = [...X889];\nconst X891 = [...X890];\nconst X892 = [...X891];\nconst X893 = [...X892];\nconst X894 = [...X893];\nconst X895 = [...X894];\nconst X896 = [...X895];\nconst X897 = [...X896];\nconst X898 = [...X897];\nconst X899 = [...X898];\nconst X900 = [...X899];\nconst X901 = [...X900];\nconst X902 = [...X901];\nconst X903 = [...X902];\nconst X904 = [...X903];\nconst X905 = [...X904];\nconst X906 = [...X905];\nconst X907 = [...X906];\nconst X908 = [...X907];\nconst X909 = [...X908];\nconst X910 = [...X909];\nconst X911 = [...X910];\nconst X912 = [...X911];\nconst X913 = [...X912];\nconst X914 = [...X913];\nconst X915 = [...X914];\nconst X916 = [...X915];\nconst X917 = [...X916];\nconst X918 = [...X917];\nconst X919 = [...X918];\nconst X920 = [...X919];\nconst X921 = [...X920];\nconst X922 = [...X921];\nconst X923 = [...X922];\nconst X924 = [...X923];\nconst X925 = [...X924];\nconst X926 = [...X925];\nconst X927 = [...X926];\nconst X928 = [...X927];\nconst X929 = [...X928];\nconst X930 = [...X929];\nconst X931 = [...X930];\nconst X932 = [...X931];\nconst X933 = [...X932];\nconst X934 = [...X933];\nconst X935 = [...X934];\nconst X936 = [...X935];\nconst X937 = [...X936];\nconst X938 = [...X937];\nconst X939 = [...X938];\nconst X940 = [...X939];\nconst X941 = [...X940];\nconst X942 = [...X941];\nconst X943 = [...X942];\nconst X944 = [...X943];\nconst X945 = [...X944];\nconst X946 = [...X945];\nconst X947 = [...X946];\nconst X948 = [...X947];\nconst X949 = [...X948];\nconst X950 = [...X949];\nconst X951 = [...X950];\nconst X952 = [...X951];\nconst X953 = [...X952];\nconst X954 = [...X953];\nconst X955 = [...X954];\nconst X956 = [...X955];\nconst X957 = [...X956];\nconst X958 = [...X957];\nconst X959 = [...X958];\nconst X960 = [...X959];\nconst X961 = [...X960];\nconst X962 = [...X961];\nconst X963 = [...X962];\nconst X964 = [...X963];\nconst X965 = [...X964];\nconst X966 = [...X965];\nconst X967 = [...X966];\nconst X968 = [...X967];\nconst X969 = [...X968];\nconst X970 = [...X969];\nconst X971 = [...X970];\nconst X972 = [...X971];\nconst X973 = [...X972];\nconst X974 = [...X973];\nconst X975 = [...X974];\nconst X976 = [...X975];\nconst X977 = [...X976];\nconst X978 = [...X977];\nconst X979 = [...X978];\nconst X980 = [...X979];\nconst X981 = [...X980];\nconst X982 = [...X981];\nconst X983 = [...X982];\nconst X984 = [...X983];\nconst X985 = [...X984];\nconst X986 = [...X985];\nconst X987 = [...X986];\nconst X988 = [...X987];\nconst X989 = [...X988];\nconst X990 = [...X989];\nconst X991 = [...X990];\nconst X992 = [...X991];\nconst X993 = [...X992];\nconst X994 = [...X993];\nconst X995 = [...X994];\nconst X996 = [...X995];\nconst X997 = [...X996];\nconst X998 = [...X997];\nconst X999 = [...X998];\n\n@Directive({selector: '[d]', inputs: X999})\nexport class Dir {}\n" - }, - "diagnostics": [], - "diagnosticSpans": [], - "classes": { - "Dir": { - "inputs": "{a:\"a\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: {[1]: 'x'}})\nexport class Dir {}\n" }, + "diagnostics": [ + "Failed to resolve @Directive.inputs to an array Value could not be determined statically." + ], + "diagnosticSpans": [[85, 95]], + "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-enumIndex", + "name": "probe: eval-objSpreadArray", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nenum E { A = 5, B, C = 'c', D }\n@Directive({selector: '[d]', inputs: [`x${E.A}${E.B}${E.C}${E.D}`]})\nexport class Dir {}\n" - }, - "diagnostics": [], - "diagnosticSpans": [], - "classes": { - "Dir": { - "inputs": "{x51c3:\"x51c3\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: [{...['x'], name: 'a'}]})\nexport class Dir {}\n" }, + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." + ], + "diagnosticSpans": [[85, 108]], + "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-enumStringKey", + "name": "probe: eval-objGetter", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nenum E { 'x-y' = 'q' }\n@Directive({selector: '[d]', inputs: [`${E['x-y']}`]})\nexport class Dir {}\n" - }, - "diagnostics": [], - "diagnosticSpans": [], - "classes": { - "Dir": { - "inputs": "{q:\"q\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: [{name: 'a', get x() { return 1; }}]})\nexport class Dir {}\n" }, + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." + ], + "diagnosticSpans": [[85, 121]], + "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-enumSelfRef", + "name": "probe: msg-spreadNonArray", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nenum E { A = 'x', B = A }\n@Directive({selector: '[d]', inputs: [`${E.B}`]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nconst S = 'ab';\n@Directive({selector: '[d]', inputs: ['x', ...S]})\nexport class Dir {}\n" }, "diagnostics": [ "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." ], - "diagnosticSpans": [[133, 143]], + "diagnosticSpans": [[101, 112]], "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-enumTwice", + "name": "probe: msg-spreadUnknown", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nenum E { A = 'x' }\nenum E { B = 1 }\n@Directive({selector: '[d]', inputs: [`${E.A}`, `${E.B}`]})\nexport class Dir {}\n" - }, - "diagnostics": [], - "diagnosticSpans": [], - "classes": { - "Dir": { - "inputs": "{x:\"x\",undefined:\"undefined\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "test.ts": "import {Directive, Input} from '@angular/core';\ndeclare function f(): any;\n@Directive({selector: '[d]', inputs: ['x', ...f()]})\nexport class Dir {}\n" }, + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." + ], + "diagnosticSpans": [[112, 125]], + "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-enumOutsideConst", + "name": "probe: msg-spreadRef", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nconst A = 'outer';\nenum E { A = 'x', B = A }\n@Directive({selector: '[d]', inputs: [`${E.B}`]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nclass U {}\n@Directive({selector: '[d]', inputs: ['x', ...U]})\nexport class Dir {}\n" }, "diagnostics": [ "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." ], - "diagnosticSpans": [[152, 162]], + "diagnosticSpans": [[96, 107]], "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-thisParam", + "name": "probe: msg-spreadNonArrayOutputs", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nfunction mk(this: any, x: string) { return [x]; }\n@Directive({selector: '[d]', inputs: mk('a', 'b')})\nexport class Dir {}\n" - }, - "diagnostics": [], - "diagnosticSpans": [], - "classes": { - "Dir": { - "inputs": "{b:\"b\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "test.ts": "import {Directive, Input} from '@angular/core';\nconst S = {a: 1};\n@Directive({selector: '[d]', outputs: ['x', ...S]})\nexport class Dir {}\n" }, + "diagnostics": [ + "Failed to resolve outputs at position 1 to a string Value could not be determined statically." + ], + "diagnosticSpans": [[104, 115]], + "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-typeofQualified", + "name": "probe: msg-spreadObjInArr", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nenum E { A = 'x' }\ndeclare const X: typeof E.A;\n@Directive({selector: '[d]', inputs: [X]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nconst S = {a: 1};\n@Directive({selector: '[d]', inputs: [...S]})\nexport class Dir {}\n" }, "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value is a reference to 'A'." + "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." ], - "diagnosticSpans": [[155, 158]], + "diagnosticSpans": [[103, 109]], "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-tupleNonLiteral", + "name": "probe: msg-objSpreadNonObject", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\ndeclare const X: ['a', string];\n@Directive({selector: '[d]', inputs: X})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: [{...'x', name: 'a'}]})\nexport class Dir {}\n" }, "diagnostics": [ "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." ], - "diagnosticSpans": [[139, 140]], + "diagnosticSpans": [[85, 106]], "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-tupleNeg", + "name": "probe: msg-objSpreadDynamic", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\ndeclare const X: [-1];\n@Directive({selector: '[d]', inputs: [`${X[0]}`]})\nexport class Dir {}\n" - }, - "diagnostics": [], - "diagnosticSpans": [], - "classes": { - "Dir": { - "inputs": "{\"-1\":\"-1\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "test.ts": "import {Directive, Input} from '@angular/core';\ndeclare function f(): any;\n@Directive({selector: '[d]', inputs: [{...f(), name: 'a'}]})\nexport class Dir {}\n" }, + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." + ], + "diagnosticSpans": [[112, 133]], + "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-tupleTemplateType", + "name": "probe: msg-enumOutputs", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\ndeclare const X: [`a`];\n@Directive({selector: '[d]', inputs: X})\nexport class Dir {}\n" - }, - "diagnostics": [], - "diagnosticSpans": [], - "classes": { - "Dir": { - "inputs": "{a:\"a\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "test.ts": "import {Directive, Input} from '@angular/core';\nenum E { A = 'x' }\n@Directive({selector: '[d]', outputs: [E.A]})\nexport class Dir {}\n" }, + "diagnostics": ["Failed to resolve outputs at position 0 to a string Value is of type 'E'."], + "diagnosticSpans": [[105, 110]], + "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-declareTypeRefClass", + "name": "probe: msg-anonymousClassRef", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nclass U {}\ndeclare const X: U;\n@Directive({selector: '[d]', inputs: [X]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: [class {}]})\nexport class Dir {}\n" }, "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value is a reference to 'U'." + "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." ], - "diagnosticSpans": [[138, 141]], + "diagnosticSpans": [[85, 95]], "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-declareTypeRefAlias", + "name": "probe: rej-satisfies", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\ntype T = ['a'];\ndeclare const X: T;\n@Directive({selector: '[d]', inputs: X})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: ['a'] satisfies string[]})\nexport class Dir {}\n" }, "diagnostics": [ - "Failed to resolve @Directive.inputs to an array Value is a reference to 'X'." + "Failed to resolve @Directive.inputs to an array Value could not be determined statically." ], - "diagnosticSpans": [[143, 144]], + "diagnosticSpans": [[85, 109]], "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-declareTupleOptional", + "name": "probe: rej-typeAssertion", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\ndeclare const X: ['a'?];\n@Directive({selector: '[d]', inputs: X})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: ['a']})\nexport class Dir {}\n" }, "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." + "Failed to resolve @Directive.inputs to an array Value could not be determined statically." ], - "diagnosticSpans": [[132, 133]], + "diagnosticSpans": [[85, 100]], "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-declareTupleRest", + "name": "probe: rej-elemSatisfies", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\ndeclare const X: ['a', ...string[]];\n@Directive({selector: '[d]', inputs: X})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: ['a' satisfies string]})\nexport class Dir {}\n" }, "diagnostics": [ "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." ], - "diagnosticSpans": [[144, 145]], + "diagnosticSpans": [[85, 107]], "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-declareUnion", + "name": "probe: rej-arrayStringIndex", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\ndeclare const X: ['a'] | ['b'];\n@Directive({selector: '[d]', inputs: X})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nconst X = ['a', 'b'];\n@Directive({selector: '[d]', inputs: [X['0']]})\nexport class Dir {}\n" }, "diagnostics": [ - "Failed to resolve @Directive.inputs to an array Value is a reference to 'X'." + "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." ], - "diagnosticSpans": [[139, 140]], + "diagnosticSpans": [[107, 115]], "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-declareNull", + "name": "probe: rej-arrayNumIndex", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\ndeclare const X: [null, true, 1];\n@Directive({selector: '[d]', inputs: [`${X[0]}${X[1]}${X[2]}`]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nconst X = ['a', 'b'];\n@Directive({selector: '[d]', inputs: [X[1]]})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{nulltrue1:\"nulltrue1\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{b:\"b\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: misc-declareExport", + "name": "probe: rej-arrayFloatIndex", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nexport declare const X: ['a'];\n@Directive({selector: '[d]', inputs: X})\nexport class Dir {}\n" - }, - "diagnostics": [], - "diagnosticSpans": [], - "classes": { - "Dir": { - "inputs": "{a:\"a\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "test.ts": "import {Directive, Input} from '@angular/core';\nconst X = ['a', 'b'];\n@Directive({selector: '[d]', inputs: [X[0.5]]})\nexport class Dir {}\n" }, + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." + ], + "diagnosticSpans": [[107, 115]], + "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-declareVar", + "name": "probe: rej-arrayOutOfRange", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\ndeclare var X: ['a'];\n@Directive({selector: '[d]', inputs: X})\nexport class Dir {}\n" - }, - "diagnostics": [], - "diagnosticSpans": [], - "classes": { - "Dir": { - "inputs": "{a:\"a\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "test.ts": "import {Directive, Input} from '@angular/core';\nconst X = ['a', 'b'];\n@Directive({selector: '[d]', inputs: [X[5]]})\nexport class Dir {}\n" }, + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value is of type 'undefined'." + ], + "diagnosticSpans": [[107, 113]], + "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-describeObjOrder", + "name": "probe: rej-arrayNegIndex", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: {b: 1, 1: 2, a: {c: 1}, 'x-y': [1]}})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nconst X = ['a', 'b'];\n@Directive({selector: '[d]', inputs: [X[-1]]})\nexport class Dir {}\n" }, "diagnostics": [ - "Failed to resolve @Directive.inputs to an array Value is of type '{ b: number; 1: number; a: object; 'x-y': Array }'." + "@Directive.inputs array can only contain strings or object literals Value is of type 'undefined'." ], - "diagnosticSpans": [[107, 142]], + "diagnosticSpans": [[107, 114]], "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-describeNested", + "name": "probe: rej-arrayPropOther", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: [[{a: 1}, [1]]]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nconst X = ['a', 'b'];\n@Directive({selector: '[d]', inputs: [X.foo]})\nexport class Dir {}\n" }, "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value is of type '[object, Array]'." + "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." ], - "diagnosticSpans": [[107, 122]], + "diagnosticSpans": [[107, 114]], "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-describeFunction", + "name": "probe: rej-objectIndexNum", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nconst A = ['a'];\n@Directive({selector: '[d]', inputs: [A.concat]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\nconst O = {1: 'a'};\n@Directive({selector: '[d]', inputs: [O[1]]})\nexport class Dir {}\n" }, - "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value is of type 'Function'." - ], - "diagnosticSpans": [[124, 134]], - "classes": {}, - "dtsImports": [] - }, - { - "name": "probe: misc-describeBuiltinStr", - "origin": "probe", - "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: ['a'.concat]})\nexport class Dir {}\n" + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{a:\"a\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } }, - "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value is of type 'Function'." - ], - "diagnosticSpans": [[107, 119]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-staticMethodRef", + "name": "probe: rej-computedConfigKey", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nclass U { static m() { return 1; } }\n@Directive({selector: '[d]', inputs: [U.m]})\nexport class Dir {}\n" + "test.ts": "import {Directive} from '@angular/core';\nconst K = 'inputs';\n@Directive({selector: '[d]', [K]: ['a']})\nexport class Dir {}\n" }, - "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value is a reference to 'm'." - ], - "diagnosticSpans": [[144, 149]], - "classes": {}, - "dtsImports": [] - }, - { - "name": "probe: misc-staticFieldUndefined", - "origin": "probe", - "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nclass U { static m: string; }\n@Directive({selector: '[d]', inputs: [U.m]})\nexport class Dir {}\n" + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } }, - "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value is a reference to 'm'." - ], - "diagnosticSpans": [[137, 142]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-staticPrototype", + "name": "probe: rej-computedConfigKeyLiteral", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nclass U {}\n@Directive({selector: '[d]', inputs: [U.prototype]})\nexport class Dir {}\n" + "test.ts": "import {Directive} from '@angular/core';\n@Directive({selector: '[d]', ['inputs']: ['a']})\nexport class Dir {}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } }, - "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value is of type 'undefined'." - ], - "diagnosticSpans": [[118, 131]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-staticInstanceMember", + "name": "probe: rej-stringConfigKey", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nclass U { m = 'a'; }\n@Directive({selector: '[d]', inputs: [U.m]})\nexport class Dir {}\n" + "test.ts": "import {Directive} from '@angular/core';\n@Directive({selector: '[d]', 'inputs': ['a'], \"outputs\": ['o']})\nexport class Dir {}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{a:\"a\"}", + "outputs": "{o:\"o\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } }, - "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value is of type 'undefined'." - ], - "diagnosticSpans": [[128, 133]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-fnRef", + "name": "probe: rej-shorthandConfigKey", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nfunction mk() { return 1; }\n@Directive({selector: '[d]', inputs: [mk]})\nexport class Dir {}\n" + "test.ts": "import {Directive} from '@angular/core';\nconst inputs = ['a'];\n@Directive({selector: '[d]', inputs})\nexport class Dir {}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{a:\"a\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } }, - "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value is a reference to 'mk'." - ], - "diagnosticSpans": [[135, 139]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-fnRefMember", + "name": "probe: rej-duplicateConfigKey", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nfunction mk() { return 1; }\n@Directive({selector: '[d]', inputs: [mk.name]})\nexport class Dir {}\n" + "test.ts": "import {Directive} from '@angular/core';\n@Directive({selector: '[d]', inputs: ['a'], inputs: ['b']})\nexport class Dir {}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{b:\"b\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } }, - "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." - ], - "diagnosticSpans": [[135, 144]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-mathPI", + "name": "probe: key-proto", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: [`${Math.PI}`]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: ['__proto__', 'b']})\nexport class Dir {}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{b:\"b\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } }, - "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." - ], - "diagnosticSpans": [[107, 121]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-condEnumZero", + "name": "probe: key-protoObj", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nenum E { A }\n@Directive({selector: '[d]', inputs: E.A ? ['t'] : ['f']})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: [{name: '__proto__'}, 'b']})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{t:\"t\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{b:\"b\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: misc-unaryArray", + "name": "probe: key-protoAlias", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: [`${-['5']}${+[]}${!['a']}${~['3']}`]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: ['a: __proto__', 'b']})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{\"-50false-4\":\"-50false-4\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{a:[0,\"__proto__\",\"a\"],b:\"b\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: misc-binaryArrayOperand", + "name": "probe: key-protoOutputs", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: [['a'] + '']})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', outputs: ['__proto__', 'b']})\nexport class Dir {}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "outputs": "{b:\"b\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } }, - "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." - ], - "diagnosticSpans": [[107, 119]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-andRef", + "name": "probe: key-integerOrder", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nclass U {}\n@Directive({selector: '[d]', inputs: [U && 'a', null && U]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: ['b', '1', 'a', '0', '10', '2']})\nexport class Dir {}\n" }, - "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value is of type 'null'." - ], - "diagnosticSpans": [[118, 139]], - "classes": {}, - "dtsImports": [] + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [], + "note": "ngtsc leaves integer-like keys unquoted in the JS map (and `01`, `1e3` too, which changes or breaks them); oxc quotes them. The order is compared through the .d.ts." }, { - "name": "probe: misc-orDynamicRhs", + "name": "probe: key-integerLike", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\ndeclare function f(): any;\n@Directive({selector: '[d]', inputs: ['a' || f()]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: ['b', '01', '4294967294', '4294967295', '-1', '1.5', '1e3', ' 3']})\nexport class Dir {}\n" }, - "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." - ], - "diagnosticSpans": [[134, 146]], - "classes": {}, - "dtsImports": [] + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [], + "note": "ngtsc leaves integer-like keys unquoted in the JS map (and `01`, `1e3` too, which changes or breaks them); oxc quotes them. The order is compared through the .d.ts." }, { - "name": "probe: misc-plusNumStr", + "name": "probe: key-integerOutputs", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: [`x${1 + 2 + '3'}${'1' - 1}${'0x10' * 1}${' 12 ' * 1}${'' * 1}${'1e3' * 1}${'abc' * 1}${null + 1}${undefined + 1}${true + true}`]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', outputs: ['b', '1', 'a']})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{x330161201000NaN1NaN2:\"x330161201000NaN1NaN2\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, - "dtsImports": [] + "dtsImports": [], + "note": "ngtsc leaves integer-like keys unquoted in the JS map (and `01`, `1e3` too, which changes or breaks them); oxc quotes them. The order is compared through the .d.ts." }, { - "name": "probe: misc-looseEq", + "name": "probe: key-integerMerge", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: [`${null == undefined}${'1' == 1}${true == 1}${null == 0}${'' == 0}${'a' < 'b'}${'10' < '9'}${'10' < 9}`]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: ['b', '1']})\nexport class Dir { @Input() a: any; @Input() c: any; }\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{truetruetruefalsetruetruetruefalse:\"truetruetruefalsetruetruetruefalse\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, - "dtsImports": [] + "dtsImports": [], + "note": "ngtsc leaves integer-like keys unquoted in the JS map (and `01`, `1e3` too, which changes or breaks them); oxc quotes them. The order is compared through the .d.ts." }, { - "name": "probe: misc-divZero", + "name": "probe: key-protoWithMember", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: [`${1 / 0}${-1 / 0}${0 / 0}${5 % 0}${-0}${2 ** -1}${7 % -3}${-7 % 3}`]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: ['__proto__']})\nexport class Dir { @Input() a: any; }\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{\"Infinity-InfinityNaNNaN00.51-1\":\"Infinity-InfinityNaNNaN00.51-1\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{a:\"a\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: misc-bitwise", + "name": "probe: key-whitespaceAlias", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: [`${2 ** 31 | 0}${1.9 | 0}${-1 >>> 0}${1 << 33}${'3' & 1}`]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: ['a: spaced alias ', ' b ']})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{\"-21474836481429496729521\":\"-21474836481429496729521\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{a:[0,\"spaced alias\",\"a\"],b:\"b\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: misc-hexLiteral", + "name": "probe: depth-chain300", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: [`${0x1F}${1_000}${0b11}${0o7}${.5}${5.}${1e-7}`]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nconst X0 = ['a'];\nconst X1 = X0;\nconst X2 = X1;\nconst X3 = X2;\nconst X4 = X3;\nconst X5 = X4;\nconst X6 = X5;\nconst X7 = X6;\nconst X8 = X7;\nconst X9 = X8;\nconst X10 = X9;\nconst X11 = X10;\nconst X12 = X11;\nconst X13 = X12;\nconst X14 = X13;\nconst X15 = X14;\nconst X16 = X15;\nconst X17 = X16;\nconst X18 = X17;\nconst X19 = X18;\nconst X20 = X19;\nconst X21 = X20;\nconst X22 = X21;\nconst X23 = X22;\nconst X24 = X23;\nconst X25 = X24;\nconst X26 = X25;\nconst X27 = X26;\nconst X28 = X27;\nconst X29 = X28;\nconst X30 = X29;\nconst X31 = X30;\nconst X32 = X31;\nconst X33 = X32;\nconst X34 = X33;\nconst X35 = X34;\nconst X36 = X35;\nconst X37 = X36;\nconst X38 = X37;\nconst X39 = X38;\nconst X40 = X39;\nconst X41 = X40;\nconst X42 = X41;\nconst X43 = X42;\nconst X44 = X43;\nconst X45 = X44;\nconst X46 = X45;\nconst X47 = X46;\nconst X48 = X47;\nconst X49 = X48;\nconst X50 = X49;\nconst X51 = X50;\nconst X52 = X51;\nconst X53 = X52;\nconst X54 = X53;\nconst X55 = X54;\nconst X56 = X55;\nconst X57 = X56;\nconst X58 = X57;\nconst X59 = X58;\nconst X60 = X59;\nconst X61 = X60;\nconst X62 = X61;\nconst X63 = X62;\nconst X64 = X63;\nconst X65 = X64;\nconst X66 = X65;\nconst X67 = X66;\nconst X68 = X67;\nconst X69 = X68;\nconst X70 = X69;\nconst X71 = X70;\nconst X72 = X71;\nconst X73 = X72;\nconst X74 = X73;\nconst X75 = X74;\nconst X76 = X75;\nconst X77 = X76;\nconst X78 = X77;\nconst X79 = X78;\nconst X80 = X79;\nconst X81 = X80;\nconst X82 = X81;\nconst X83 = X82;\nconst X84 = X83;\nconst X85 = X84;\nconst X86 = X85;\nconst X87 = X86;\nconst X88 = X87;\nconst X89 = X88;\nconst X90 = X89;\nconst X91 = X90;\nconst X92 = X91;\nconst X93 = X92;\nconst X94 = X93;\nconst X95 = X94;\nconst X96 = X95;\nconst X97 = X96;\nconst X98 = X97;\nconst X99 = X98;\nconst X100 = X99;\nconst X101 = X100;\nconst X102 = X101;\nconst X103 = X102;\nconst X104 = X103;\nconst X105 = X104;\nconst X106 = X105;\nconst X107 = X106;\nconst X108 = X107;\nconst X109 = X108;\nconst X110 = X109;\nconst X111 = X110;\nconst X112 = X111;\nconst X113 = X112;\nconst X114 = X113;\nconst X115 = X114;\nconst X116 = X115;\nconst X117 = X116;\nconst X118 = X117;\nconst X119 = X118;\nconst X120 = X119;\nconst X121 = X120;\nconst X122 = X121;\nconst X123 = X122;\nconst X124 = X123;\nconst X125 = X124;\nconst X126 = X125;\nconst X127 = X126;\nconst X128 = X127;\nconst X129 = X128;\nconst X130 = X129;\nconst X131 = X130;\nconst X132 = X131;\nconst X133 = X132;\nconst X134 = X133;\nconst X135 = X134;\nconst X136 = X135;\nconst X137 = X136;\nconst X138 = X137;\nconst X139 = X138;\nconst X140 = X139;\nconst X141 = X140;\nconst X142 = X141;\nconst X143 = X142;\nconst X144 = X143;\nconst X145 = X144;\nconst X146 = X145;\nconst X147 = X146;\nconst X148 = X147;\nconst X149 = X148;\nconst X150 = X149;\nconst X151 = X150;\nconst X152 = X151;\nconst X153 = X152;\nconst X154 = X153;\nconst X155 = X154;\nconst X156 = X155;\nconst X157 = X156;\nconst X158 = X157;\nconst X159 = X158;\nconst X160 = X159;\nconst X161 = X160;\nconst X162 = X161;\nconst X163 = X162;\nconst X164 = X163;\nconst X165 = X164;\nconst X166 = X165;\nconst X167 = X166;\nconst X168 = X167;\nconst X169 = X168;\nconst X170 = X169;\nconst X171 = X170;\nconst X172 = X171;\nconst X173 = X172;\nconst X174 = X173;\nconst X175 = X174;\nconst X176 = X175;\nconst X177 = X176;\nconst X178 = X177;\nconst X179 = X178;\nconst X180 = X179;\nconst X181 = X180;\nconst X182 = X181;\nconst X183 = X182;\nconst X184 = X183;\nconst X185 = X184;\nconst X186 = X185;\nconst X187 = X186;\nconst X188 = X187;\nconst X189 = X188;\nconst X190 = X189;\nconst X191 = X190;\nconst X192 = X191;\nconst X193 = X192;\nconst X194 = X193;\nconst X195 = X194;\nconst X196 = X195;\nconst X197 = X196;\nconst X198 = X197;\nconst X199 = X198;\nconst X200 = X199;\nconst X201 = X200;\nconst X202 = X201;\nconst X203 = X202;\nconst X204 = X203;\nconst X205 = X204;\nconst X206 = X205;\nconst X207 = X206;\nconst X208 = X207;\nconst X209 = X208;\nconst X210 = X209;\nconst X211 = X210;\nconst X212 = X211;\nconst X213 = X212;\nconst X214 = X213;\nconst X215 = X214;\nconst X216 = X215;\nconst X217 = X216;\nconst X218 = X217;\nconst X219 = X218;\nconst X220 = X219;\nconst X221 = X220;\nconst X222 = X221;\nconst X223 = X222;\nconst X224 = X223;\nconst X225 = X224;\nconst X226 = X225;\nconst X227 = X226;\nconst X228 = X227;\nconst X229 = X228;\nconst X230 = X229;\nconst X231 = X230;\nconst X232 = X231;\nconst X233 = X232;\nconst X234 = X233;\nconst X235 = X234;\nconst X236 = X235;\nconst X237 = X236;\nconst X238 = X237;\nconst X239 = X238;\nconst X240 = X239;\nconst X241 = X240;\nconst X242 = X241;\nconst X243 = X242;\nconst X244 = X243;\nconst X245 = X244;\nconst X246 = X245;\nconst X247 = X246;\nconst X248 = X247;\nconst X249 = X248;\nconst X250 = X249;\nconst X251 = X250;\nconst X252 = X251;\nconst X253 = X252;\nconst X254 = X253;\nconst X255 = X254;\nconst X256 = X255;\nconst X257 = X256;\nconst X258 = X257;\nconst X259 = X258;\nconst X260 = X259;\nconst X261 = X260;\nconst X262 = X261;\nconst X263 = X262;\nconst X264 = X263;\nconst X265 = X264;\nconst X266 = X265;\nconst X267 = X266;\nconst X268 = X267;\nconst X269 = X268;\nconst X270 = X269;\nconst X271 = X270;\nconst X272 = X271;\nconst X273 = X272;\nconst X274 = X273;\nconst X275 = X274;\nconst X276 = X275;\nconst X277 = X276;\nconst X278 = X277;\nconst X279 = X278;\nconst X280 = X279;\nconst X281 = X280;\nconst X282 = X281;\nconst X283 = X282;\nconst X284 = X283;\nconst X285 = X284;\nconst X286 = X285;\nconst X287 = X286;\nconst X288 = X287;\nconst X289 = X288;\nconst X290 = X289;\nconst X291 = X290;\nconst X292 = X291;\nconst X293 = X292;\nconst X294 = X293;\nconst X295 = X294;\nconst X296 = X295;\nconst X297 = X296;\nconst X298 = X297;\nconst X299 = X298;\n\n@Directive({selector: '[d]', inputs: X299})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{\"311000370.551e-7\":\"311000370.551e-7\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{a:\"a\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: misc-bigint", + "name": "probe: depth-chain1000", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: [`${1n}`]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nconst X0 = ['a'];\nconst X1 = X0;\nconst X2 = X1;\nconst X3 = X2;\nconst X4 = X3;\nconst X5 = X4;\nconst X6 = X5;\nconst X7 = X6;\nconst X8 = X7;\nconst X9 = X8;\nconst X10 = X9;\nconst X11 = X10;\nconst X12 = X11;\nconst X13 = X12;\nconst X14 = X13;\nconst X15 = X14;\nconst X16 = X15;\nconst X17 = X16;\nconst X18 = X17;\nconst X19 = X18;\nconst X20 = X19;\nconst X21 = X20;\nconst X22 = X21;\nconst X23 = X22;\nconst X24 = X23;\nconst X25 = X24;\nconst X26 = X25;\nconst X27 = X26;\nconst X28 = X27;\nconst X29 = X28;\nconst X30 = X29;\nconst X31 = X30;\nconst X32 = X31;\nconst X33 = X32;\nconst X34 = X33;\nconst X35 = X34;\nconst X36 = X35;\nconst X37 = X36;\nconst X38 = X37;\nconst X39 = X38;\nconst X40 = X39;\nconst X41 = X40;\nconst X42 = X41;\nconst X43 = X42;\nconst X44 = X43;\nconst X45 = X44;\nconst X46 = X45;\nconst X47 = X46;\nconst X48 = X47;\nconst X49 = X48;\nconst X50 = X49;\nconst X51 = X50;\nconst X52 = X51;\nconst X53 = X52;\nconst X54 = X53;\nconst X55 = X54;\nconst X56 = X55;\nconst X57 = X56;\nconst X58 = X57;\nconst X59 = X58;\nconst X60 = X59;\nconst X61 = X60;\nconst X62 = X61;\nconst X63 = X62;\nconst X64 = X63;\nconst X65 = X64;\nconst X66 = X65;\nconst X67 = X66;\nconst X68 = X67;\nconst X69 = X68;\nconst X70 = X69;\nconst X71 = X70;\nconst X72 = X71;\nconst X73 = X72;\nconst X74 = X73;\nconst X75 = X74;\nconst X76 = X75;\nconst X77 = X76;\nconst X78 = X77;\nconst X79 = X78;\nconst X80 = X79;\nconst X81 = X80;\nconst X82 = X81;\nconst X83 = X82;\nconst X84 = X83;\nconst X85 = X84;\nconst X86 = X85;\nconst X87 = X86;\nconst X88 = X87;\nconst X89 = X88;\nconst X90 = X89;\nconst X91 = X90;\nconst X92 = X91;\nconst X93 = X92;\nconst X94 = X93;\nconst X95 = X94;\nconst X96 = X95;\nconst X97 = X96;\nconst X98 = X97;\nconst X99 = X98;\nconst X100 = X99;\nconst X101 = X100;\nconst X102 = X101;\nconst X103 = X102;\nconst X104 = X103;\nconst X105 = X104;\nconst X106 = X105;\nconst X107 = X106;\nconst X108 = X107;\nconst X109 = X108;\nconst X110 = X109;\nconst X111 = X110;\nconst X112 = X111;\nconst X113 = X112;\nconst X114 = X113;\nconst X115 = X114;\nconst X116 = X115;\nconst X117 = X116;\nconst X118 = X117;\nconst X119 = X118;\nconst X120 = X119;\nconst X121 = X120;\nconst X122 = X121;\nconst X123 = X122;\nconst X124 = X123;\nconst X125 = X124;\nconst X126 = X125;\nconst X127 = X126;\nconst X128 = X127;\nconst X129 = X128;\nconst X130 = X129;\nconst X131 = X130;\nconst X132 = X131;\nconst X133 = X132;\nconst X134 = X133;\nconst X135 = X134;\nconst X136 = X135;\nconst X137 = X136;\nconst X138 = X137;\nconst X139 = X138;\nconst X140 = X139;\nconst X141 = X140;\nconst X142 = X141;\nconst X143 = X142;\nconst X144 = X143;\nconst X145 = X144;\nconst X146 = X145;\nconst X147 = X146;\nconst X148 = X147;\nconst X149 = X148;\nconst X150 = X149;\nconst X151 = X150;\nconst X152 = X151;\nconst X153 = X152;\nconst X154 = X153;\nconst X155 = X154;\nconst X156 = X155;\nconst X157 = X156;\nconst X158 = X157;\nconst X159 = X158;\nconst X160 = X159;\nconst X161 = X160;\nconst X162 = X161;\nconst X163 = X162;\nconst X164 = X163;\nconst X165 = X164;\nconst X166 = X165;\nconst X167 = X166;\nconst X168 = X167;\nconst X169 = X168;\nconst X170 = X169;\nconst X171 = X170;\nconst X172 = X171;\nconst X173 = X172;\nconst X174 = X173;\nconst X175 = X174;\nconst X176 = X175;\nconst X177 = X176;\nconst X178 = X177;\nconst X179 = X178;\nconst X180 = X179;\nconst X181 = X180;\nconst X182 = X181;\nconst X183 = X182;\nconst X184 = X183;\nconst X185 = X184;\nconst X186 = X185;\nconst X187 = X186;\nconst X188 = X187;\nconst X189 = X188;\nconst X190 = X189;\nconst X191 = X190;\nconst X192 = X191;\nconst X193 = X192;\nconst X194 = X193;\nconst X195 = X194;\nconst X196 = X195;\nconst X197 = X196;\nconst X198 = X197;\nconst X199 = X198;\nconst X200 = X199;\nconst X201 = X200;\nconst X202 = X201;\nconst X203 = X202;\nconst X204 = X203;\nconst X205 = X204;\nconst X206 = X205;\nconst X207 = X206;\nconst X208 = X207;\nconst X209 = X208;\nconst X210 = X209;\nconst X211 = X210;\nconst X212 = X211;\nconst X213 = X212;\nconst X214 = X213;\nconst X215 = X214;\nconst X216 = X215;\nconst X217 = X216;\nconst X218 = X217;\nconst X219 = X218;\nconst X220 = X219;\nconst X221 = X220;\nconst X222 = X221;\nconst X223 = X222;\nconst X224 = X223;\nconst X225 = X224;\nconst X226 = X225;\nconst X227 = X226;\nconst X228 = X227;\nconst X229 = X228;\nconst X230 = X229;\nconst X231 = X230;\nconst X232 = X231;\nconst X233 = X232;\nconst X234 = X233;\nconst X235 = X234;\nconst X236 = X235;\nconst X237 = X236;\nconst X238 = X237;\nconst X239 = X238;\nconst X240 = X239;\nconst X241 = X240;\nconst X242 = X241;\nconst X243 = X242;\nconst X244 = X243;\nconst X245 = X244;\nconst X246 = X245;\nconst X247 = X246;\nconst X248 = X247;\nconst X249 = X248;\nconst X250 = X249;\nconst X251 = X250;\nconst X252 = X251;\nconst X253 = X252;\nconst X254 = X253;\nconst X255 = X254;\nconst X256 = X255;\nconst X257 = X256;\nconst X258 = X257;\nconst X259 = X258;\nconst X260 = X259;\nconst X261 = X260;\nconst X262 = X261;\nconst X263 = X262;\nconst X264 = X263;\nconst X265 = X264;\nconst X266 = X265;\nconst X267 = X266;\nconst X268 = X267;\nconst X269 = X268;\nconst X270 = X269;\nconst X271 = X270;\nconst X272 = X271;\nconst X273 = X272;\nconst X274 = X273;\nconst X275 = X274;\nconst X276 = X275;\nconst X277 = X276;\nconst X278 = X277;\nconst X279 = X278;\nconst X280 = X279;\nconst X281 = X280;\nconst X282 = X281;\nconst X283 = X282;\nconst X284 = X283;\nconst X285 = X284;\nconst X286 = X285;\nconst X287 = X286;\nconst X288 = X287;\nconst X289 = X288;\nconst X290 = X289;\nconst X291 = X290;\nconst X292 = X291;\nconst X293 = X292;\nconst X294 = X293;\nconst X295 = X294;\nconst X296 = X295;\nconst X297 = X296;\nconst X298 = X297;\nconst X299 = X298;\nconst X300 = X299;\nconst X301 = X300;\nconst X302 = X301;\nconst X303 = X302;\nconst X304 = X303;\nconst X305 = X304;\nconst X306 = X305;\nconst X307 = X306;\nconst X308 = X307;\nconst X309 = X308;\nconst X310 = X309;\nconst X311 = X310;\nconst X312 = X311;\nconst X313 = X312;\nconst X314 = X313;\nconst X315 = X314;\nconst X316 = X315;\nconst X317 = X316;\nconst X318 = X317;\nconst X319 = X318;\nconst X320 = X319;\nconst X321 = X320;\nconst X322 = X321;\nconst X323 = X322;\nconst X324 = X323;\nconst X325 = X324;\nconst X326 = X325;\nconst X327 = X326;\nconst X328 = X327;\nconst X329 = X328;\nconst X330 = X329;\nconst X331 = X330;\nconst X332 = X331;\nconst X333 = X332;\nconst X334 = X333;\nconst X335 = X334;\nconst X336 = X335;\nconst X337 = X336;\nconst X338 = X337;\nconst X339 = X338;\nconst X340 = X339;\nconst X341 = X340;\nconst X342 = X341;\nconst X343 = X342;\nconst X344 = X343;\nconst X345 = X344;\nconst X346 = X345;\nconst X347 = X346;\nconst X348 = X347;\nconst X349 = X348;\nconst X350 = X349;\nconst X351 = X350;\nconst X352 = X351;\nconst X353 = X352;\nconst X354 = X353;\nconst X355 = X354;\nconst X356 = X355;\nconst X357 = X356;\nconst X358 = X357;\nconst X359 = X358;\nconst X360 = X359;\nconst X361 = X360;\nconst X362 = X361;\nconst X363 = X362;\nconst X364 = X363;\nconst X365 = X364;\nconst X366 = X365;\nconst X367 = X366;\nconst X368 = X367;\nconst X369 = X368;\nconst X370 = X369;\nconst X371 = X370;\nconst X372 = X371;\nconst X373 = X372;\nconst X374 = X373;\nconst X375 = X374;\nconst X376 = X375;\nconst X377 = X376;\nconst X378 = X377;\nconst X379 = X378;\nconst X380 = X379;\nconst X381 = X380;\nconst X382 = X381;\nconst X383 = X382;\nconst X384 = X383;\nconst X385 = X384;\nconst X386 = X385;\nconst X387 = X386;\nconst X388 = X387;\nconst X389 = X388;\nconst X390 = X389;\nconst X391 = X390;\nconst X392 = X391;\nconst X393 = X392;\nconst X394 = X393;\nconst X395 = X394;\nconst X396 = X395;\nconst X397 = X396;\nconst X398 = X397;\nconst X399 = X398;\nconst X400 = X399;\nconst X401 = X400;\nconst X402 = X401;\nconst X403 = X402;\nconst X404 = X403;\nconst X405 = X404;\nconst X406 = X405;\nconst X407 = X406;\nconst X408 = X407;\nconst X409 = X408;\nconst X410 = X409;\nconst X411 = X410;\nconst X412 = X411;\nconst X413 = X412;\nconst X414 = X413;\nconst X415 = X414;\nconst X416 = X415;\nconst X417 = X416;\nconst X418 = X417;\nconst X419 = X418;\nconst X420 = X419;\nconst X421 = X420;\nconst X422 = X421;\nconst X423 = X422;\nconst X424 = X423;\nconst X425 = X424;\nconst X426 = X425;\nconst X427 = X426;\nconst X428 = X427;\nconst X429 = X428;\nconst X430 = X429;\nconst X431 = X430;\nconst X432 = X431;\nconst X433 = X432;\nconst X434 = X433;\nconst X435 = X434;\nconst X436 = X435;\nconst X437 = X436;\nconst X438 = X437;\nconst X439 = X438;\nconst X440 = X439;\nconst X441 = X440;\nconst X442 = X441;\nconst X443 = X442;\nconst X444 = X443;\nconst X445 = X444;\nconst X446 = X445;\nconst X447 = X446;\nconst X448 = X447;\nconst X449 = X448;\nconst X450 = X449;\nconst X451 = X450;\nconst X452 = X451;\nconst X453 = X452;\nconst X454 = X453;\nconst X455 = X454;\nconst X456 = X455;\nconst X457 = X456;\nconst X458 = X457;\nconst X459 = X458;\nconst X460 = X459;\nconst X461 = X460;\nconst X462 = X461;\nconst X463 = X462;\nconst X464 = X463;\nconst X465 = X464;\nconst X466 = X465;\nconst X467 = X466;\nconst X468 = X467;\nconst X469 = X468;\nconst X470 = X469;\nconst X471 = X470;\nconst X472 = X471;\nconst X473 = X472;\nconst X474 = X473;\nconst X475 = X474;\nconst X476 = X475;\nconst X477 = X476;\nconst X478 = X477;\nconst X479 = X478;\nconst X480 = X479;\nconst X481 = X480;\nconst X482 = X481;\nconst X483 = X482;\nconst X484 = X483;\nconst X485 = X484;\nconst X486 = X485;\nconst X487 = X486;\nconst X488 = X487;\nconst X489 = X488;\nconst X490 = X489;\nconst X491 = X490;\nconst X492 = X491;\nconst X493 = X492;\nconst X494 = X493;\nconst X495 = X494;\nconst X496 = X495;\nconst X497 = X496;\nconst X498 = X497;\nconst X499 = X498;\nconst X500 = X499;\nconst X501 = X500;\nconst X502 = X501;\nconst X503 = X502;\nconst X504 = X503;\nconst X505 = X504;\nconst X506 = X505;\nconst X507 = X506;\nconst X508 = X507;\nconst X509 = X508;\nconst X510 = X509;\nconst X511 = X510;\nconst X512 = X511;\nconst X513 = X512;\nconst X514 = X513;\nconst X515 = X514;\nconst X516 = X515;\nconst X517 = X516;\nconst X518 = X517;\nconst X519 = X518;\nconst X520 = X519;\nconst X521 = X520;\nconst X522 = X521;\nconst X523 = X522;\nconst X524 = X523;\nconst X525 = X524;\nconst X526 = X525;\nconst X527 = X526;\nconst X528 = X527;\nconst X529 = X528;\nconst X530 = X529;\nconst X531 = X530;\nconst X532 = X531;\nconst X533 = X532;\nconst X534 = X533;\nconst X535 = X534;\nconst X536 = X535;\nconst X537 = X536;\nconst X538 = X537;\nconst X539 = X538;\nconst X540 = X539;\nconst X541 = X540;\nconst X542 = X541;\nconst X543 = X542;\nconst X544 = X543;\nconst X545 = X544;\nconst X546 = X545;\nconst X547 = X546;\nconst X548 = X547;\nconst X549 = X548;\nconst X550 = X549;\nconst X551 = X550;\nconst X552 = X551;\nconst X553 = X552;\nconst X554 = X553;\nconst X555 = X554;\nconst X556 = X555;\nconst X557 = X556;\nconst X558 = X557;\nconst X559 = X558;\nconst X560 = X559;\nconst X561 = X560;\nconst X562 = X561;\nconst X563 = X562;\nconst X564 = X563;\nconst X565 = X564;\nconst X566 = X565;\nconst X567 = X566;\nconst X568 = X567;\nconst X569 = X568;\nconst X570 = X569;\nconst X571 = X570;\nconst X572 = X571;\nconst X573 = X572;\nconst X574 = X573;\nconst X575 = X574;\nconst X576 = X575;\nconst X577 = X576;\nconst X578 = X577;\nconst X579 = X578;\nconst X580 = X579;\nconst X581 = X580;\nconst X582 = X581;\nconst X583 = X582;\nconst X584 = X583;\nconst X585 = X584;\nconst X586 = X585;\nconst X587 = X586;\nconst X588 = X587;\nconst X589 = X588;\nconst X590 = X589;\nconst X591 = X590;\nconst X592 = X591;\nconst X593 = X592;\nconst X594 = X593;\nconst X595 = X594;\nconst X596 = X595;\nconst X597 = X596;\nconst X598 = X597;\nconst X599 = X598;\nconst X600 = X599;\nconst X601 = X600;\nconst X602 = X601;\nconst X603 = X602;\nconst X604 = X603;\nconst X605 = X604;\nconst X606 = X605;\nconst X607 = X606;\nconst X608 = X607;\nconst X609 = X608;\nconst X610 = X609;\nconst X611 = X610;\nconst X612 = X611;\nconst X613 = X612;\nconst X614 = X613;\nconst X615 = X614;\nconst X616 = X615;\nconst X617 = X616;\nconst X618 = X617;\nconst X619 = X618;\nconst X620 = X619;\nconst X621 = X620;\nconst X622 = X621;\nconst X623 = X622;\nconst X624 = X623;\nconst X625 = X624;\nconst X626 = X625;\nconst X627 = X626;\nconst X628 = X627;\nconst X629 = X628;\nconst X630 = X629;\nconst X631 = X630;\nconst X632 = X631;\nconst X633 = X632;\nconst X634 = X633;\nconst X635 = X634;\nconst X636 = X635;\nconst X637 = X636;\nconst X638 = X637;\nconst X639 = X638;\nconst X640 = X639;\nconst X641 = X640;\nconst X642 = X641;\nconst X643 = X642;\nconst X644 = X643;\nconst X645 = X644;\nconst X646 = X645;\nconst X647 = X646;\nconst X648 = X647;\nconst X649 = X648;\nconst X650 = X649;\nconst X651 = X650;\nconst X652 = X651;\nconst X653 = X652;\nconst X654 = X653;\nconst X655 = X654;\nconst X656 = X655;\nconst X657 = X656;\nconst X658 = X657;\nconst X659 = X658;\nconst X660 = X659;\nconst X661 = X660;\nconst X662 = X661;\nconst X663 = X662;\nconst X664 = X663;\nconst X665 = X664;\nconst X666 = X665;\nconst X667 = X666;\nconst X668 = X667;\nconst X669 = X668;\nconst X670 = X669;\nconst X671 = X670;\nconst X672 = X671;\nconst X673 = X672;\nconst X674 = X673;\nconst X675 = X674;\nconst X676 = X675;\nconst X677 = X676;\nconst X678 = X677;\nconst X679 = X678;\nconst X680 = X679;\nconst X681 = X680;\nconst X682 = X681;\nconst X683 = X682;\nconst X684 = X683;\nconst X685 = X684;\nconst X686 = X685;\nconst X687 = X686;\nconst X688 = X687;\nconst X689 = X688;\nconst X690 = X689;\nconst X691 = X690;\nconst X692 = X691;\nconst X693 = X692;\nconst X694 = X693;\nconst X695 = X694;\nconst X696 = X695;\nconst X697 = X696;\nconst X698 = X697;\nconst X699 = X698;\nconst X700 = X699;\nconst X701 = X700;\nconst X702 = X701;\nconst X703 = X702;\nconst X704 = X703;\nconst X705 = X704;\nconst X706 = X705;\nconst X707 = X706;\nconst X708 = X707;\nconst X709 = X708;\nconst X710 = X709;\nconst X711 = X710;\nconst X712 = X711;\nconst X713 = X712;\nconst X714 = X713;\nconst X715 = X714;\nconst X716 = X715;\nconst X717 = X716;\nconst X718 = X717;\nconst X719 = X718;\nconst X720 = X719;\nconst X721 = X720;\nconst X722 = X721;\nconst X723 = X722;\nconst X724 = X723;\nconst X725 = X724;\nconst X726 = X725;\nconst X727 = X726;\nconst X728 = X727;\nconst X729 = X728;\nconst X730 = X729;\nconst X731 = X730;\nconst X732 = X731;\nconst X733 = X732;\nconst X734 = X733;\nconst X735 = X734;\nconst X736 = X735;\nconst X737 = X736;\nconst X738 = X737;\nconst X739 = X738;\nconst X740 = X739;\nconst X741 = X740;\nconst X742 = X741;\nconst X743 = X742;\nconst X744 = X743;\nconst X745 = X744;\nconst X746 = X745;\nconst X747 = X746;\nconst X748 = X747;\nconst X749 = X748;\nconst X750 = X749;\nconst X751 = X750;\nconst X752 = X751;\nconst X753 = X752;\nconst X754 = X753;\nconst X755 = X754;\nconst X756 = X755;\nconst X757 = X756;\nconst X758 = X757;\nconst X759 = X758;\nconst X760 = X759;\nconst X761 = X760;\nconst X762 = X761;\nconst X763 = X762;\nconst X764 = X763;\nconst X765 = X764;\nconst X766 = X765;\nconst X767 = X766;\nconst X768 = X767;\nconst X769 = X768;\nconst X770 = X769;\nconst X771 = X770;\nconst X772 = X771;\nconst X773 = X772;\nconst X774 = X773;\nconst X775 = X774;\nconst X776 = X775;\nconst X777 = X776;\nconst X778 = X777;\nconst X779 = X778;\nconst X780 = X779;\nconst X781 = X780;\nconst X782 = X781;\nconst X783 = X782;\nconst X784 = X783;\nconst X785 = X784;\nconst X786 = X785;\nconst X787 = X786;\nconst X788 = X787;\nconst X789 = X788;\nconst X790 = X789;\nconst X791 = X790;\nconst X792 = X791;\nconst X793 = X792;\nconst X794 = X793;\nconst X795 = X794;\nconst X796 = X795;\nconst X797 = X796;\nconst X798 = X797;\nconst X799 = X798;\nconst X800 = X799;\nconst X801 = X800;\nconst X802 = X801;\nconst X803 = X802;\nconst X804 = X803;\nconst X805 = X804;\nconst X806 = X805;\nconst X807 = X806;\nconst X808 = X807;\nconst X809 = X808;\nconst X810 = X809;\nconst X811 = X810;\nconst X812 = X811;\nconst X813 = X812;\nconst X814 = X813;\nconst X815 = X814;\nconst X816 = X815;\nconst X817 = X816;\nconst X818 = X817;\nconst X819 = X818;\nconst X820 = X819;\nconst X821 = X820;\nconst X822 = X821;\nconst X823 = X822;\nconst X824 = X823;\nconst X825 = X824;\nconst X826 = X825;\nconst X827 = X826;\nconst X828 = X827;\nconst X829 = X828;\nconst X830 = X829;\nconst X831 = X830;\nconst X832 = X831;\nconst X833 = X832;\nconst X834 = X833;\nconst X835 = X834;\nconst X836 = X835;\nconst X837 = X836;\nconst X838 = X837;\nconst X839 = X838;\nconst X840 = X839;\nconst X841 = X840;\nconst X842 = X841;\nconst X843 = X842;\nconst X844 = X843;\nconst X845 = X844;\nconst X846 = X845;\nconst X847 = X846;\nconst X848 = X847;\nconst X849 = X848;\nconst X850 = X849;\nconst X851 = X850;\nconst X852 = X851;\nconst X853 = X852;\nconst X854 = X853;\nconst X855 = X854;\nconst X856 = X855;\nconst X857 = X856;\nconst X858 = X857;\nconst X859 = X858;\nconst X860 = X859;\nconst X861 = X860;\nconst X862 = X861;\nconst X863 = X862;\nconst X864 = X863;\nconst X865 = X864;\nconst X866 = X865;\nconst X867 = X866;\nconst X868 = X867;\nconst X869 = X868;\nconst X870 = X869;\nconst X871 = X870;\nconst X872 = X871;\nconst X873 = X872;\nconst X874 = X873;\nconst X875 = X874;\nconst X876 = X875;\nconst X877 = X876;\nconst X878 = X877;\nconst X879 = X878;\nconst X880 = X879;\nconst X881 = X880;\nconst X882 = X881;\nconst X883 = X882;\nconst X884 = X883;\nconst X885 = X884;\nconst X886 = X885;\nconst X887 = X886;\nconst X888 = X887;\nconst X889 = X888;\nconst X890 = X889;\nconst X891 = X890;\nconst X892 = X891;\nconst X893 = X892;\nconst X894 = X893;\nconst X895 = X894;\nconst X896 = X895;\nconst X897 = X896;\nconst X898 = X897;\nconst X899 = X898;\nconst X900 = X899;\nconst X901 = X900;\nconst X902 = X901;\nconst X903 = X902;\nconst X904 = X903;\nconst X905 = X904;\nconst X906 = X905;\nconst X907 = X906;\nconst X908 = X907;\nconst X909 = X908;\nconst X910 = X909;\nconst X911 = X910;\nconst X912 = X911;\nconst X913 = X912;\nconst X914 = X913;\nconst X915 = X914;\nconst X916 = X915;\nconst X917 = X916;\nconst X918 = X917;\nconst X919 = X918;\nconst X920 = X919;\nconst X921 = X920;\nconst X922 = X921;\nconst X923 = X922;\nconst X924 = X923;\nconst X925 = X924;\nconst X926 = X925;\nconst X927 = X926;\nconst X928 = X927;\nconst X929 = X928;\nconst X930 = X929;\nconst X931 = X930;\nconst X932 = X931;\nconst X933 = X932;\nconst X934 = X933;\nconst X935 = X934;\nconst X936 = X935;\nconst X937 = X936;\nconst X938 = X937;\nconst X939 = X938;\nconst X940 = X939;\nconst X941 = X940;\nconst X942 = X941;\nconst X943 = X942;\nconst X944 = X943;\nconst X945 = X944;\nconst X946 = X945;\nconst X947 = X946;\nconst X948 = X947;\nconst X949 = X948;\nconst X950 = X949;\nconst X951 = X950;\nconst X952 = X951;\nconst X953 = X952;\nconst X954 = X953;\nconst X955 = X954;\nconst X956 = X955;\nconst X957 = X956;\nconst X958 = X957;\nconst X959 = X958;\nconst X960 = X959;\nconst X961 = X960;\nconst X962 = X961;\nconst X963 = X962;\nconst X964 = X963;\nconst X965 = X964;\nconst X966 = X965;\nconst X967 = X966;\nconst X968 = X967;\nconst X969 = X968;\nconst X970 = X969;\nconst X971 = X970;\nconst X972 = X971;\nconst X973 = X972;\nconst X974 = X973;\nconst X975 = X974;\nconst X976 = X975;\nconst X977 = X976;\nconst X978 = X977;\nconst X979 = X978;\nconst X980 = X979;\nconst X981 = X980;\nconst X982 = X981;\nconst X983 = X982;\nconst X984 = X983;\nconst X985 = X984;\nconst X986 = X985;\nconst X987 = X986;\nconst X988 = X987;\nconst X989 = X988;\nconst X990 = X989;\nconst X991 = X990;\nconst X992 = X991;\nconst X993 = X992;\nconst X994 = X993;\nconst X995 = X994;\nconst X996 = X995;\nconst X997 = X996;\nconst X998 = X997;\nconst X999 = X998;\n\n@Directive({selector: '[d]', inputs: X999})\nexport class Dir {}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{a:\"a\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } }, - "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." - ], - "diagnosticSpans": [[107, 116]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-regex", + "name": "probe: depth-chainSpread300", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: [/a/]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nconst X0 = ['a'];\nconst X1 = [...X0];\nconst X2 = [...X1];\nconst X3 = [...X2];\nconst X4 = [...X3];\nconst X5 = [...X4];\nconst X6 = [...X5];\nconst X7 = [...X6];\nconst X8 = [...X7];\nconst X9 = [...X8];\nconst X10 = [...X9];\nconst X11 = [...X10];\nconst X12 = [...X11];\nconst X13 = [...X12];\nconst X14 = [...X13];\nconst X15 = [...X14];\nconst X16 = [...X15];\nconst X17 = [...X16];\nconst X18 = [...X17];\nconst X19 = [...X18];\nconst X20 = [...X19];\nconst X21 = [...X20];\nconst X22 = [...X21];\nconst X23 = [...X22];\nconst X24 = [...X23];\nconst X25 = [...X24];\nconst X26 = [...X25];\nconst X27 = [...X26];\nconst X28 = [...X27];\nconst X29 = [...X28];\nconst X30 = [...X29];\nconst X31 = [...X30];\nconst X32 = [...X31];\nconst X33 = [...X32];\nconst X34 = [...X33];\nconst X35 = [...X34];\nconst X36 = [...X35];\nconst X37 = [...X36];\nconst X38 = [...X37];\nconst X39 = [...X38];\nconst X40 = [...X39];\nconst X41 = [...X40];\nconst X42 = [...X41];\nconst X43 = [...X42];\nconst X44 = [...X43];\nconst X45 = [...X44];\nconst X46 = [...X45];\nconst X47 = [...X46];\nconst X48 = [...X47];\nconst X49 = [...X48];\nconst X50 = [...X49];\nconst X51 = [...X50];\nconst X52 = [...X51];\nconst X53 = [...X52];\nconst X54 = [...X53];\nconst X55 = [...X54];\nconst X56 = [...X55];\nconst X57 = [...X56];\nconst X58 = [...X57];\nconst X59 = [...X58];\nconst X60 = [...X59];\nconst X61 = [...X60];\nconst X62 = [...X61];\nconst X63 = [...X62];\nconst X64 = [...X63];\nconst X65 = [...X64];\nconst X66 = [...X65];\nconst X67 = [...X66];\nconst X68 = [...X67];\nconst X69 = [...X68];\nconst X70 = [...X69];\nconst X71 = [...X70];\nconst X72 = [...X71];\nconst X73 = [...X72];\nconst X74 = [...X73];\nconst X75 = [...X74];\nconst X76 = [...X75];\nconst X77 = [...X76];\nconst X78 = [...X77];\nconst X79 = [...X78];\nconst X80 = [...X79];\nconst X81 = [...X80];\nconst X82 = [...X81];\nconst X83 = [...X82];\nconst X84 = [...X83];\nconst X85 = [...X84];\nconst X86 = [...X85];\nconst X87 = [...X86];\nconst X88 = [...X87];\nconst X89 = [...X88];\nconst X90 = [...X89];\nconst X91 = [...X90];\nconst X92 = [...X91];\nconst X93 = [...X92];\nconst X94 = [...X93];\nconst X95 = [...X94];\nconst X96 = [...X95];\nconst X97 = [...X96];\nconst X98 = [...X97];\nconst X99 = [...X98];\nconst X100 = [...X99];\nconst X101 = [...X100];\nconst X102 = [...X101];\nconst X103 = [...X102];\nconst X104 = [...X103];\nconst X105 = [...X104];\nconst X106 = [...X105];\nconst X107 = [...X106];\nconst X108 = [...X107];\nconst X109 = [...X108];\nconst X110 = [...X109];\nconst X111 = [...X110];\nconst X112 = [...X111];\nconst X113 = [...X112];\nconst X114 = [...X113];\nconst X115 = [...X114];\nconst X116 = [...X115];\nconst X117 = [...X116];\nconst X118 = [...X117];\nconst X119 = [...X118];\nconst X120 = [...X119];\nconst X121 = [...X120];\nconst X122 = [...X121];\nconst X123 = [...X122];\nconst X124 = [...X123];\nconst X125 = [...X124];\nconst X126 = [...X125];\nconst X127 = [...X126];\nconst X128 = [...X127];\nconst X129 = [...X128];\nconst X130 = [...X129];\nconst X131 = [...X130];\nconst X132 = [...X131];\nconst X133 = [...X132];\nconst X134 = [...X133];\nconst X135 = [...X134];\nconst X136 = [...X135];\nconst X137 = [...X136];\nconst X138 = [...X137];\nconst X139 = [...X138];\nconst X140 = [...X139];\nconst X141 = [...X140];\nconst X142 = [...X141];\nconst X143 = [...X142];\nconst X144 = [...X143];\nconst X145 = [...X144];\nconst X146 = [...X145];\nconst X147 = [...X146];\nconst X148 = [...X147];\nconst X149 = [...X148];\nconst X150 = [...X149];\nconst X151 = [...X150];\nconst X152 = [...X151];\nconst X153 = [...X152];\nconst X154 = [...X153];\nconst X155 = [...X154];\nconst X156 = [...X155];\nconst X157 = [...X156];\nconst X158 = [...X157];\nconst X159 = [...X158];\nconst X160 = [...X159];\nconst X161 = [...X160];\nconst X162 = [...X161];\nconst X163 = [...X162];\nconst X164 = [...X163];\nconst X165 = [...X164];\nconst X166 = [...X165];\nconst X167 = [...X166];\nconst X168 = [...X167];\nconst X169 = [...X168];\nconst X170 = [...X169];\nconst X171 = [...X170];\nconst X172 = [...X171];\nconst X173 = [...X172];\nconst X174 = [...X173];\nconst X175 = [...X174];\nconst X176 = [...X175];\nconst X177 = [...X176];\nconst X178 = [...X177];\nconst X179 = [...X178];\nconst X180 = [...X179];\nconst X181 = [...X180];\nconst X182 = [...X181];\nconst X183 = [...X182];\nconst X184 = [...X183];\nconst X185 = [...X184];\nconst X186 = [...X185];\nconst X187 = [...X186];\nconst X188 = [...X187];\nconst X189 = [...X188];\nconst X190 = [...X189];\nconst X191 = [...X190];\nconst X192 = [...X191];\nconst X193 = [...X192];\nconst X194 = [...X193];\nconst X195 = [...X194];\nconst X196 = [...X195];\nconst X197 = [...X196];\nconst X198 = [...X197];\nconst X199 = [...X198];\nconst X200 = [...X199];\nconst X201 = [...X200];\nconst X202 = [...X201];\nconst X203 = [...X202];\nconst X204 = [...X203];\nconst X205 = [...X204];\nconst X206 = [...X205];\nconst X207 = [...X206];\nconst X208 = [...X207];\nconst X209 = [...X208];\nconst X210 = [...X209];\nconst X211 = [...X210];\nconst X212 = [...X211];\nconst X213 = [...X212];\nconst X214 = [...X213];\nconst X215 = [...X214];\nconst X216 = [...X215];\nconst X217 = [...X216];\nconst X218 = [...X217];\nconst X219 = [...X218];\nconst X220 = [...X219];\nconst X221 = [...X220];\nconst X222 = [...X221];\nconst X223 = [...X222];\nconst X224 = [...X223];\nconst X225 = [...X224];\nconst X226 = [...X225];\nconst X227 = [...X226];\nconst X228 = [...X227];\nconst X229 = [...X228];\nconst X230 = [...X229];\nconst X231 = [...X230];\nconst X232 = [...X231];\nconst X233 = [...X232];\nconst X234 = [...X233];\nconst X235 = [...X234];\nconst X236 = [...X235];\nconst X237 = [...X236];\nconst X238 = [...X237];\nconst X239 = [...X238];\nconst X240 = [...X239];\nconst X241 = [...X240];\nconst X242 = [...X241];\nconst X243 = [...X242];\nconst X244 = [...X243];\nconst X245 = [...X244];\nconst X246 = [...X245];\nconst X247 = [...X246];\nconst X248 = [...X247];\nconst X249 = [...X248];\nconst X250 = [...X249];\nconst X251 = [...X250];\nconst X252 = [...X251];\nconst X253 = [...X252];\nconst X254 = [...X253];\nconst X255 = [...X254];\nconst X256 = [...X255];\nconst X257 = [...X256];\nconst X258 = [...X257];\nconst X259 = [...X258];\nconst X260 = [...X259];\nconst X261 = [...X260];\nconst X262 = [...X261];\nconst X263 = [...X262];\nconst X264 = [...X263];\nconst X265 = [...X264];\nconst X266 = [...X265];\nconst X267 = [...X266];\nconst X268 = [...X267];\nconst X269 = [...X268];\nconst X270 = [...X269];\nconst X271 = [...X270];\nconst X272 = [...X271];\nconst X273 = [...X272];\nconst X274 = [...X273];\nconst X275 = [...X274];\nconst X276 = [...X275];\nconst X277 = [...X276];\nconst X278 = [...X277];\nconst X279 = [...X278];\nconst X280 = [...X279];\nconst X281 = [...X280];\nconst X282 = [...X281];\nconst X283 = [...X282];\nconst X284 = [...X283];\nconst X285 = [...X284];\nconst X286 = [...X285];\nconst X287 = [...X286];\nconst X288 = [...X287];\nconst X289 = [...X288];\nconst X290 = [...X289];\nconst X291 = [...X290];\nconst X292 = [...X291];\nconst X293 = [...X292];\nconst X294 = [...X293];\nconst X295 = [...X294];\nconst X296 = [...X295];\nconst X297 = [...X296];\nconst X298 = [...X297];\nconst X299 = [...X298];\n\n@Directive({selector: '[d]', inputs: X299})\nexport class Dir {}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{a:\"a\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } }, - "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." - ], - "diagnosticSpans": [[107, 112]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-new", + "name": "probe: depth-chainSpread1000", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: [new String('a')]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nconst X0 = ['a'];\nconst X1 = [...X0];\nconst X2 = [...X1];\nconst X3 = [...X2];\nconst X4 = [...X3];\nconst X5 = [...X4];\nconst X6 = [...X5];\nconst X7 = [...X6];\nconst X8 = [...X7];\nconst X9 = [...X8];\nconst X10 = [...X9];\nconst X11 = [...X10];\nconst X12 = [...X11];\nconst X13 = [...X12];\nconst X14 = [...X13];\nconst X15 = [...X14];\nconst X16 = [...X15];\nconst X17 = [...X16];\nconst X18 = [...X17];\nconst X19 = [...X18];\nconst X20 = [...X19];\nconst X21 = [...X20];\nconst X22 = [...X21];\nconst X23 = [...X22];\nconst X24 = [...X23];\nconst X25 = [...X24];\nconst X26 = [...X25];\nconst X27 = [...X26];\nconst X28 = [...X27];\nconst X29 = [...X28];\nconst X30 = [...X29];\nconst X31 = [...X30];\nconst X32 = [...X31];\nconst X33 = [...X32];\nconst X34 = [...X33];\nconst X35 = [...X34];\nconst X36 = [...X35];\nconst X37 = [...X36];\nconst X38 = [...X37];\nconst X39 = [...X38];\nconst X40 = [...X39];\nconst X41 = [...X40];\nconst X42 = [...X41];\nconst X43 = [...X42];\nconst X44 = [...X43];\nconst X45 = [...X44];\nconst X46 = [...X45];\nconst X47 = [...X46];\nconst X48 = [...X47];\nconst X49 = [...X48];\nconst X50 = [...X49];\nconst X51 = [...X50];\nconst X52 = [...X51];\nconst X53 = [...X52];\nconst X54 = [...X53];\nconst X55 = [...X54];\nconst X56 = [...X55];\nconst X57 = [...X56];\nconst X58 = [...X57];\nconst X59 = [...X58];\nconst X60 = [...X59];\nconst X61 = [...X60];\nconst X62 = [...X61];\nconst X63 = [...X62];\nconst X64 = [...X63];\nconst X65 = [...X64];\nconst X66 = [...X65];\nconst X67 = [...X66];\nconst X68 = [...X67];\nconst X69 = [...X68];\nconst X70 = [...X69];\nconst X71 = [...X70];\nconst X72 = [...X71];\nconst X73 = [...X72];\nconst X74 = [...X73];\nconst X75 = [...X74];\nconst X76 = [...X75];\nconst X77 = [...X76];\nconst X78 = [...X77];\nconst X79 = [...X78];\nconst X80 = [...X79];\nconst X81 = [...X80];\nconst X82 = [...X81];\nconst X83 = [...X82];\nconst X84 = [...X83];\nconst X85 = [...X84];\nconst X86 = [...X85];\nconst X87 = [...X86];\nconst X88 = [...X87];\nconst X89 = [...X88];\nconst X90 = [...X89];\nconst X91 = [...X90];\nconst X92 = [...X91];\nconst X93 = [...X92];\nconst X94 = [...X93];\nconst X95 = [...X94];\nconst X96 = [...X95];\nconst X97 = [...X96];\nconst X98 = [...X97];\nconst X99 = [...X98];\nconst X100 = [...X99];\nconst X101 = [...X100];\nconst X102 = [...X101];\nconst X103 = [...X102];\nconst X104 = [...X103];\nconst X105 = [...X104];\nconst X106 = [...X105];\nconst X107 = [...X106];\nconst X108 = [...X107];\nconst X109 = [...X108];\nconst X110 = [...X109];\nconst X111 = [...X110];\nconst X112 = [...X111];\nconst X113 = [...X112];\nconst X114 = [...X113];\nconst X115 = [...X114];\nconst X116 = [...X115];\nconst X117 = [...X116];\nconst X118 = [...X117];\nconst X119 = [...X118];\nconst X120 = [...X119];\nconst X121 = [...X120];\nconst X122 = [...X121];\nconst X123 = [...X122];\nconst X124 = [...X123];\nconst X125 = [...X124];\nconst X126 = [...X125];\nconst X127 = [...X126];\nconst X128 = [...X127];\nconst X129 = [...X128];\nconst X130 = [...X129];\nconst X131 = [...X130];\nconst X132 = [...X131];\nconst X133 = [...X132];\nconst X134 = [...X133];\nconst X135 = [...X134];\nconst X136 = [...X135];\nconst X137 = [...X136];\nconst X138 = [...X137];\nconst X139 = [...X138];\nconst X140 = [...X139];\nconst X141 = [...X140];\nconst X142 = [...X141];\nconst X143 = [...X142];\nconst X144 = [...X143];\nconst X145 = [...X144];\nconst X146 = [...X145];\nconst X147 = [...X146];\nconst X148 = [...X147];\nconst X149 = [...X148];\nconst X150 = [...X149];\nconst X151 = [...X150];\nconst X152 = [...X151];\nconst X153 = [...X152];\nconst X154 = [...X153];\nconst X155 = [...X154];\nconst X156 = [...X155];\nconst X157 = [...X156];\nconst X158 = [...X157];\nconst X159 = [...X158];\nconst X160 = [...X159];\nconst X161 = [...X160];\nconst X162 = [...X161];\nconst X163 = [...X162];\nconst X164 = [...X163];\nconst X165 = [...X164];\nconst X166 = [...X165];\nconst X167 = [...X166];\nconst X168 = [...X167];\nconst X169 = [...X168];\nconst X170 = [...X169];\nconst X171 = [...X170];\nconst X172 = [...X171];\nconst X173 = [...X172];\nconst X174 = [...X173];\nconst X175 = [...X174];\nconst X176 = [...X175];\nconst X177 = [...X176];\nconst X178 = [...X177];\nconst X179 = [...X178];\nconst X180 = [...X179];\nconst X181 = [...X180];\nconst X182 = [...X181];\nconst X183 = [...X182];\nconst X184 = [...X183];\nconst X185 = [...X184];\nconst X186 = [...X185];\nconst X187 = [...X186];\nconst X188 = [...X187];\nconst X189 = [...X188];\nconst X190 = [...X189];\nconst X191 = [...X190];\nconst X192 = [...X191];\nconst X193 = [...X192];\nconst X194 = [...X193];\nconst X195 = [...X194];\nconst X196 = [...X195];\nconst X197 = [...X196];\nconst X198 = [...X197];\nconst X199 = [...X198];\nconst X200 = [...X199];\nconst X201 = [...X200];\nconst X202 = [...X201];\nconst X203 = [...X202];\nconst X204 = [...X203];\nconst X205 = [...X204];\nconst X206 = [...X205];\nconst X207 = [...X206];\nconst X208 = [...X207];\nconst X209 = [...X208];\nconst X210 = [...X209];\nconst X211 = [...X210];\nconst X212 = [...X211];\nconst X213 = [...X212];\nconst X214 = [...X213];\nconst X215 = [...X214];\nconst X216 = [...X215];\nconst X217 = [...X216];\nconst X218 = [...X217];\nconst X219 = [...X218];\nconst X220 = [...X219];\nconst X221 = [...X220];\nconst X222 = [...X221];\nconst X223 = [...X222];\nconst X224 = [...X223];\nconst X225 = [...X224];\nconst X226 = [...X225];\nconst X227 = [...X226];\nconst X228 = [...X227];\nconst X229 = [...X228];\nconst X230 = [...X229];\nconst X231 = [...X230];\nconst X232 = [...X231];\nconst X233 = [...X232];\nconst X234 = [...X233];\nconst X235 = [...X234];\nconst X236 = [...X235];\nconst X237 = [...X236];\nconst X238 = [...X237];\nconst X239 = [...X238];\nconst X240 = [...X239];\nconst X241 = [...X240];\nconst X242 = [...X241];\nconst X243 = [...X242];\nconst X244 = [...X243];\nconst X245 = [...X244];\nconst X246 = [...X245];\nconst X247 = [...X246];\nconst X248 = [...X247];\nconst X249 = [...X248];\nconst X250 = [...X249];\nconst X251 = [...X250];\nconst X252 = [...X251];\nconst X253 = [...X252];\nconst X254 = [...X253];\nconst X255 = [...X254];\nconst X256 = [...X255];\nconst X257 = [...X256];\nconst X258 = [...X257];\nconst X259 = [...X258];\nconst X260 = [...X259];\nconst X261 = [...X260];\nconst X262 = [...X261];\nconst X263 = [...X262];\nconst X264 = [...X263];\nconst X265 = [...X264];\nconst X266 = [...X265];\nconst X267 = [...X266];\nconst X268 = [...X267];\nconst X269 = [...X268];\nconst X270 = [...X269];\nconst X271 = [...X270];\nconst X272 = [...X271];\nconst X273 = [...X272];\nconst X274 = [...X273];\nconst X275 = [...X274];\nconst X276 = [...X275];\nconst X277 = [...X276];\nconst X278 = [...X277];\nconst X279 = [...X278];\nconst X280 = [...X279];\nconst X281 = [...X280];\nconst X282 = [...X281];\nconst X283 = [...X282];\nconst X284 = [...X283];\nconst X285 = [...X284];\nconst X286 = [...X285];\nconst X287 = [...X286];\nconst X288 = [...X287];\nconst X289 = [...X288];\nconst X290 = [...X289];\nconst X291 = [...X290];\nconst X292 = [...X291];\nconst X293 = [...X292];\nconst X294 = [...X293];\nconst X295 = [...X294];\nconst X296 = [...X295];\nconst X297 = [...X296];\nconst X298 = [...X297];\nconst X299 = [...X298];\nconst X300 = [...X299];\nconst X301 = [...X300];\nconst X302 = [...X301];\nconst X303 = [...X302];\nconst X304 = [...X303];\nconst X305 = [...X304];\nconst X306 = [...X305];\nconst X307 = [...X306];\nconst X308 = [...X307];\nconst X309 = [...X308];\nconst X310 = [...X309];\nconst X311 = [...X310];\nconst X312 = [...X311];\nconst X313 = [...X312];\nconst X314 = [...X313];\nconst X315 = [...X314];\nconst X316 = [...X315];\nconst X317 = [...X316];\nconst X318 = [...X317];\nconst X319 = [...X318];\nconst X320 = [...X319];\nconst X321 = [...X320];\nconst X322 = [...X321];\nconst X323 = [...X322];\nconst X324 = [...X323];\nconst X325 = [...X324];\nconst X326 = [...X325];\nconst X327 = [...X326];\nconst X328 = [...X327];\nconst X329 = [...X328];\nconst X330 = [...X329];\nconst X331 = [...X330];\nconst X332 = [...X331];\nconst X333 = [...X332];\nconst X334 = [...X333];\nconst X335 = [...X334];\nconst X336 = [...X335];\nconst X337 = [...X336];\nconst X338 = [...X337];\nconst X339 = [...X338];\nconst X340 = [...X339];\nconst X341 = [...X340];\nconst X342 = [...X341];\nconst X343 = [...X342];\nconst X344 = [...X343];\nconst X345 = [...X344];\nconst X346 = [...X345];\nconst X347 = [...X346];\nconst X348 = [...X347];\nconst X349 = [...X348];\nconst X350 = [...X349];\nconst X351 = [...X350];\nconst X352 = [...X351];\nconst X353 = [...X352];\nconst X354 = [...X353];\nconst X355 = [...X354];\nconst X356 = [...X355];\nconst X357 = [...X356];\nconst X358 = [...X357];\nconst X359 = [...X358];\nconst X360 = [...X359];\nconst X361 = [...X360];\nconst X362 = [...X361];\nconst X363 = [...X362];\nconst X364 = [...X363];\nconst X365 = [...X364];\nconst X366 = [...X365];\nconst X367 = [...X366];\nconst X368 = [...X367];\nconst X369 = [...X368];\nconst X370 = [...X369];\nconst X371 = [...X370];\nconst X372 = [...X371];\nconst X373 = [...X372];\nconst X374 = [...X373];\nconst X375 = [...X374];\nconst X376 = [...X375];\nconst X377 = [...X376];\nconst X378 = [...X377];\nconst X379 = [...X378];\nconst X380 = [...X379];\nconst X381 = [...X380];\nconst X382 = [...X381];\nconst X383 = [...X382];\nconst X384 = [...X383];\nconst X385 = [...X384];\nconst X386 = [...X385];\nconst X387 = [...X386];\nconst X388 = [...X387];\nconst X389 = [...X388];\nconst X390 = [...X389];\nconst X391 = [...X390];\nconst X392 = [...X391];\nconst X393 = [...X392];\nconst X394 = [...X393];\nconst X395 = [...X394];\nconst X396 = [...X395];\nconst X397 = [...X396];\nconst X398 = [...X397];\nconst X399 = [...X398];\nconst X400 = [...X399];\nconst X401 = [...X400];\nconst X402 = [...X401];\nconst X403 = [...X402];\nconst X404 = [...X403];\nconst X405 = [...X404];\nconst X406 = [...X405];\nconst X407 = [...X406];\nconst X408 = [...X407];\nconst X409 = [...X408];\nconst X410 = [...X409];\nconst X411 = [...X410];\nconst X412 = [...X411];\nconst X413 = [...X412];\nconst X414 = [...X413];\nconst X415 = [...X414];\nconst X416 = [...X415];\nconst X417 = [...X416];\nconst X418 = [...X417];\nconst X419 = [...X418];\nconst X420 = [...X419];\nconst X421 = [...X420];\nconst X422 = [...X421];\nconst X423 = [...X422];\nconst X424 = [...X423];\nconst X425 = [...X424];\nconst X426 = [...X425];\nconst X427 = [...X426];\nconst X428 = [...X427];\nconst X429 = [...X428];\nconst X430 = [...X429];\nconst X431 = [...X430];\nconst X432 = [...X431];\nconst X433 = [...X432];\nconst X434 = [...X433];\nconst X435 = [...X434];\nconst X436 = [...X435];\nconst X437 = [...X436];\nconst X438 = [...X437];\nconst X439 = [...X438];\nconst X440 = [...X439];\nconst X441 = [...X440];\nconst X442 = [...X441];\nconst X443 = [...X442];\nconst X444 = [...X443];\nconst X445 = [...X444];\nconst X446 = [...X445];\nconst X447 = [...X446];\nconst X448 = [...X447];\nconst X449 = [...X448];\nconst X450 = [...X449];\nconst X451 = [...X450];\nconst X452 = [...X451];\nconst X453 = [...X452];\nconst X454 = [...X453];\nconst X455 = [...X454];\nconst X456 = [...X455];\nconst X457 = [...X456];\nconst X458 = [...X457];\nconst X459 = [...X458];\nconst X460 = [...X459];\nconst X461 = [...X460];\nconst X462 = [...X461];\nconst X463 = [...X462];\nconst X464 = [...X463];\nconst X465 = [...X464];\nconst X466 = [...X465];\nconst X467 = [...X466];\nconst X468 = [...X467];\nconst X469 = [...X468];\nconst X470 = [...X469];\nconst X471 = [...X470];\nconst X472 = [...X471];\nconst X473 = [...X472];\nconst X474 = [...X473];\nconst X475 = [...X474];\nconst X476 = [...X475];\nconst X477 = [...X476];\nconst X478 = [...X477];\nconst X479 = [...X478];\nconst X480 = [...X479];\nconst X481 = [...X480];\nconst X482 = [...X481];\nconst X483 = [...X482];\nconst X484 = [...X483];\nconst X485 = [...X484];\nconst X486 = [...X485];\nconst X487 = [...X486];\nconst X488 = [...X487];\nconst X489 = [...X488];\nconst X490 = [...X489];\nconst X491 = [...X490];\nconst X492 = [...X491];\nconst X493 = [...X492];\nconst X494 = [...X493];\nconst X495 = [...X494];\nconst X496 = [...X495];\nconst X497 = [...X496];\nconst X498 = [...X497];\nconst X499 = [...X498];\nconst X500 = [...X499];\nconst X501 = [...X500];\nconst X502 = [...X501];\nconst X503 = [...X502];\nconst X504 = [...X503];\nconst X505 = [...X504];\nconst X506 = [...X505];\nconst X507 = [...X506];\nconst X508 = [...X507];\nconst X509 = [...X508];\nconst X510 = [...X509];\nconst X511 = [...X510];\nconst X512 = [...X511];\nconst X513 = [...X512];\nconst X514 = [...X513];\nconst X515 = [...X514];\nconst X516 = [...X515];\nconst X517 = [...X516];\nconst X518 = [...X517];\nconst X519 = [...X518];\nconst X520 = [...X519];\nconst X521 = [...X520];\nconst X522 = [...X521];\nconst X523 = [...X522];\nconst X524 = [...X523];\nconst X525 = [...X524];\nconst X526 = [...X525];\nconst X527 = [...X526];\nconst X528 = [...X527];\nconst X529 = [...X528];\nconst X530 = [...X529];\nconst X531 = [...X530];\nconst X532 = [...X531];\nconst X533 = [...X532];\nconst X534 = [...X533];\nconst X535 = [...X534];\nconst X536 = [...X535];\nconst X537 = [...X536];\nconst X538 = [...X537];\nconst X539 = [...X538];\nconst X540 = [...X539];\nconst X541 = [...X540];\nconst X542 = [...X541];\nconst X543 = [...X542];\nconst X544 = [...X543];\nconst X545 = [...X544];\nconst X546 = [...X545];\nconst X547 = [...X546];\nconst X548 = [...X547];\nconst X549 = [...X548];\nconst X550 = [...X549];\nconst X551 = [...X550];\nconst X552 = [...X551];\nconst X553 = [...X552];\nconst X554 = [...X553];\nconst X555 = [...X554];\nconst X556 = [...X555];\nconst X557 = [...X556];\nconst X558 = [...X557];\nconst X559 = [...X558];\nconst X560 = [...X559];\nconst X561 = [...X560];\nconst X562 = [...X561];\nconst X563 = [...X562];\nconst X564 = [...X563];\nconst X565 = [...X564];\nconst X566 = [...X565];\nconst X567 = [...X566];\nconst X568 = [...X567];\nconst X569 = [...X568];\nconst X570 = [...X569];\nconst X571 = [...X570];\nconst X572 = [...X571];\nconst X573 = [...X572];\nconst X574 = [...X573];\nconst X575 = [...X574];\nconst X576 = [...X575];\nconst X577 = [...X576];\nconst X578 = [...X577];\nconst X579 = [...X578];\nconst X580 = [...X579];\nconst X581 = [...X580];\nconst X582 = [...X581];\nconst X583 = [...X582];\nconst X584 = [...X583];\nconst X585 = [...X584];\nconst X586 = [...X585];\nconst X587 = [...X586];\nconst X588 = [...X587];\nconst X589 = [...X588];\nconst X590 = [...X589];\nconst X591 = [...X590];\nconst X592 = [...X591];\nconst X593 = [...X592];\nconst X594 = [...X593];\nconst X595 = [...X594];\nconst X596 = [...X595];\nconst X597 = [...X596];\nconst X598 = [...X597];\nconst X599 = [...X598];\nconst X600 = [...X599];\nconst X601 = [...X600];\nconst X602 = [...X601];\nconst X603 = [...X602];\nconst X604 = [...X603];\nconst X605 = [...X604];\nconst X606 = [...X605];\nconst X607 = [...X606];\nconst X608 = [...X607];\nconst X609 = [...X608];\nconst X610 = [...X609];\nconst X611 = [...X610];\nconst X612 = [...X611];\nconst X613 = [...X612];\nconst X614 = [...X613];\nconst X615 = [...X614];\nconst X616 = [...X615];\nconst X617 = [...X616];\nconst X618 = [...X617];\nconst X619 = [...X618];\nconst X620 = [...X619];\nconst X621 = [...X620];\nconst X622 = [...X621];\nconst X623 = [...X622];\nconst X624 = [...X623];\nconst X625 = [...X624];\nconst X626 = [...X625];\nconst X627 = [...X626];\nconst X628 = [...X627];\nconst X629 = [...X628];\nconst X630 = [...X629];\nconst X631 = [...X630];\nconst X632 = [...X631];\nconst X633 = [...X632];\nconst X634 = [...X633];\nconst X635 = [...X634];\nconst X636 = [...X635];\nconst X637 = [...X636];\nconst X638 = [...X637];\nconst X639 = [...X638];\nconst X640 = [...X639];\nconst X641 = [...X640];\nconst X642 = [...X641];\nconst X643 = [...X642];\nconst X644 = [...X643];\nconst X645 = [...X644];\nconst X646 = [...X645];\nconst X647 = [...X646];\nconst X648 = [...X647];\nconst X649 = [...X648];\nconst X650 = [...X649];\nconst X651 = [...X650];\nconst X652 = [...X651];\nconst X653 = [...X652];\nconst X654 = [...X653];\nconst X655 = [...X654];\nconst X656 = [...X655];\nconst X657 = [...X656];\nconst X658 = [...X657];\nconst X659 = [...X658];\nconst X660 = [...X659];\nconst X661 = [...X660];\nconst X662 = [...X661];\nconst X663 = [...X662];\nconst X664 = [...X663];\nconst X665 = [...X664];\nconst X666 = [...X665];\nconst X667 = [...X666];\nconst X668 = [...X667];\nconst X669 = [...X668];\nconst X670 = [...X669];\nconst X671 = [...X670];\nconst X672 = [...X671];\nconst X673 = [...X672];\nconst X674 = [...X673];\nconst X675 = [...X674];\nconst X676 = [...X675];\nconst X677 = [...X676];\nconst X678 = [...X677];\nconst X679 = [...X678];\nconst X680 = [...X679];\nconst X681 = [...X680];\nconst X682 = [...X681];\nconst X683 = [...X682];\nconst X684 = [...X683];\nconst X685 = [...X684];\nconst X686 = [...X685];\nconst X687 = [...X686];\nconst X688 = [...X687];\nconst X689 = [...X688];\nconst X690 = [...X689];\nconst X691 = [...X690];\nconst X692 = [...X691];\nconst X693 = [...X692];\nconst X694 = [...X693];\nconst X695 = [...X694];\nconst X696 = [...X695];\nconst X697 = [...X696];\nconst X698 = [...X697];\nconst X699 = [...X698];\nconst X700 = [...X699];\nconst X701 = [...X700];\nconst X702 = [...X701];\nconst X703 = [...X702];\nconst X704 = [...X703];\nconst X705 = [...X704];\nconst X706 = [...X705];\nconst X707 = [...X706];\nconst X708 = [...X707];\nconst X709 = [...X708];\nconst X710 = [...X709];\nconst X711 = [...X710];\nconst X712 = [...X711];\nconst X713 = [...X712];\nconst X714 = [...X713];\nconst X715 = [...X714];\nconst X716 = [...X715];\nconst X717 = [...X716];\nconst X718 = [...X717];\nconst X719 = [...X718];\nconst X720 = [...X719];\nconst X721 = [...X720];\nconst X722 = [...X721];\nconst X723 = [...X722];\nconst X724 = [...X723];\nconst X725 = [...X724];\nconst X726 = [...X725];\nconst X727 = [...X726];\nconst X728 = [...X727];\nconst X729 = [...X728];\nconst X730 = [...X729];\nconst X731 = [...X730];\nconst X732 = [...X731];\nconst X733 = [...X732];\nconst X734 = [...X733];\nconst X735 = [...X734];\nconst X736 = [...X735];\nconst X737 = [...X736];\nconst X738 = [...X737];\nconst X739 = [...X738];\nconst X740 = [...X739];\nconst X741 = [...X740];\nconst X742 = [...X741];\nconst X743 = [...X742];\nconst X744 = [...X743];\nconst X745 = [...X744];\nconst X746 = [...X745];\nconst X747 = [...X746];\nconst X748 = [...X747];\nconst X749 = [...X748];\nconst X750 = [...X749];\nconst X751 = [...X750];\nconst X752 = [...X751];\nconst X753 = [...X752];\nconst X754 = [...X753];\nconst X755 = [...X754];\nconst X756 = [...X755];\nconst X757 = [...X756];\nconst X758 = [...X757];\nconst X759 = [...X758];\nconst X760 = [...X759];\nconst X761 = [...X760];\nconst X762 = [...X761];\nconst X763 = [...X762];\nconst X764 = [...X763];\nconst X765 = [...X764];\nconst X766 = [...X765];\nconst X767 = [...X766];\nconst X768 = [...X767];\nconst X769 = [...X768];\nconst X770 = [...X769];\nconst X771 = [...X770];\nconst X772 = [...X771];\nconst X773 = [...X772];\nconst X774 = [...X773];\nconst X775 = [...X774];\nconst X776 = [...X775];\nconst X777 = [...X776];\nconst X778 = [...X777];\nconst X779 = [...X778];\nconst X780 = [...X779];\nconst X781 = [...X780];\nconst X782 = [...X781];\nconst X783 = [...X782];\nconst X784 = [...X783];\nconst X785 = [...X784];\nconst X786 = [...X785];\nconst X787 = [...X786];\nconst X788 = [...X787];\nconst X789 = [...X788];\nconst X790 = [...X789];\nconst X791 = [...X790];\nconst X792 = [...X791];\nconst X793 = [...X792];\nconst X794 = [...X793];\nconst X795 = [...X794];\nconst X796 = [...X795];\nconst X797 = [...X796];\nconst X798 = [...X797];\nconst X799 = [...X798];\nconst X800 = [...X799];\nconst X801 = [...X800];\nconst X802 = [...X801];\nconst X803 = [...X802];\nconst X804 = [...X803];\nconst X805 = [...X804];\nconst X806 = [...X805];\nconst X807 = [...X806];\nconst X808 = [...X807];\nconst X809 = [...X808];\nconst X810 = [...X809];\nconst X811 = [...X810];\nconst X812 = [...X811];\nconst X813 = [...X812];\nconst X814 = [...X813];\nconst X815 = [...X814];\nconst X816 = [...X815];\nconst X817 = [...X816];\nconst X818 = [...X817];\nconst X819 = [...X818];\nconst X820 = [...X819];\nconst X821 = [...X820];\nconst X822 = [...X821];\nconst X823 = [...X822];\nconst X824 = [...X823];\nconst X825 = [...X824];\nconst X826 = [...X825];\nconst X827 = [...X826];\nconst X828 = [...X827];\nconst X829 = [...X828];\nconst X830 = [...X829];\nconst X831 = [...X830];\nconst X832 = [...X831];\nconst X833 = [...X832];\nconst X834 = [...X833];\nconst X835 = [...X834];\nconst X836 = [...X835];\nconst X837 = [...X836];\nconst X838 = [...X837];\nconst X839 = [...X838];\nconst X840 = [...X839];\nconst X841 = [...X840];\nconst X842 = [...X841];\nconst X843 = [...X842];\nconst X844 = [...X843];\nconst X845 = [...X844];\nconst X846 = [...X845];\nconst X847 = [...X846];\nconst X848 = [...X847];\nconst X849 = [...X848];\nconst X850 = [...X849];\nconst X851 = [...X850];\nconst X852 = [...X851];\nconst X853 = [...X852];\nconst X854 = [...X853];\nconst X855 = [...X854];\nconst X856 = [...X855];\nconst X857 = [...X856];\nconst X858 = [...X857];\nconst X859 = [...X858];\nconst X860 = [...X859];\nconst X861 = [...X860];\nconst X862 = [...X861];\nconst X863 = [...X862];\nconst X864 = [...X863];\nconst X865 = [...X864];\nconst X866 = [...X865];\nconst X867 = [...X866];\nconst X868 = [...X867];\nconst X869 = [...X868];\nconst X870 = [...X869];\nconst X871 = [...X870];\nconst X872 = [...X871];\nconst X873 = [...X872];\nconst X874 = [...X873];\nconst X875 = [...X874];\nconst X876 = [...X875];\nconst X877 = [...X876];\nconst X878 = [...X877];\nconst X879 = [...X878];\nconst X880 = [...X879];\nconst X881 = [...X880];\nconst X882 = [...X881];\nconst X883 = [...X882];\nconst X884 = [...X883];\nconst X885 = [...X884];\nconst X886 = [...X885];\nconst X887 = [...X886];\nconst X888 = [...X887];\nconst X889 = [...X888];\nconst X890 = [...X889];\nconst X891 = [...X890];\nconst X892 = [...X891];\nconst X893 = [...X892];\nconst X894 = [...X893];\nconst X895 = [...X894];\nconst X896 = [...X895];\nconst X897 = [...X896];\nconst X898 = [...X897];\nconst X899 = [...X898];\nconst X900 = [...X899];\nconst X901 = [...X900];\nconst X902 = [...X901];\nconst X903 = [...X902];\nconst X904 = [...X903];\nconst X905 = [...X904];\nconst X906 = [...X905];\nconst X907 = [...X906];\nconst X908 = [...X907];\nconst X909 = [...X908];\nconst X910 = [...X909];\nconst X911 = [...X910];\nconst X912 = [...X911];\nconst X913 = [...X912];\nconst X914 = [...X913];\nconst X915 = [...X914];\nconst X916 = [...X915];\nconst X917 = [...X916];\nconst X918 = [...X917];\nconst X919 = [...X918];\nconst X920 = [...X919];\nconst X921 = [...X920];\nconst X922 = [...X921];\nconst X923 = [...X922];\nconst X924 = [...X923];\nconst X925 = [...X924];\nconst X926 = [...X925];\nconst X927 = [...X926];\nconst X928 = [...X927];\nconst X929 = [...X928];\nconst X930 = [...X929];\nconst X931 = [...X930];\nconst X932 = [...X931];\nconst X933 = [...X932];\nconst X934 = [...X933];\nconst X935 = [...X934];\nconst X936 = [...X935];\nconst X937 = [...X936];\nconst X938 = [...X937];\nconst X939 = [...X938];\nconst X940 = [...X939];\nconst X941 = [...X940];\nconst X942 = [...X941];\nconst X943 = [...X942];\nconst X944 = [...X943];\nconst X945 = [...X944];\nconst X946 = [...X945];\nconst X947 = [...X946];\nconst X948 = [...X947];\nconst X949 = [...X948];\nconst X950 = [...X949];\nconst X951 = [...X950];\nconst X952 = [...X951];\nconst X953 = [...X952];\nconst X954 = [...X953];\nconst X955 = [...X954];\nconst X956 = [...X955];\nconst X957 = [...X956];\nconst X958 = [...X957];\nconst X959 = [...X958];\nconst X960 = [...X959];\nconst X961 = [...X960];\nconst X962 = [...X961];\nconst X963 = [...X962];\nconst X964 = [...X963];\nconst X965 = [...X964];\nconst X966 = [...X965];\nconst X967 = [...X966];\nconst X968 = [...X967];\nconst X969 = [...X968];\nconst X970 = [...X969];\nconst X971 = [...X970];\nconst X972 = [...X971];\nconst X973 = [...X972];\nconst X974 = [...X973];\nconst X975 = [...X974];\nconst X976 = [...X975];\nconst X977 = [...X976];\nconst X978 = [...X977];\nconst X979 = [...X978];\nconst X980 = [...X979];\nconst X981 = [...X980];\nconst X982 = [...X981];\nconst X983 = [...X982];\nconst X984 = [...X983];\nconst X985 = [...X984];\nconst X986 = [...X985];\nconst X987 = [...X986];\nconst X988 = [...X987];\nconst X989 = [...X988];\nconst X990 = [...X989];\nconst X991 = [...X990];\nconst X992 = [...X991];\nconst X993 = [...X992];\nconst X994 = [...X993];\nconst X995 = [...X994];\nconst X996 = [...X995];\nconst X997 = [...X996];\nconst X998 = [...X997];\nconst X999 = [...X998];\n\n@Directive({selector: '[d]', inputs: X999})\nexport class Dir {}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{a:\"a\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } }, - "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." - ], - "diagnosticSpans": [[107, 124]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-optionalChain", + "name": "probe: misc-enumIndex", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nconst O = {a: 'x'};\n@Directive({selector: '[d]', inputs: [O?.a]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nenum E { A = 5, B, C = 'c', D }\n@Directive({selector: '[d]', inputs: [`x${E.A}${E.B}${E.C}${E.D}`]})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{x:\"x\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{x51c3:\"x51c3\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: misc-nonNull", + "name": "probe: misc-enumStringKey", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nconst O = {a: 'x'};\n@Directive({selector: '[d]', inputs: [O.a!]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nenum E { 'x-y' = 'q' }\n@Directive({selector: '[d]', inputs: [`${E['x-y']}`]})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{x:\"x\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{q:\"q\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: misc-asConst", + "name": "probe: misc-enumSelfRef", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: ['a', 'b'] as const})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nenum E { A = 'x', B = A }\n@Directive({selector: '[d]', inputs: [`${E.B}`]})\nexport class Dir {}\n" + }, + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." + ], + "diagnosticSpans": [[133, 143]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: misc-enumTwice", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nenum E { A = 'x' }\nenum E { B = 1 }\n@Directive({selector: '[d]', inputs: [`${E.A}`, `${E.B}`]})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{a:\"a\",b:\"b\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{x:\"x\",undefined:\"undefined\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: misc-parenSeq", + "name": "probe: misc-enumOutsideConst", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: [('x', 'a')]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nconst A = 'outer';\nenum E { A = 'x', B = A }\n@Directive({selector: '[d]', inputs: [`${E.B}`]})\nexport class Dir {}\n" }, "diagnostics": [ "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." ], - "diagnosticSpans": [[107, 119]], + "diagnosticSpans": [[152, 162]], "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-assign", + "name": "probe: misc-thisParam", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nlet Y;\n@Directive({selector: '[d]', inputs: [Y = 'a']})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nfunction mk(this: any, x: string) { return [x]; }\n@Directive({selector: '[d]', inputs: mk('a', 'b')})\nexport class Dir {}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{b:\"b\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: misc-typeofQualified", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nenum E { A = 'x' }\ndeclare const X: typeof E.A;\n@Directive({selector: '[d]', inputs: [X]})\nexport class Dir {}\n" }, "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." + "@Directive.inputs array can only contain strings or object literals Value is a reference to 'A'." ], - "diagnosticSpans": [[114, 123]], + "diagnosticSpans": [[155, 158]], "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-classExpr", + "name": "probe: misc-tupleNonLiteral", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: [class Foo {}]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\ndeclare const X: ['a', string];\n@Directive({selector: '[d]', inputs: X})\nexport class Dir {}\n" }, "diagnostics": [ "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." ], - "diagnosticSpans": [[107, 121]], + "diagnosticSpans": [[139, 140]], "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-objProtoKey", + "name": "probe: misc-tupleNeg", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: [{__proto__: 'x', name: 'a'}]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\ndeclare const X: [-1];\n@Directive({selector: '[d]', inputs: [`${X[0]}`]})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{a:\"a\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{\"-1\":\"-1\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: misc-objDupKey", + "name": "probe: misc-tupleTemplateType", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: [{name: 'a', name: 'b'}]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\ndeclare const X: [`a`];\n@Directive({selector: '[d]', inputs: X})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{b:\"b\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{a:\"a\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: misc-objDescribeDup", + "name": "probe: misc-declareTypeRefClass", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: {a: 1, b: 2, a: 'x'}})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nclass U {}\ndeclare const X: U;\n@Directive({selector: '[d]', inputs: [X]})\nexport class Dir {}\n" }, "diagnostics": [ - "Failed to resolve @Directive.inputs to an array Value is of type '{ a: string; b: number }'." + "@Directive.inputs array can only contain strings or object literals Value is a reference to 'U'." ], - "diagnosticSpans": [[107, 127]], + "diagnosticSpans": [[138, 141]], "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-objIndexUndefinedKey", + "name": "probe: misc-declareTypeRefAlias", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nconst O = {a: 1};\n@Directive({selector: '[d]', inputs: [`${O.b}`]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\ntype T = ['a'];\ndeclare const X: T;\n@Directive({selector: '[d]', inputs: X})\nexport class Dir {}\n" }, - "diagnostics": [], - "diagnosticSpans": [], - "classes": { - "Dir": { - "inputs": "{undefined:\"undefined\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "diagnostics": [ + "Failed to resolve @Directive.inputs to an array Value is a reference to 'X'." + ], + "diagnosticSpans": [[143, 144]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: misc-declareTupleOptional", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\ndeclare const X: ['a'?];\n@Directive({selector: '[d]', inputs: X})\nexport class Dir {}\n" }, + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." + ], + "diagnosticSpans": [[132, 133]], + "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-arrayHoleDescribe", + "name": "probe: misc-declareTupleRest", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: [, 'a']})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\ndeclare const X: ['a', ...string[]];\n@Directive({selector: '[d]', inputs: X})\nexport class Dir {}\n" }, "diagnostics": [ "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." ], - "diagnosticSpans": [[107, 114]], + "diagnosticSpans": [[144, 145]], "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-arrayInArrayDescribe", + "name": "probe: misc-declareUnion", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: {a: [1, [2]]}})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\ndeclare const X: ['a'] | ['b'];\n@Directive({selector: '[d]', inputs: X})\nexport class Dir {}\n" }, "diagnostics": [ - "Failed to resolve @Directive.inputs to an array Value is of type '{ a: Array }'." + "Failed to resolve @Directive.inputs to an array Value is a reference to 'X'." ], - "diagnosticSpans": [[107, 120]], + "diagnosticSpans": [[139, 140]], "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-emptyArray", + "name": "probe: misc-declareNull", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: []})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\ndeclare const X: [null, true, 1];\n@Directive({selector: '[d]', inputs: [`${X[0]}${X[1]}${X[2]}`]})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { "Dir": { - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{nulltrue1:\"nulltrue1\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: span-signalCollision", + "name": "probe: misc-declareExport", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: ['v']})\nexport class Dir {\n v = input();\n}\n" + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nexport declare const X: ['a'];\n@Directive({selector: '[d]', inputs: X})\nexport class Dir {}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{a:\"a\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } }, - "diagnostics": ["Input \"v\" is also declared as non-signal in @Directive."], - "diagnosticSpans": [[136, 156]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: span-outputCollision", + "name": "probe: misc-declareVar", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', outputs: ['o']})\nexport class Dir {\n o = output();\n}\n" + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\ndeclare var X: ['a'];\n@Directive({selector: '[d]', inputs: X})\nexport class Dir {}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{a:\"a\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } }, - "diagnostics": ["Output \"o\" is unexpectedly declared in @Directive as well."], - "diagnosticSpans": [[137, 158]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: span-decoratedCollision", + "name": "probe: misc-describeObjOrder", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: ['v']})\nexport class Dir {\n /** doc */ @Input() w: any;\n // c\n readonly v = model();\n}\n" + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: {b: 1, 1: 2, a: {c: 1}, 'x-y': [1]}})\nexport class Dir {}\n" }, - "diagnostics": ["Input \"v\" is also declared as non-signal in @Directive."], - "diagnosticSpans": [[173, 202]], + "diagnostics": [ + "Failed to resolve @Directive.inputs to an array Value is of type '{ b: number; 1: number; a: object; 'x-y': Array }'." + ], + "diagnosticSpans": [[107, 142]], "classes": {}, "dtsImports": [] }, { - "name": "probe: span-shorthandInputs", + "name": "probe: misc-describeNested", "origin": "probe", "files": { - "test.ts": "import {Directive} from '@angular/core';\nconst inputs = [1];\n@Directive({selector: '[d]', inputs})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: [[{a: 1}, [1]]]})\nexport class Dir {}\n" }, "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value is of type 'number'." + "@Directive.inputs array can only contain strings or object literals Value is of type '[object, Array]'." ], - "diagnosticSpans": [[90, 96]], + "diagnosticSpans": [[107, 122]], "classes": {}, "dtsImports": [] }, { - "name": "probe: span-multiline", + "name": "probe: misc-describeFunction", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: [\n 'a',\n 2,\n ]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nconst A = ['a'];\n@Directive({selector: '[d]', inputs: [A.concat]})\nexport class Dir {}\n" }, "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value is of type 'number'." + "@Directive.inputs array can only contain strings or object literals Value is of type 'Function'." ], - "diagnosticSpans": [[107, 128]], + "diagnosticSpans": [[124, 134]], "classes": {}, "dtsImports": [] }, { - "name": "probe: span-unicode", + "name": "probe: misc-describeBuiltinStr", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nconst S = '😀';\n@Directive({selector: '[d]', inputs: [S, 1]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: ['a'.concat]})\nexport class Dir {}\n" }, "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value is of type 'number'." + "@Directive.inputs array can only contain strings or object literals Value is of type 'Function'." ], - "diagnosticSpans": [[123, 129]], + "diagnosticSpans": [[107, 119]], "classes": {}, "dtsImports": [] }, { - "name": "probe: span-parenthesized", + "name": "probe: misc-staticMethodRef", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: (([1]))})\nexport class Dir {}\n" + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nclass U { static m() { return 1; } }\n@Directive({selector: '[d]', inputs: [U.m]})\nexport class Dir {}\n" }, "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value is of type 'number'." + "@Directive.inputs array can only contain strings or object literals Value is a reference to 'm'." ], - "diagnosticSpans": [[107, 114]], + "diagnosticSpans": [[144, 149]], "classes": {}, "dtsImports": [] }, { - "name": "probe: scope-paramImport", + "name": "probe: misc-staticFieldUndefined", "origin": "probe", "files": { - "test.ts": "import { Directive, booleanAttribute } from '@angular/core';\nfunction make(name: string, transform: any) { return [{ name, transform }]; }\n@Directive({ selector: '[d]', inputs: make('x', booleanAttribute) })\nexport class D { x: any; }\n" + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nclass U { static m: string; }\n@Directive({selector: '[d]', inputs: [U.m]})\nexport class Dir {}\n" }, - "diagnostics": [], - "classes": { - "D": { - "inputs": "{x:[2,\"x\",\"x\",booleanAttribute]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;", - "dts:ngAcceptInputType_x": "staticngAcceptInputType_x:unknown;" - } + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value is a reference to 'm'." + ], + "diagnosticSpans": [[137, 142]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: misc-staticPrototype", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nclass U {}\n@Directive({selector: '[d]', inputs: [U.prototype]})\nexport class Dir {}\n" }, - "dtsImports": [], - "diagnosticSpans": [] + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value is of type 'undefined'." + ], + "diagnosticSpans": [[118, 131]], + "classes": {}, + "dtsImports": [] }, { - "name": "probe: scope-paramLocal", + "name": "probe: misc-staticInstanceMember", "origin": "probe", "files": { - "test.ts": "import { Directive } from '@angular/core';\nexport function toBool(v: unknown): boolean { return !!v; }\nfunction make(name: string, transform: any) { return [{ name, transform }]; }\n@Directive({ selector: '[d]', inputs: make('x', toBool) })\nexport class D { x: any; }\n" + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nclass U { m = 'a'; }\n@Directive({selector: '[d]', inputs: [U.m]})\nexport class Dir {}\n" }, - "diagnostics": [], - "classes": { - "D": { - "inputs": "{x:[2,\"x\",\"x\",toBool]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;", - "dts:ngAcceptInputType_x": "staticngAcceptInputType_x:unknown;" - } + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value is of type 'undefined'." + ], + "diagnosticSpans": [[128, 133]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: misc-fnRef", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nfunction mk() { return 1; }\n@Directive({selector: '[d]', inputs: [mk]})\nexport class Dir {}\n" }, - "dtsImports": [], - "diagnosticSpans": [] + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value is a reference to 'mk'." + ], + "diagnosticSpans": [[135, 139]], + "classes": {}, + "dtsImports": [] }, { - "name": "probe: scope-paramArrow", + "name": "probe: misc-fnRefMember", "origin": "probe", "files": { - "test.ts": "import { Directive } from '@angular/core';\nfunction make(name: string, transform: any) { return [{ name, transform }]; }\n@Directive({ selector: '[d]', inputs: make('x', (v: string) => v.length) })\nexport class D { x: any; }\n" + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nfunction mk() { return 1; }\n@Directive({selector: '[d]', inputs: [mk.name]})\nexport class Dir {}\n" }, - "diagnostics": [], - "classes": { - "D": { - "inputs": "{x:[2,\"x\",\"x\",(v)=>v.length]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." + ], + "diagnosticSpans": [[135, 144]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: misc-mathPI", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: [`${Math.PI}`]})\nexport class Dir {}\n" }, - "dtsImports": [], - "diagnosticSpans": [] + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." + ], + "diagnosticSpans": [[107, 121]], + "classes": {}, + "dtsImports": [] }, { - "name": "probe: scope-bodyRef", + "name": "probe: misc-condEnumZero", "origin": "probe", "files": { - "test.ts": "import { Directive } from '@angular/core';\nexport function toBool(v: unknown): boolean { return !!v; }\nfunction make(name: string) { return [{ name, transform: toBool }]; }\n@Directive({ selector: '[d]', inputs: make('x') })\nexport class D { x: any; }\n" + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nenum E { A }\n@Directive({selector: '[d]', inputs: E.A ? ['t'] : ['f']})\nexport class Dir {}\n" }, "diagnostics": [], + "diagnosticSpans": [], "classes": { - "D": { - "inputs": "{x:[2,\"x\",\"x\",toBool]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;", - "dts:ngAcceptInputType_x": "staticngAcceptInputType_x:unknown;" + "Dir": { + "inputs": "{t:\"t\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, - "dtsImports": [], - "diagnosticSpans": [] + "dtsImports": [] }, { - "name": "probe: scope-constObj", + "name": "probe: misc-unaryArray", "origin": "probe", "files": { - "test.ts": "import { Directive, booleanAttribute } from '@angular/core';\nconst X = { name: 'x', transform: booleanAttribute };\n@Directive({ selector: '[d]', inputs: [X] })\nexport class D { x: any; }\n" + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: [`${-['5']}${+[]}${!['a']}${~['3']}`]})\nexport class Dir {}\n" }, "diagnostics": [], + "diagnosticSpans": [], "classes": { - "D": { - "inputs": "{x:[2,\"x\",\"x\",booleanAttribute]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;", - "dts:ngAcceptInputType_x": "staticngAcceptInputType_x:unknown;" + "Dir": { + "inputs": "{\"-50false-4\":\"-50false-4\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, - "dtsImports": [], - "diagnosticSpans": [] + "dtsImports": [] }, { - "name": "probe: scope-staticMethod", + "name": "probe: misc-binaryArrayOperand", "origin": "probe", "files": { - "test.ts": "import { Directive, booleanAttribute } from '@angular/core';\nclass H { static make(t: any) { return [{ name: 'x', transform: t }]; } }\n@Directive({ selector: '[d]', inputs: H.make(booleanAttribute) })\nexport class D { x: any; }\n" + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: [['a'] + '']})\nexport class Dir {}\n" }, - "diagnostics": [], - "classes": { - "D": { - "inputs": "{x:[2,\"x\",\"x\",booleanAttribute]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;", - "dts:ngAcceptInputType_x": "staticngAcceptInputType_x:unknown;" - } + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." + ], + "diagnosticSpans": [[107, 119]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: misc-andRef", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nclass U {}\n@Directive({selector: '[d]', inputs: [U && 'a', null && U]})\nexport class Dir {}\n" }, - "dtsImports": [], - "diagnosticSpans": [] + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value is of type 'null'." + ], + "diagnosticSpans": [[118, 139]], + "classes": {}, + "dtsImports": [] }, { - "name": "probe: scope-nestedHelper", + "name": "probe: misc-orDynamicRhs", "origin": "probe", "files": { - "test.ts": "import { Directive, booleanAttribute } from '@angular/core';\nfunction inner(n: string, t: any) { return [{ name: n, transform: t }]; }\nfunction outer(t: any) { return inner('x', t); }\n@Directive({ selector: '[d]', inputs: outer(booleanAttribute) })\nexport class D { x: any; }\n" + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\ndeclare function f(): any;\n@Directive({selector: '[d]', inputs: ['a' || f()]})\nexport class Dir {}\n" + }, + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." + ], + "diagnosticSpans": [[134, 146]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: misc-plusNumStr", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: [`x${1 + 2 + '3'}${'1' - 1}${'0x10' * 1}${' 12 ' * 1}${'' * 1}${'1e3' * 1}${'abc' * 1}${null + 1}${undefined + 1}${true + true}`]})\nexport class Dir {}\n" }, "diagnostics": [], + "diagnosticSpans": [], "classes": { - "D": { - "inputs": "{x:[2,\"x\",\"x\",booleanAttribute]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;", - "dts:ngAcceptInputType_x": "staticngAcceptInputType_x:unknown;" + "Dir": { + "inputs": "{x330161201000NaN1NaN2:\"x330161201000NaN1NaN2\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, - "dtsImports": [], - "diagnosticSpans": [] + "dtsImports": [] }, { - "name": "probe: scope-defaultParam", + "name": "probe: misc-looseEq", "origin": "probe", "files": { - "test.ts": "import { Directive, booleanAttribute } from '@angular/core';\nfunction make(n: string, t: any = booleanAttribute) { return [{ name: n, transform: t }]; }\n@Directive({ selector: '[d]', inputs: make('x') })\nexport class D { x: any; }\n" + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: [`${null == undefined}${'1' == 1}${true == 1}${null == 0}${'' == 0}${'a' < 'b'}${'10' < '9'}${'10' < 9}`]})\nexport class Dir {}\n" }, "diagnostics": [], + "diagnosticSpans": [], "classes": { - "D": { - "inputs": "{x:[2,\"x\",\"x\",booleanAttribute]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;", - "dts:ngAcceptInputType_x": "staticngAcceptInputType_x:unknown;" + "Dir": { + "inputs": "{truetruetruefalsetruetruetruefalse:\"truetruetruefalsetruetruetruefalse\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, - "dtsImports": [], - "diagnosticSpans": [] + "dtsImports": [] }, { - "name": "probe: scope-aliasParam", + "name": "probe: misc-divZero", "origin": "probe", "files": { - "test.ts": "import { Directive } from '@angular/core';\nfunction make(n: string, a: string) { return [{ name: n, alias: a }]; }\n@Directive({ selector: '[d]', inputs: make('x', 'why') })\nexport class D { x: any; }\n" + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: [`${1 / 0}${-1 / 0}${0 / 0}${5 % 0}${-0}${2 ** -1}${7 % -3}${-7 % 3}`]})\nexport class Dir {}\n" }, "diagnostics": [], + "diagnosticSpans": [], "classes": { - "D": { - "inputs": "{x:[0,\"why\",\"x\"]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "Dir": { + "inputs": "{\"Infinity-InfinityNaNNaN00.51-1\":\"Infinity-InfinityNaNNaN00.51-1\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, - "dtsImports": [], - "diagnosticSpans": [] + "dtsImports": [] }, { - "name": "probe: scope-aliasImportParam", + "name": "probe: misc-bitwise", "origin": "probe", "files": { - "test.ts": "import { Directive, booleanAttribute as ba } from '@angular/core';\nfunction make(name: string, transform: any) { return [{ name, transform }]; }\n@Directive({ selector: '[d]', inputs: make('x', ba) })\nexport class D { x: any; }\n" + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: [`${2 ** 31 | 0}${1.9 | 0}${-1 >>> 0}${1 << 33}${'3' & 1}`]})\nexport class Dir {}\n" }, "diagnostics": [], + "diagnosticSpans": [], "classes": { - "D": { - "inputs": "{x:[2,\"x\",\"x\",ba]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;", - "dts:ngAcceptInputType_x": "staticngAcceptInputType_x:unknown;" + "Dir": { + "inputs": "{\"-21474836481429496729521\":\"-21474836481429496729521\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, - "dtsImports": [], - "diagnosticSpans": [] + "dtsImports": [] }, { - "name": "probe: scope-bodyArrowSafe", + "name": "probe: misc-hexLiteral", "origin": "probe", "files": { - "test.ts": "import { Directive } from '@angular/core';\nfunction make(name: string) { return [{ name, transform: (v: string) => v.length }]; }\n@Directive({ selector: '[d]', inputs: make('x') })\nexport class D { x: any; }\n" + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: [`${0x1F}${1_000}${0b11}${0o7}${.5}${5.}${1e-7}`]})\nexport class Dir {}\n" }, "diagnostics": [], + "diagnosticSpans": [], "classes": { - "D": { - "inputs": "{x:[2,\"x\",\"x\",(v)=>v.length]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "Dir": { + "inputs": "{\"311000370.551e-7\":\"311000370.551e-7\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, - "dtsImports": [], - "diagnosticSpans": [] + "dtsImports": [] }, { - "name": "probe: initializerApi-inputCoreAlias", + "name": "probe: misc-bigint", "origin": "probe", "files": { - "test.ts": "import { Directive, input as inp } from '@angular/core';\n@Directive({ selector: '[d]', inputs: ['value'] })\nexport class D { value = inp(); }\n", - "other.ts": "export function input(...a: any[]): any { return null; }\nexport namespace input { export function required(...a: any[]): any { return null; } }\nexport function model(...a: any[]): any { return null; }\nexport function output(...a: any[]): any { return null; }\nexport function outputFromObservable(...a: any[]): any { return null; }\nexport function viewChild(...a: any[]): any { return null; }\nexport function viewChildren(...a: any[]): any { return null; }\nexport function contentChild(...a: any[]): any { return null; }\nexport function contentChildren(...a: any[]): any { return null; }\n" + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: [`${1n}`]})\nexport class Dir {}\n" }, - "diagnostics": ["Input \"value\" is also declared as non-signal in @Directive."], - "classes": {}, - "dtsImports": [], - "diagnosticSpans": [[125, 139]] + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." + ], + "diagnosticSpans": [[107, 116]], + "classes": {}, + "dtsImports": [] }, { - "name": "probe: initializerApi-inputRequiredCoreNamespace", + "name": "probe: misc-regex", "origin": "probe", "files": { - "test.ts": "import { Directive } from '@angular/core';\nimport * as core from '@angular/core';\n@Directive({ selector: '[d]', inputs: ['value'] })\nexport class D { value = core.input.required(); }\n", - "other.ts": "export function input(...a: any[]): any { return null; }\nexport namespace input { export function required(...a: any[]): any { return null; } }\nexport function model(...a: any[]): any { return null; }\nexport function output(...a: any[]): any { return null; }\nexport function outputFromObservable(...a: any[]): any { return null; }\nexport function viewChild(...a: any[]): any { return null; }\nexport function viewChildren(...a: any[]): any { return null; }\nexport function contentChild(...a: any[]): any { return null; }\nexport function contentChildren(...a: any[]): any { return null; }\n" + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: [/a/]})\nexport class Dir {}\n" }, - "diagnostics": ["Input \"value\" is also declared as non-signal in @Directive."], + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." + ], + "diagnosticSpans": [[107, 112]], "classes": {}, - "dtsImports": [], - "diagnosticSpans": [[150, 180]] + "dtsImports": [] }, { - "name": "probe: initializerApi-modelCoreOutputsMeta", + "name": "probe: misc-new", "origin": "probe", "files": { - "test.ts": "import { Directive, model } from '@angular/core';\n@Directive({ selector: '[d]', outputs: ['valueChange'] })\nexport class D { value = model(); }\n", - "other.ts": "export function input(...a: any[]): any { return null; }\nexport namespace input { export function required(...a: any[]): any { return null; } }\nexport function model(...a: any[]): any { return null; }\nexport function output(...a: any[]): any { return null; }\nexport function outputFromObservable(...a: any[]): any { return null; }\nexport function viewChild(...a: any[]): any { return null; }\nexport function viewChildren(...a: any[]): any { return null; }\nexport function contentChild(...a: any[]): any { return null; }\nexport function contentChildren(...a: any[]): any { return null; }\n" + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: [new String('a')]})\nexport class Dir {}\n" + }, + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." + ], + "diagnosticSpans": [[107, 124]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: misc-optionalChain", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nconst O = {a: 'x'};\n@Directive({selector: '[d]', inputs: [O?.a]})\nexport class Dir {}\n" }, "diagnostics": [], + "diagnosticSpans": [], "classes": { - "D": { - "inputs": "{value:[1,\"value\"]}", - "outputs": "{valueChange:\"valueChange\",value:\"valueChange\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "Dir": { + "inputs": "{x:\"x\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, - "dtsImports": [], - "diagnosticSpans": [] + "dtsImports": [] }, { - "name": "probe: initializerApi-modelCoreAlias", + "name": "probe: misc-nonNull", "origin": "probe", "files": { - "test.ts": "import { Directive, model as m } from '@angular/core';\n@Directive({ selector: '[d]', inputs: ['value'] })\nexport class D { value = m(); }\n", - "other.ts": "export function input(...a: any[]): any { return null; }\nexport namespace input { export function required(...a: any[]): any { return null; } }\nexport function model(...a: any[]): any { return null; }\nexport function output(...a: any[]): any { return null; }\nexport function outputFromObservable(...a: any[]): any { return null; }\nexport function viewChild(...a: any[]): any { return null; }\nexport function viewChildren(...a: any[]): any { return null; }\nexport function contentChild(...a: any[]): any { return null; }\nexport function contentChildren(...a: any[]): any { return null; }\n" + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nconst O = {a: 'x'};\n@Directive({selector: '[d]', inputs: [O.a!]})\nexport class Dir {}\n" }, - "diagnostics": ["Input \"value\" is also declared as non-signal in @Directive."], + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{x:\"x\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: misc-asConst", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: ['a', 'b'] as const})\nexport class Dir {}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{a:\"a\",b:\"b\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: misc-parenSeq", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: [('x', 'a')]})\nexport class Dir {}\n" + }, + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." + ], + "diagnosticSpans": [[107, 119]], "classes": {}, - "dtsImports": [], - "diagnosticSpans": [[123, 135]] + "dtsImports": [] }, { - "name": "probe: initializerApi-inputAsCast", + "name": "probe: misc-assign", "origin": "probe", "files": { - "test.ts": "import { Directive, input } from '@angular/core';\n@Directive({ selector: '[d]', inputs: ['value'] })\nexport class D { value = (input() as any); }\n", - "other.ts": "export function input(...a: any[]): any { return null; }\nexport namespace input { export function required(...a: any[]): any { return null; } }\nexport function model(...a: any[]): any { return null; }\nexport function output(...a: any[]): any { return null; }\nexport function outputFromObservable(...a: any[]): any { return null; }\nexport function viewChild(...a: any[]): any { return null; }\nexport function viewChildren(...a: any[]): any { return null; }\nexport function contentChild(...a: any[]): any { return null; }\nexport function contentChildren(...a: any[]): any { return null; }\n" + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nlet Y;\n@Directive({selector: '[d]', inputs: [Y = 'a']})\nexport class Dir {}\n" }, - "diagnostics": ["Input \"value\" is also declared as non-signal in @Directive."], + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." + ], + "diagnosticSpans": [[114, 123]], "classes": {}, - "dtsImports": [], - "diagnosticSpans": [[118, 143]] + "dtsImports": [] }, { - "name": "probe: initializerApi-inputTypeOnlyImportCast", + "name": "probe: misc-classExpr", "origin": "probe", "files": { - "test.ts": "import { Directive } from '@angular/core';\nimport type { input } from '@angular/core';\n@Directive({ selector: '[d]', inputs: ['value'] })\nexport class D { value = (input as any)(); }\n", - "other.ts": "export function input(...a: any[]): any { return null; }\nexport namespace input { export function required(...a: any[]): any { return null; } }\nexport function model(...a: any[]): any { return null; }\nexport function output(...a: any[]): any { return null; }\nexport function outputFromObservable(...a: any[]): any { return null; }\nexport function viewChild(...a: any[]): any { return null; }\nexport function viewChildren(...a: any[]): any { return null; }\nexport function contentChild(...a: any[]): any { return null; }\nexport function contentChildren(...a: any[]): any { return null; }\n" + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: [class Foo {}]})\nexport class Dir {}\n" + }, + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." + ], + "diagnosticSpans": [[107, 121]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: misc-objProtoKey", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: [{__proto__: 'x', name: 'a'}]})\nexport class Dir {}\n" }, "diagnostics": [], + "diagnosticSpans": [], "classes": { - "D": { - "inputs": "{value:\"value\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "Dir": { + "inputs": "{a:\"a\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, - "dtsImports": [], - "diagnosticSpans": [] + "dtsImports": [] }, { - "name": "probe: initializerApi-outputOtherModule", + "name": "probe: misc-objDupKey", "origin": "probe", "files": { - "test.ts": "import { Directive } from '@angular/core';\nimport { output } from './other';\n@Directive({ selector: '[d]', outputs: ['changed'] })\nexport class D { changed = output(); }\n", - "other.ts": "export function input(...a: any[]): any { return null; }\nexport namespace input { export function required(...a: any[]): any { return null; } }\nexport function model(...a: any[]): any { return null; }\nexport function output(...a: any[]): any { return null; }\nexport function outputFromObservable(...a: any[]): any { return null; }\nexport function viewChild(...a: any[]): any { return null; }\nexport function viewChildren(...a: any[]): any { return null; }\nexport function contentChild(...a: any[]): any { return null; }\nexport function contentChildren(...a: any[]): any { return null; }\n" + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: [{name: 'a', name: 'b'}]})\nexport class Dir {}\n" }, "diagnostics": [], + "diagnosticSpans": [], "classes": { - "D": { - "outputs": "{changed:\"changed\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "Dir": { + "inputs": "{b:\"b\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, - "dtsImports": [], - "diagnosticSpans": [] + "dtsImports": [] }, { - "name": "probe: initializerApi-outputFromObservable", + "name": "probe: misc-objDescribeDup", "origin": "probe", "files": { - "test.ts": "import { Directive } from '@angular/core';\nimport { outputFromObservable } from '@angular/core/rxjs-interop';\nimport { Subject } from 'rxjs';\n@Directive({ selector: '[d]', outputs: ['changed'] })\nexport class D { changed = outputFromObservable(new Subject()); }\n", - "other.ts": "export function input(...a: any[]): any { return null; }\nexport namespace input { export function required(...a: any[]): any { return null; } }\nexport function model(...a: any[]): any { return null; }\nexport function output(...a: any[]): any { return null; }\nexport function outputFromObservable(...a: any[]): any { return null; }\nexport function viewChild(...a: any[]): any { return null; }\nexport function viewChildren(...a: any[]): any { return null; }\nexport function contentChild(...a: any[]): any { return null; }\nexport function contentChildren(...a: any[]): any { return null; }\n" + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: {a: 1, b: 2, a: 'x'}})\nexport class Dir {}\n" }, - "diagnostics": ["Output \"changed\" is unexpectedly declared in @Directive as well."], + "diagnostics": [ + "Failed to resolve @Directive.inputs to an array Value is of type '{ a: string; b: number }'." + ], + "diagnosticSpans": [[107, 127]], "classes": {}, - "dtsImports": [], - "diagnosticSpans": [[213, 265]] + "dtsImports": [] }, { - "name": "probe: initializerApi-outputFromObservableOtherModule", + "name": "probe: misc-objIndexUndefinedKey", "origin": "probe", "files": { - "test.ts": "import { Directive } from '@angular/core';\nimport { outputFromObservable } from './other';\n@Directive({ selector: '[d]', outputs: ['changed'] })\nexport class D { changed = outputFromObservable(null); }\n", - "other.ts": "export function input(...a: any[]): any { return null; }\nexport namespace input { export function required(...a: any[]): any { return null; } }\nexport function model(...a: any[]): any { return null; }\nexport function output(...a: any[]): any { return null; }\nexport function outputFromObservable(...a: any[]): any { return null; }\nexport function viewChild(...a: any[]): any { return null; }\nexport function viewChildren(...a: any[]): any { return null; }\nexport function contentChild(...a: any[]): any { return null; }\nexport function contentChildren(...a: any[]): any { return null; }\n" + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nconst O = {a: 1};\n@Directive({selector: '[d]', inputs: [`${O.b}`]})\nexport class Dir {}\n" }, "diagnostics": [], + "diagnosticSpans": [], "classes": { - "D": { - "outputs": "{changed:\"changed\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "Dir": { + "inputs": "{undefined:\"undefined\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, - "dtsImports": [], - "diagnosticSpans": [] + "dtsImports": [] }, { - "name": "probe: initializerApi-outputFromObservableNamespace", + "name": "probe: misc-arrayHoleDescribe", "origin": "probe", "files": { - "test.ts": "import { Directive } from '@angular/core';\nimport * as rx from '@angular/core/rxjs-interop';\nimport { Subject } from 'rxjs';\n@Directive({ selector: '[d]', outputs: ['changed'] })\nexport class D { changed = rx.outputFromObservable(new Subject()); }\n", - "other.ts": "export function input(...a: any[]): any { return null; }\nexport namespace input { export function required(...a: any[]): any { return null; } }\nexport function model(...a: any[]): any { return null; }\nexport function output(...a: any[]): any { return null; }\nexport function outputFromObservable(...a: any[]): any { return null; }\nexport function viewChild(...a: any[]): any { return null; }\nexport function viewChildren(...a: any[]): any { return null; }\nexport function contentChild(...a: any[]): any { return null; }\nexport function contentChildren(...a: any[]): any { return null; }\n" + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: [, 'a']})\nexport class Dir {}\n" }, - "diagnostics": ["Output \"changed\" is unexpectedly declared in @Directive as well."], + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." + ], + "diagnosticSpans": [[107, 114]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: misc-arrayInArrayDescribe", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: {a: [1, [2]]}})\nexport class Dir {}\n" + }, + "diagnostics": [ + "Failed to resolve @Directive.inputs to an array Value is of type '{ a: Array }'." + ], + "diagnosticSpans": [[107, 120]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: misc-emptyArray", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: []})\nexport class Dir {}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: span-signalCollision", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: ['v']})\nexport class Dir {\n v = input();\n}\n" + }, + "diagnostics": ["Input \"v\" is also declared as non-signal in @Directive."], + "diagnosticSpans": [[136, 156]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: span-outputCollision", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', outputs: ['o']})\nexport class Dir {\n o = output();\n}\n" + }, + "diagnostics": ["Output \"o\" is unexpectedly declared in @Directive as well."], + "diagnosticSpans": [[137, 158]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: span-decoratedCollision", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: ['v']})\nexport class Dir {\n /** doc */ @Input() w: any;\n // c\n readonly v = model();\n}\n" + }, + "diagnostics": ["Input \"v\" is also declared as non-signal in @Directive."], + "diagnosticSpans": [[173, 202]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: span-shorthandInputs", + "origin": "probe", + "files": { + "test.ts": "import {Directive} from '@angular/core';\nconst inputs = [1];\n@Directive({selector: '[d]', inputs})\nexport class Dir {}\n" + }, + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value is of type 'number'." + ], + "diagnosticSpans": [[90, 96]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: span-multiline", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: [\n 'a',\n 2,\n ]})\nexport class Dir {}\n" + }, + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value is of type 'number'." + ], + "diagnosticSpans": [[107, 128]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: span-unicode", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\nconst S = '😀';\n@Directive({selector: '[d]', inputs: [S, 1]})\nexport class Dir {}\n" + }, + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value is of type 'number'." + ], + "diagnosticSpans": [[123, 129]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: span-parenthesized", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: (([1]))})\nexport class Dir {}\n" + }, + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value is of type 'number'." + ], + "diagnosticSpans": [[107, 114]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: scope-paramImport", + "origin": "probe", + "files": { + "test.ts": "import { Directive, booleanAttribute } from '@angular/core';\nfunction make(name: string, transform: any) { return [{ name, transform }]; }\n@Directive({ selector: '[d]', inputs: make('x', booleanAttribute) })\nexport class D { x: any; }\n" + }, + "diagnostics": [], + "classes": { + "D": { + "inputs": "{x:[2,\"x\",\"x\",booleanAttribute]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;", + "dts:ngAcceptInputType_x": "staticngAcceptInputType_x:unknown;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: scope-paramLocal", + "origin": "probe", + "files": { + "test.ts": "import { Directive } from '@angular/core';\nexport function toBool(v: unknown): boolean { return !!v; }\nfunction make(name: string, transform: any) { return [{ name, transform }]; }\n@Directive({ selector: '[d]', inputs: make('x', toBool) })\nexport class D { x: any; }\n" + }, + "diagnostics": [], + "classes": { + "D": { + "inputs": "{x:[2,\"x\",\"x\",toBool]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;", + "dts:ngAcceptInputType_x": "staticngAcceptInputType_x:unknown;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: scope-paramArrow", + "origin": "probe", + "files": { + "test.ts": "import { Directive } from '@angular/core';\nfunction make(name: string, transform: any) { return [{ name, transform }]; }\n@Directive({ selector: '[d]', inputs: make('x', (v: string) => v.length) })\nexport class D { x: any; }\n" + }, + "diagnostics": [], + "classes": { + "D": { + "inputs": "{x:[2,\"x\",\"x\",(v)=>v.length]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: scope-bodyRef", + "origin": "probe", + "files": { + "test.ts": "import { Directive } from '@angular/core';\nexport function toBool(v: unknown): boolean { return !!v; }\nfunction make(name: string) { return [{ name, transform: toBool }]; }\n@Directive({ selector: '[d]', inputs: make('x') })\nexport class D { x: any; }\n" + }, + "diagnostics": [], + "classes": { + "D": { + "inputs": "{x:[2,\"x\",\"x\",toBool]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;", + "dts:ngAcceptInputType_x": "staticngAcceptInputType_x:unknown;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: scope-constObj", + "origin": "probe", + "files": { + "test.ts": "import { Directive, booleanAttribute } from '@angular/core';\nconst X = { name: 'x', transform: booleanAttribute };\n@Directive({ selector: '[d]', inputs: [X] })\nexport class D { x: any; }\n" + }, + "diagnostics": [], + "classes": { + "D": { + "inputs": "{x:[2,\"x\",\"x\",booleanAttribute]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;", + "dts:ngAcceptInputType_x": "staticngAcceptInputType_x:unknown;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: scope-staticMethod", + "origin": "probe", + "files": { + "test.ts": "import { Directive, booleanAttribute } from '@angular/core';\nclass H { static make(t: any) { return [{ name: 'x', transform: t }]; } }\n@Directive({ selector: '[d]', inputs: H.make(booleanAttribute) })\nexport class D { x: any; }\n" + }, + "diagnostics": [], + "classes": { + "D": { + "inputs": "{x:[2,\"x\",\"x\",booleanAttribute]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;", + "dts:ngAcceptInputType_x": "staticngAcceptInputType_x:unknown;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: scope-nestedHelper", + "origin": "probe", + "files": { + "test.ts": "import { Directive, booleanAttribute } from '@angular/core';\nfunction inner(n: string, t: any) { return [{ name: n, transform: t }]; }\nfunction outer(t: any) { return inner('x', t); }\n@Directive({ selector: '[d]', inputs: outer(booleanAttribute) })\nexport class D { x: any; }\n" + }, + "diagnostics": [], + "classes": { + "D": { + "inputs": "{x:[2,\"x\",\"x\",booleanAttribute]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;", + "dts:ngAcceptInputType_x": "staticngAcceptInputType_x:unknown;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: scope-defaultParam", + "origin": "probe", + "files": { + "test.ts": "import { Directive, booleanAttribute } from '@angular/core';\nfunction make(n: string, t: any = booleanAttribute) { return [{ name: n, transform: t }]; }\n@Directive({ selector: '[d]', inputs: make('x') })\nexport class D { x: any; }\n" + }, + "diagnostics": [], + "classes": { + "D": { + "inputs": "{x:[2,\"x\",\"x\",booleanAttribute]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;", + "dts:ngAcceptInputType_x": "staticngAcceptInputType_x:unknown;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: scope-aliasParam", + "origin": "probe", + "files": { + "test.ts": "import { Directive } from '@angular/core';\nfunction make(n: string, a: string) { return [{ name: n, alias: a }]; }\n@Directive({ selector: '[d]', inputs: make('x', 'why') })\nexport class D { x: any; }\n" + }, + "diagnostics": [], + "classes": { + "D": { + "inputs": "{x:[0,\"why\",\"x\"]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: scope-aliasImportParam", + "origin": "probe", + "files": { + "test.ts": "import { Directive, booleanAttribute as ba } from '@angular/core';\nfunction make(name: string, transform: any) { return [{ name, transform }]; }\n@Directive({ selector: '[d]', inputs: make('x', ba) })\nexport class D { x: any; }\n" + }, + "diagnostics": [], + "classes": { + "D": { + "inputs": "{x:[2,\"x\",\"x\",ba]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;", + "dts:ngAcceptInputType_x": "staticngAcceptInputType_x:unknown;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: scope-bodyArrowSafe", + "origin": "probe", + "files": { + "test.ts": "import { Directive } from '@angular/core';\nfunction make(name: string) { return [{ name, transform: (v: string) => v.length }]; }\n@Directive({ selector: '[d]', inputs: make('x') })\nexport class D { x: any; }\n" + }, + "diagnostics": [], + "classes": { + "D": { + "inputs": "{x:[2,\"x\",\"x\",(v)=>v.length]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: initializerApi-inputCoreAlias", + "origin": "probe", + "files": { + "test.ts": "import { Directive, input as inp } from '@angular/core';\n@Directive({ selector: '[d]', inputs: ['value'] })\nexport class D { value = inp(); }\n", + "other.ts": "export function input(...a: any[]): any { return null; }\nexport namespace input { export function required(...a: any[]): any { return null; } }\nexport function model(...a: any[]): any { return null; }\nexport function output(...a: any[]): any { return null; }\nexport function outputFromObservable(...a: any[]): any { return null; }\nexport function viewChild(...a: any[]): any { return null; }\nexport function viewChildren(...a: any[]): any { return null; }\nexport function contentChild(...a: any[]): any { return null; }\nexport function contentChildren(...a: any[]): any { return null; }\n" + }, + "diagnostics": ["Input \"value\" is also declared as non-signal in @Directive."], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[125, 139]] + }, + { + "name": "probe: initializerApi-inputRequiredCoreNamespace", + "origin": "probe", + "files": { + "test.ts": "import { Directive } from '@angular/core';\nimport * as core from '@angular/core';\n@Directive({ selector: '[d]', inputs: ['value'] })\nexport class D { value = core.input.required(); }\n", + "other.ts": "export function input(...a: any[]): any { return null; }\nexport namespace input { export function required(...a: any[]): any { return null; } }\nexport function model(...a: any[]): any { return null; }\nexport function output(...a: any[]): any { return null; }\nexport function outputFromObservable(...a: any[]): any { return null; }\nexport function viewChild(...a: any[]): any { return null; }\nexport function viewChildren(...a: any[]): any { return null; }\nexport function contentChild(...a: any[]): any { return null; }\nexport function contentChildren(...a: any[]): any { return null; }\n" + }, + "diagnostics": ["Input \"value\" is also declared as non-signal in @Directive."], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[150, 180]] + }, + { + "name": "probe: initializerApi-modelCoreOutputsMeta", + "origin": "probe", + "files": { + "test.ts": "import { Directive, model } from '@angular/core';\n@Directive({ selector: '[d]', outputs: ['valueChange'] })\nexport class D { value = model(); }\n", + "other.ts": "export function input(...a: any[]): any { return null; }\nexport namespace input { export function required(...a: any[]): any { return null; } }\nexport function model(...a: any[]): any { return null; }\nexport function output(...a: any[]): any { return null; }\nexport function outputFromObservable(...a: any[]): any { return null; }\nexport function viewChild(...a: any[]): any { return null; }\nexport function viewChildren(...a: any[]): any { return null; }\nexport function contentChild(...a: any[]): any { return null; }\nexport function contentChildren(...a: any[]): any { return null; }\n" + }, + "diagnostics": [], + "classes": { + "D": { + "inputs": "{value:[1,\"value\"]}", + "outputs": "{valueChange:\"valueChange\",value:\"valueChange\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: initializerApi-modelCoreAlias", + "origin": "probe", + "files": { + "test.ts": "import { Directive, model as m } from '@angular/core';\n@Directive({ selector: '[d]', inputs: ['value'] })\nexport class D { value = m(); }\n", + "other.ts": "export function input(...a: any[]): any { return null; }\nexport namespace input { export function required(...a: any[]): any { return null; } }\nexport function model(...a: any[]): any { return null; }\nexport function output(...a: any[]): any { return null; }\nexport function outputFromObservable(...a: any[]): any { return null; }\nexport function viewChild(...a: any[]): any { return null; }\nexport function viewChildren(...a: any[]): any { return null; }\nexport function contentChild(...a: any[]): any { return null; }\nexport function contentChildren(...a: any[]): any { return null; }\n" + }, + "diagnostics": ["Input \"value\" is also declared as non-signal in @Directive."], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[123, 135]] + }, + { + "name": "probe: initializerApi-inputAsCast", + "origin": "probe", + "files": { + "test.ts": "import { Directive, input } from '@angular/core';\n@Directive({ selector: '[d]', inputs: ['value'] })\nexport class D { value = (input() as any); }\n", + "other.ts": "export function input(...a: any[]): any { return null; }\nexport namespace input { export function required(...a: any[]): any { return null; } }\nexport function model(...a: any[]): any { return null; }\nexport function output(...a: any[]): any { return null; }\nexport function outputFromObservable(...a: any[]): any { return null; }\nexport function viewChild(...a: any[]): any { return null; }\nexport function viewChildren(...a: any[]): any { return null; }\nexport function contentChild(...a: any[]): any { return null; }\nexport function contentChildren(...a: any[]): any { return null; }\n" + }, + "diagnostics": ["Input \"value\" is also declared as non-signal in @Directive."], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[118, 143]] + }, + { + "name": "probe: initializerApi-inputTypeOnlyImportCast", + "origin": "probe", + "files": { + "test.ts": "import { Directive } from '@angular/core';\nimport type { input } from '@angular/core';\n@Directive({ selector: '[d]', inputs: ['value'] })\nexport class D { value = (input as any)(); }\n", + "other.ts": "export function input(...a: any[]): any { return null; }\nexport namespace input { export function required(...a: any[]): any { return null; } }\nexport function model(...a: any[]): any { return null; }\nexport function output(...a: any[]): any { return null; }\nexport function outputFromObservable(...a: any[]): any { return null; }\nexport function viewChild(...a: any[]): any { return null; }\nexport function viewChildren(...a: any[]): any { return null; }\nexport function contentChild(...a: any[]): any { return null; }\nexport function contentChildren(...a: any[]): any { return null; }\n" + }, + "diagnostics": [], + "classes": { + "D": { + "inputs": "{value:\"value\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: initializerApi-outputOtherModule", + "origin": "probe", + "files": { + "test.ts": "import { Directive } from '@angular/core';\nimport { output } from './other';\n@Directive({ selector: '[d]', outputs: ['changed'] })\nexport class D { changed = output(); }\n", + "other.ts": "export function input(...a: any[]): any { return null; }\nexport namespace input { export function required(...a: any[]): any { return null; } }\nexport function model(...a: any[]): any { return null; }\nexport function output(...a: any[]): any { return null; }\nexport function outputFromObservable(...a: any[]): any { return null; }\nexport function viewChild(...a: any[]): any { return null; }\nexport function viewChildren(...a: any[]): any { return null; }\nexport function contentChild(...a: any[]): any { return null; }\nexport function contentChildren(...a: any[]): any { return null; }\n" + }, + "diagnostics": [], + "classes": { + "D": { + "outputs": "{changed:\"changed\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: initializerApi-outputFromObservable", + "origin": "probe", + "files": { + "test.ts": "import { Directive } from '@angular/core';\nimport { outputFromObservable } from '@angular/core/rxjs-interop';\nimport { Subject } from 'rxjs';\n@Directive({ selector: '[d]', outputs: ['changed'] })\nexport class D { changed = outputFromObservable(new Subject()); }\n", + "other.ts": "export function input(...a: any[]): any { return null; }\nexport namespace input { export function required(...a: any[]): any { return null; } }\nexport function model(...a: any[]): any { return null; }\nexport function output(...a: any[]): any { return null; }\nexport function outputFromObservable(...a: any[]): any { return null; }\nexport function viewChild(...a: any[]): any { return null; }\nexport function viewChildren(...a: any[]): any { return null; }\nexport function contentChild(...a: any[]): any { return null; }\nexport function contentChildren(...a: any[]): any { return null; }\n" + }, + "diagnostics": ["Output \"changed\" is unexpectedly declared in @Directive as well."], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[213, 265]] + }, + { + "name": "probe: initializerApi-outputFromObservableOtherModule", + "origin": "probe", + "files": { + "test.ts": "import { Directive } from '@angular/core';\nimport { outputFromObservable } from './other';\n@Directive({ selector: '[d]', outputs: ['changed'] })\nexport class D { changed = outputFromObservable(null); }\n", + "other.ts": "export function input(...a: any[]): any { return null; }\nexport namespace input { export function required(...a: any[]): any { return null; } }\nexport function model(...a: any[]): any { return null; }\nexport function output(...a: any[]): any { return null; }\nexport function outputFromObservable(...a: any[]): any { return null; }\nexport function viewChild(...a: any[]): any { return null; }\nexport function viewChildren(...a: any[]): any { return null; }\nexport function contentChild(...a: any[]): any { return null; }\nexport function contentChildren(...a: any[]): any { return null; }\n" + }, + "diagnostics": [], + "classes": { + "D": { + "outputs": "{changed:\"changed\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: initializerApi-outputFromObservableNamespace", + "origin": "probe", + "files": { + "test.ts": "import { Directive } from '@angular/core';\nimport * as rx from '@angular/core/rxjs-interop';\nimport { Subject } from 'rxjs';\n@Directive({ selector: '[d]', outputs: ['changed'] })\nexport class D { changed = rx.outputFromObservable(new Subject()); }\n", + "other.ts": "export function input(...a: any[]): any { return null; }\nexport namespace input { export function required(...a: any[]): any { return null; } }\nexport function model(...a: any[]): any { return null; }\nexport function output(...a: any[]): any { return null; }\nexport function outputFromObservable(...a: any[]): any { return null; }\nexport function viewChild(...a: any[]): any { return null; }\nexport function viewChildren(...a: any[]): any { return null; }\nexport function contentChild(...a: any[]): any { return null; }\nexport function contentChildren(...a: any[]): any { return null; }\n" + }, + "diagnostics": ["Output \"changed\" is unexpectedly declared in @Directive as well."], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[196, 251]] + }, + { + "name": "probe: initializerApi-outputFromObservableOnCoreNamespace", + "origin": "probe", + "files": { + "test.ts": "import { Directive } from '@angular/core';\nimport * as core from '@angular/core';\n@Directive({ selector: '[d]', outputs: ['changed'] })\nexport class D { changed = (core as any).outputFromObservable(null); }\n", + "other.ts": "export function input(...a: any[]): any { return null; }\nexport namespace input { export function required(...a: any[]): any { return null; } }\nexport function model(...a: any[]): any { return null; }\nexport function output(...a: any[]): any { return null; }\nexport function outputFromObservable(...a: any[]): any { return null; }\nexport function viewChild(...a: any[]): any { return null; }\nexport function viewChildren(...a: any[]): any { return null; }\nexport function contentChild(...a: any[]): any { return null; }\nexport function contentChildren(...a: any[]): any { return null; }\n" + }, + "diagnostics": [], + "classes": { + "D": { + "outputs": "{changed:\"changed\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: initializerApi-outputCoreAlias", + "origin": "probe", + "files": { + "test.ts": "import { Directive, output as out } from '@angular/core';\n@Directive({ selector: '[d]', outputs: ['changed'] })\nexport class D { changed = out(); }\n", + "other.ts": "export function input(...a: any[]): any { return null; }\nexport namespace input { export function required(...a: any[]): any { return null; } }\nexport function model(...a: any[]): any { return null; }\nexport function output(...a: any[]): any { return null; }\nexport function outputFromObservable(...a: any[]): any { return null; }\nexport function viewChild(...a: any[]): any { return null; }\nexport function viewChildren(...a: any[]): any { return null; }\nexport function contentChild(...a: any[]): any { return null; }\nexport function contentChildren(...a: any[]): any { return null; }\n" + }, + "diagnostics": ["Output \"changed\" is unexpectedly declared in @Directive as well."], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[129, 145]] + }, + { + "name": "probe: initializerApi-outputCoreNamespace", + "origin": "probe", + "files": { + "test.ts": "import { Directive } from '@angular/core';\nimport * as core from '@angular/core';\n@Directive({ selector: '[d]', outputs: ['changed'] })\nexport class D { changed = core.output(); }\n", + "other.ts": "export function input(...a: any[]): any { return null; }\nexport namespace input { export function required(...a: any[]): any { return null; } }\nexport function model(...a: any[]): any { return null; }\nexport function output(...a: any[]): any { return null; }\nexport function outputFromObservable(...a: any[]): any { return null; }\nexport function viewChild(...a: any[]): any { return null; }\nexport function viewChildren(...a: any[]): any { return null; }\nexport function contentChild(...a: any[]): any { return null; }\nexport function contentChildren(...a: any[]): any { return null; }\n" + }, + "diagnostics": ["Output \"changed\" is unexpectedly declared in @Directive as well."], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[153, 177]] + }, + { + "name": "probe: initializerApi-outputLocalFunction", + "origin": "probe", + "files": { + "test.ts": "import { Directive } from '@angular/core';\nconst output = (): any => null;\n@Directive({ selector: '[d]', outputs: ['changed'] })\nexport class D { changed = output(); }\n", + "other.ts": "export function input(...a: any[]): any { return null; }\nexport namespace input { export function required(...a: any[]): any { return null; } }\nexport function model(...a: any[]): any { return null; }\nexport function output(...a: any[]): any { return null; }\nexport function outputFromObservable(...a: any[]): any { return null; }\nexport function viewChild(...a: any[]): any { return null; }\nexport function viewChildren(...a: any[]): any { return null; }\nexport function contentChild(...a: any[]): any { return null; }\nexport function contentChildren(...a: any[]): any { return null; }\n" + }, + "diagnostics": [], + "classes": { + "D": { + "outputs": "{changed:\"changed\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: scope-shadowedByParam", + "origin": "probe", + "files": { + "test.ts": "import {Directive} from '@angular/core';\nfunction make(value: string) { return [{name: 'x', transform: (value: string) => value.trim()}]; }\n@Directive({selector: '[d]', inputs: make('v')})\nexport class D { x: any; }\n" + }, + "diagnostics": [], + "classes": { + "D": { + "inputs": "{x:[2,\"x\",\"x\",(value)=>value.trim()]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: scope-shadowedByConst", + "origin": "probe", + "files": { + "test.ts": "import {Directive} from '@angular/core';\nfunction make(value: string) { return [{name: 'x', transform: (v: string) => { const value = v.trim(); return value; }}]; }\n@Directive({selector: '[d]', inputs: make('v')})\nexport class D { x: any; }\n" + }, + "diagnostics": [], + "classes": { + "D": { + "inputs": "{x:[2,\"x\",\"x\",(v)=>{constvalue=v.trim();returnvalue;}]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: scope-shadowedByFunction", + "origin": "probe", + "files": { + "test.ts": "import {Directive} from '@angular/core';\nfunction make(value: string) { return [{name: 'x', transform: (v: string) => { function value(s: string) { return s; } return value(v); }}]; }\n@Directive({selector: '[d]', inputs: make('v')})\nexport class D { x: any; }\n" + }, + "diagnostics": [], + "classes": { + "D": { + "inputs": "{x:[2,\"x\",\"x\",(v)=>{functionvalue(s){returns;}returnvalue(v);}]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: scope-shadowedByLoopAndCatch", + "origin": "probe", + "files": { + "test.ts": "import {Directive} from '@angular/core';\nfunction make(value: string) { return [{name: 'x', transform: (v: string) => { let r = v; for (const value of [v]) { r += value; } try { r += v; } catch (value) { r += value; } return r; }}]; }\n@Directive({selector: '[d]', inputs: make('v')})\nexport class D { x: any; }\n" + }, + "diagnostics": [], + "classes": { + "D": { + "inputs": "{x:[2,\"x\",\"x\",(v)=>{letr=v;for(constvalueof[v]){r+=value;}try{r+=v;}catch(value){r+=value;}returnr;}]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: scope-shadowedInNestedArrow", + "origin": "probe", + "files": { + "test.ts": "import {Directive} from '@angular/core';\nfunction make(value: string) { return [{name: 'x', transform: (v: string) => { var q = () => { var value = 2; return value; }; return q() + v; }}]; }\n@Directive({selector: '[d]', inputs: make('v')})\nexport class D { x: any; }\n" + }, + "diagnostics": [], + "classes": { + "D": { + "inputs": "{x:[2,\"x\",\"x\",(v)=>{varq=()=>{varvalue=2;returnvalue;};returnq()+v;}]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: scope-shadowedByClass", + "origin": "probe", + "files": { + "test.ts": "import {Directive} from '@angular/core';\nfunction make(value: string) { return [{name: 'x', transform: (v: string) => { class value {}; return new value() + v; }}]; }\n@Directive({selector: '[d]', inputs: make('v')})\nexport class D { x: any; }\n" + }, + "diagnostics": [], + "classes": { + "D": { + "inputs": "{x:[2,\"x\",\"x\",(v)=>{classvalue{};returnnewvalue()+v;}]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: scope-ownArguments", + "origin": "probe", + "files": { + "test.ts": "import {Directive} from '@angular/core';\nfunction make(value: string) { return [{name: 'x', transform: function (v: string) { return arguments.length ? v : v + v; }}]; }\n@Directive({selector: '[d]', inputs: make('v')})\nexport class D { x: any; }\n" + }, + "diagnostics": [], + "classes": { + "D": { + "inputs": "{x:[2,\"x\",\"x\",function(v){returnarguments.length?v:v+v;}]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: scope-ownThis", + "origin": "probe", + "files": { + "test.ts": "import {Directive} from '@angular/core';\nfunction make(value: string) { return [{name: 'x', transform: function (v: string) { return this ? v : (() => arguments[0])(); }}]; }\n@Directive({selector: '[d]', inputs: make('v')})\nexport class D { x: any; }\n" + }, + "diagnostics": [], + "classes": { + "D": { + "inputs": "{x:[2,\"x\",\"x\",function(v){returnthis?v:(()=>arguments[0])();}]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: scope-hoistedVar", + "origin": "probe", + "files": { + "test.ts": "import {Directive} from '@angular/core';\nfunction make(value: string) { return [{name: 'x', transform: (v: string) => { if (v) { var value = v; } return value; }}]; }\n@Directive({selector: '[d]', inputs: make('v')})\nexport class D { x: any; }\n" + }, + "diagnostics": [], + "classes": { + "D": { + "inputs": "{x:[2,\"x\",\"x\",(v)=>{if(v){varvalue=v;}returnvalue;}]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: scope-shadowedByClassName", + "origin": "probe", + "files": { + "test.ts": "import {Directive} from '@angular/core';\nfunction make(value: string) { return [{name: 'x', transform: (v: string) => new (class value { m() { return value; } })().m() && v}]; }\n@Directive({selector: '[d]', inputs: make('v')})\nexport class D { x: any; }\n" + }, + "diagnostics": [], + "classes": { + "D": { + "inputs": "{x:[2,\"x\",\"x\",(v)=>new(classvalue{m(){returnvalue;}})().m()&&v]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: scope-shadowedByDestructuredParam", + "origin": "probe", + "files": { + "test.ts": "import {Directive} from '@angular/core';\nfunction make(value: string) { return [{name: 'x', transform: ({value}: {value: string}) => value}]; }\n@Directive({selector: '[d]', inputs: make('v')})\nexport class D { x: any; }\n" + }, + "diagnostics": [], + "classes": { + "D": { + "inputs": "{x:[2,\"x\",\"x\",({value})=>value]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: scope-spreadConstArgs", + "origin": "probe", + "files": { + "test.ts": "import {Directive, booleanAttribute} from '@angular/core';\nexport function toBool(v: string) { return !!v; }\nfunction make(name: string, t: any) { return [{name, transform: t}]; }\nconst args = ['x', booleanAttribute] as const;\n@Directive({selector: '[d]', inputs: make(...args)})\nexport class D { x: any; }\n" + }, + "diagnostics": [], + "classes": { + "D": { + "inputs": "{x:[2,\"x\",\"x\",booleanAttribute]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;", + "dts:ngAcceptInputType_x": "staticngAcceptInputType_x:unknown;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: scope-restParam", + "origin": "probe", + "files": { + "test.ts": "import {Directive, booleanAttribute} from '@angular/core';\nexport function toBool(v: string) { return !!v; }\nfunction make(...a: any[]) { return [{name: a[0], transform: a[1]}]; }\n@Directive({selector: '[d]', inputs: make('x', booleanAttribute)})\nexport class D { x: any; }\n" + }, + "diagnostics": [], + "classes": { + "D": { + "inputs": "{x:[2,\"x\",\"x\",booleanAttribute]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;", + "dts:ngAcceptInputType_x": "staticngAcceptInputType_x:unknown;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: scope-restAfterParam", + "origin": "probe", + "files": { + "test.ts": "import {Directive, booleanAttribute} from '@angular/core';\nexport function toBool(v: string) { return !!v; }\nfunction make(name: string, ...ts: any[]) { return [{name, transform: ts[0]}]; }\n@Directive({selector: '[d]', inputs: make('x', booleanAttribute)})\nexport class D { x: any; }\n" + }, + "diagnostics": [], + "classes": { + "D": { + "inputs": "{x:[2,\"x\",\"x\",booleanAttribute]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;", + "dts:ngAcceptInputType_x": "staticngAcceptInputType_x:unknown;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: scope-spreadArrayLiteral", + "origin": "probe", + "files": { + "test.ts": "import {Directive, booleanAttribute} from '@angular/core';\nexport function toBool(v: string) { return !!v; }\nfunction make(name: string, t: any) { return [{name, transform: t}]; }\n@Directive({selector: '[d]', inputs: make(...['x', toBool])})\nexport class D { x: any; }\n" + }, + "diagnostics": [], + "classes": { + "D": { + "inputs": "{x:[2,\"x\",\"x\",toBool]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: scope-spreadAfterArg", + "origin": "probe", + "files": { + "test.ts": "import {Directive, booleanAttribute} from '@angular/core';\nexport function toBool(v: string) { return !!v; }\nfunction make(name: string, t: any) { return [{name, transform: t}]; }\n@Directive({selector: '[d]', inputs: make('x', ...[toBool])})\nexport class D { x: any; }\n" + }, + "diagnostics": [], + "classes": { + "D": { + "inputs": "{x:[2,\"x\",\"x\",toBool]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: scope-spreadRestThrough", + "origin": "probe", + "files": { + "test.ts": "import {Directive, booleanAttribute} from '@angular/core';\nexport function toBool(v: string) { return !!v; }\nfunction make(name: string, t: any) { return [{name, transform: t}]; }\nfunction outer(...a: any[]) { return make(...a); }\n@Directive({selector: '[d]', inputs: outer('x', toBool)})\nexport class D { x: any; }\n" + }, + "diagnostics": [], + "classes": { + "D": { + "inputs": "{x:[2,\"x\",\"x\",toBool]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: scope-restLocalFunction", + "origin": "probe", + "files": { + "test.ts": "import {Directive, booleanAttribute} from '@angular/core';\nexport function toBool(v: string) { return !!v; }\nfunction make(name: string, ...ts: any[]) { return [{name, transform: ts[0]}]; }\n@Directive({selector: '[d]', inputs: make('x', toBool)})\nexport class D { x: any; }\n" + }, + "diagnostics": [], + "classes": { + "D": { + "inputs": "{x:[2,\"x\",\"x\",toBool]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: scope-spreadBeforeArgs", + "origin": "probe", + "files": { + "test.ts": "import {Directive, booleanAttribute} from '@angular/core';\nexport function toBool(v: string) { return !!v; }\nfunction make(name: string, t: any, u: any) { return [{name, transform: u}]; }\nconst pre = ['x'];\n@Directive({selector: '[d]', inputs: make(...pre, toBool, booleanAttribute)})\nexport class D { x: any; }\n" + }, + "diagnostics": [], + "classes": { + "D": { + "inputs": "{x:[2,\"x\",\"x\",booleanAttribute]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;", + "dts:ngAcceptInputType_x": "staticngAcceptInputType_x:unknown;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: scope-restSpreadImport", + "origin": "probe", + "files": { + "test.ts": "import {Directive, booleanAttribute} from '@angular/core';\nfunction make(name: string, t: any) { return [{name, transform: t}]; }\nfunction outer(name: string, ...a: any[]) { return make(name, ...a); }\n@Directive({selector: '[d]', inputs: outer('x', booleanAttribute)})\nexport class D { x: any; }\n" + }, + "diagnostics": [], + "classes": { + "D": { + "inputs": "{x:[2,\"x\",\"x\",booleanAttribute]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;", + "dts:ngAcceptInputType_x": "staticngAcceptInputType_x:unknown;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: transform-typeofEnumKeyof", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nenum Size { S, M }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: (v: keyof typeof Size) => Size[v]}) x!: Size;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{x:[2,\"x\",\"x\",(v)=>Size[v]]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: transform-typeofClass", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nclass Local {}\nexport function toNum(v: typeof Local) { return 1; }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: toNum}) x!: number;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{x:[2,\"x\",\"x\",toNum]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: transform-instanceTypeTypeof", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nclass Local {}\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: (v: InstanceType) => 1}) x!: number;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{x:[2,\"x\",\"x\",(v)=>1]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: transform-returnTypeTypeofMember", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nclass Local { static create(v: string) { return new Local(); } }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: (v: ReturnType) => 1}) x!: number;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{x:[2,\"x\",\"x\",(v)=>1]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: transform-qualifiedClassNamespace", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nclass C {}\nnamespace C { export type T = string; }\nexport function toNum(v: C.T) { return 1; }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: toNum}) x!: number;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{x:[2,\"x\",\"x\",toNum]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: transform-qualifiedInterfaceNamespace", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\ninterface Foo { a: string }\nnamespace Foo { export type T = string; }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: (v: Foo.T) => 1}) x!: number;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{x:[2,\"x\",\"x\",(v)=>1]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: transform-typeofEnum", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nenum E { A }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: (v: typeof E) => 1}) x!: number;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{x:[2,\"x\",\"x\",(v)=>1]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: transform-enumUnexported", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nenum E { A }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: (v: E) => 1}) x!: number;\n}\n" + }, + "diagnostics": [ + "Symbol must be exported in order to be used as the type of an Input transform function" + ], + "diagnosticSpans": [[153, 154]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: transform-indexedAccessUnexported", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\ninterface Foo { a: string }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: (v: Foo['a']) => 1}) x!: number;\n}\n" + }, + "diagnostics": [ + "Symbol must be exported in order to be used as the type of an Input transform function" + ], + "diagnosticSpans": [[168, 176]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: transform-typeArgUnexported", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\ninterface Foo {}\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: (v: Map) => 1}) x!: number;\n}\n" + }, + "diagnostics": [ + "Symbol must be exported in order to be used as the type of an Input transform function" + ], + "diagnosticSpans": [[157, 173]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: transform-typeLiteralMethodUnexported", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\ninterface Foo {}\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: (v: {m(x: Foo): void}) => 1}) x!: number;\n}\n" + }, + "diagnostics": [ + "Symbol must be exported in order to be used as the type of an Input transform function" + ], + "diagnosticSpans": [[157, 174]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: transform-overloadImplTypeUnexported", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\ninterface Foo { a: string }\nexport function toNum(v: string): number;\nexport function toNum(v: string | Foo): number { return 1; }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: toNum}) x!: number;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{x:[2,\"x\",\"x\",toNum]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: transform-overloadFirstTypeUnexported", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\ninterface Foo {}\nexport function toNum(v: Foo): number;\nexport function toNum(v: any) { return 1; }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: toNum}) x!: number;\n}\n" + }, + "diagnostics": [ + "Symbol must be exported in order to be used as the type of an Input transform function" + ], + "diagnosticSpans": [[108, 111]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: transform-overloadFirstUntyped", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nexport function toNum(v): number;\nexport function toNum(v: string) { return 1; }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: toNum}) x!: number;\n}\n" + }, + "diagnostics": [ + "Input transform function first parameter must have a type Value is a reference to 'toNum'." + ], + "diagnosticSpans": [[66, 99]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: transform-overloadFirstNoParams", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nexport function toNum(): number;\nexport function toNum(v?: string) { return 1; }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: toNum}) x!: number;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{x:[2,\"x\",\"x\",toNum]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;", + "dts:ngAcceptInputType_x": "staticngAcceptInputType_x:unknown;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: transform-overloadFirstSpread", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nexport function toNum(...v: string[]): number;\nexport function toNum(v: any) { return 1; }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: toNum}) x!: number;\n}\n" + }, + "diagnostics": [ + "Input transform function first parameter cannot be a spread parameter Value is a reference to 'toNum'." + ], + "diagnosticSpans": [[66, 112]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: transform-overloadStaticFirstTypeUnexported", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\ninterface Foo {}\nclass U { static c(v: Foo): number; static c(v: any) { return 1; } }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: U.c}) x!: number;\n}\n" + }, + "diagnostics": [ + "Symbol must be exported in order to be used as the type of an Input transform function" + ], + "diagnosticSpans": [[105, 108]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: transform-constTernary", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nconst isProd = false;\nexport function a(v: string) { return 1; }\nexport function b(v: string) { return 2; }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: isProd ? a : b}) x!: number;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{x:[2,\"x\",\"x\",b]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: transform-literalTernary", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nexport function toNum(v: string) { return 1; }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: true ? toNum : toNum}) x!: number;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{x:[2,\"x\",\"x\",toNum]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: transform-optionalChain", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nfunction toNum(v: string) { return 1; }\nconst T = { f: toNum };\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: T?.f}) x!: number;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{x:[2,\"x\",\"x\",toNum]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: transform-optionalChainExported", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nexport function toNum(v: string) { return 1; }\nconst T = { f: toNum };\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: T?.f}) x!: number;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{x:[2,\"x\",\"x\",toNum]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: transform-ternaryMeta", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nconst isProd = false;\nexport function a(v: string) { return 1; }\nexport function b(v: string) { return 2; }\n@Directive({selector: '[d]', inputs: [{name: 'x', transform: isProd ? a : b}]})\nexport class Dir {\n x!: number;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{x:[2,\"x\",\"x\",b]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: transform-clashImported", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: booleanAttribute}) x!: boolean;\n static ngAcceptInputType_x: boolean | string;\n}\n" + }, + "diagnostics": [ + "Class cannot have both a transform function on Input x and a static member called ngAcceptInputType_x" + ], + "classes": {}, + "dtsImports": [], + "skip": "ngtsc reports this at the transform's declaration in @angular/core's .d.ts, a file oxc doesn't read (so this snapshot's generator, which keeps test.ts diagnostics, records none); oxc reports the same message on the expression" + }, + { + "name": "probe: transform-clashImportedMeta", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]', inputs: [{name: 'x', transform: booleanAttribute}]})\nexport class Dir {\n x!: boolean;\n static ngAcceptInputType_x: boolean | string;\n}\n" + }, + "diagnostics": [ + "Class cannot have both a transform function on Input x and a static member called ngAcceptInputType_x" + ], + "classes": {}, + "dtsImports": [], + "skip": "ngtsc reports this at the transform's declaration in @angular/core's .d.ts, a file oxc doesn't read (so this snapshot's generator, which keeps test.ts diagnostics, records none); oxc reports the same message on the expression" + }, + { + "name": "probe: transform-clashGlobal", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: parseInt}) x!: number;\n static ngAcceptInputType_x: string;\n}\n" + }, + "diagnostics": [ + "Class cannot have both a transform function on Input x and a static member called ngAcceptInputType_x" + ], + "classes": {}, + "dtsImports": [], + "skip": "ngtsc reports this at the transform's declaration in TypeScript's lib.es5.d.ts, a file oxc doesn't read (so this snapshot's generator, which keeps test.ts diagnostics, records none); oxc reports the same message on the expression" + }, + { + "name": "probe: transform-letUninitTyped", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nlet f: (v: string) => number;\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: f}) x!: number;\n}\n" + }, + "diagnostics": ["Input transform must be a function Value is of type 'undefined'."], + "diagnosticSpans": [[154, 168]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: transform-letUninit", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nlet f;\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: f}) x!: number;\n}\n" + }, + "diagnostics": ["Input transform must be a function Value is of type 'undefined'."], + "diagnosticSpans": [[131, 145]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: transform-enumAsTransform", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nenum E { A }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: E}) x!: number;\n}\n" + }, + "diagnostics": ["Input transform must be a function Value is of type '{ A: E }'."], + "diagnosticSpans": [[137, 151]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: transform-staticGetter", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nclass U { static get c() { return (v: string) => 1; } }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: U.c}) x!: number;\n}\n" + }, + "diagnostics": ["Input transform must be a function Value is a reference to 'c'."], + "diagnosticSpans": [[76, 119]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: transform-interfaceExportedLater", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\ninterface Foo { a: string }\nexport function toNum(v: Foo) { return 1; }\nexport { Foo };\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: toNum}) x!: number;\n}\n" + }, + "diagnostics": [ + "Symbol must be exported in order to be used as the type of an Input transform function" + ], + "diagnosticSpans": [[119, 122]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: transform-typeExportedLater", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\ntype Foo = { a: string };\nexport function toNum(v: Foo) { return 1; }\nexport type { Foo };\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: toNum}) x!: number;\n}\n" + }, + "diagnostics": [ + "Symbol must be exported in order to be used as the type of an Input transform function" + ], + "diagnosticSpans": [[117, 120]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: transform-interfaceExportedAs", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\ninterface Foo { a: string }\nexport function toNum(v: Foo) { return 1; }\nexport { Foo as Bar };\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: toNum}) x!: number;\n}\n" + }, + "diagnostics": [ + "Symbol must be exported in order to be used as the type of an Input transform function" + ], + "diagnosticSpans": [[119, 122]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: transform-interfaceExportDefault", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\ninterface Foo {}\nexport function toNum(v: Foo) { return 1; }\nexport default Foo;\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: toNum}) x!: number;\n}\n" + }, + "diagnostics": [ + "Symbol must be exported in order to be used as the type of an Input transform function" + ], + "diagnosticSpans": [[108, 111]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: transform-classExportedLater", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nclass Foo {}\nexport function toNum(v: Foo) { return 1; }\nexport { Foo };\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: toNum}) x!: number;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{x:[2,\"x\",\"x\",toNum]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: transform-classExportedAs", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nclass C {}\nexport { C as D };\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: (v: C) => 1}) x!: number;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{x:[2,\"x\",\"x\",(v)=>1]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: transform-enumExportedLater", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nenum E { A }\nexport { E };\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: (v: E) => 1}) x!: number;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{x:[2,\"x\",\"x\",(v)=>1]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: transform-classExportDefault", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nexport default class Foo {}\nexport function toNum(v: Foo) { return 1; }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: toNum}) x!: number;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{x:[2,\"x\",\"x\",toNum]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: transform-classExportDefaultLater", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nclass Foo {}\nexport function toNum(v: Foo) { return 1; }\nexport default Foo;\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: toNum}) x!: number;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{x:[2,\"x\",\"x\",toNum]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: transform-classTypeParam", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: (v: Tp) => 1}) x!: number;\n}\n" + }, + "diagnostics": [ + "Symbol must be exported in order to be used as the type of an Input transform function" + ], + "diagnosticSpans": [[144, 146]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: transform-classTypeParamShadowsExported", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nexport interface Foo {}\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: (v: Foo) => 1}) x!: number;\n}\n" + }, + "diagnostics": [ + "Symbol must be exported in order to be used as the type of an Input transform function" + ], + "diagnosticSpans": [[169, 172]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: transform-mappedTypeParam", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: (v: {[K in 'a' | 'b']: K}) => 1}) x!: number;\n}\n" + }, + "diagnostics": [ + "Symbol must be exported in order to be used as the type of an Input transform function" + ], + "diagnosticSpans": [[140, 161]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: transform-inferTypeParam", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: (v: string extends infer U ? U : never) => 1}) x!: number;\n}\n" + }, + "diagnostics": [ + "Symbol must be exported in order to be used as the type of an Input transform function" + ], + "diagnosticSpans": [[140, 174]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: transform-fnTypeParam", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: (v: (x: T) => T) => 1}) x!: number;\n}\n" + }, + "diagnostics": [ + "Symbol must be exported in order to be used as the type of an Input transform function" + ], + "diagnosticSpans": [[140, 154]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: transform-fnTypeParamShadowsExported", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nexport interface Foo {}\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: (v: (x: Foo) => void) => 1}) x!: number;\n}\n" + }, + "diagnostics": [ + "Symbol must be exported in order to be used as the type of an Input transform function" + ], + "diagnosticSpans": [[164, 185]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: transform-methodSigTypeParam", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: (v: {m(x: T): void}) => 1}) x!: number;\n}\n" + }, + "diagnostics": [ + "Symbol must be exported in order to be used as the type of an Input transform function" + ], + "diagnosticSpans": [[140, 158]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: transform-conditionalFalseBranchOuter", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nexport interface Foo {}\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: (v: string extends infer U ? U : Foo) => 1}) x!: number;\n}\n" + }, + "diagnostics": [ + "Symbol must be exported in order to be used as the type of an Input transform function" + ], + "diagnosticSpans": [[164, 196]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: transform-declareGlobal", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\ndeclare global { interface Gl { a: string } }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: (v: Gl) => 1}) x!: number;\n}\n" + }, + "diagnostics": [ + "Symbol must be exported in order to be used as the type of an Input transform function" + ], + "classes": {}, + "dtsImports": [], + "skip": "a type declared in `declare global` is a new global unless it augments one of TypeScript's lib types, which ngtsc resolves to the lib file; oxc doesn't read the lib files, so it can't tell the two apart and accepts both" + }, + { + "name": "probe: transform-globalNumber", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: Number}) x!: number;\n}\n" + }, + "diagnostics": ["Input transform must be a function Value is a reference to 'Number'."], + "classes": {}, + "dtsImports": [], + "skip": "ngtsc reports this at the transform's declaration in TypeScript's lib.es5.d.ts, a file oxc doesn't read (so this snapshot's generator, which keeps test.ts diagnostics, records none); oxc reports the same message on the expression" + }, + { + "name": "probe: transform-globalParseInt", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: parseInt}) x!: number;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{x:[2,\"x\",\"x\",parseInt]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: transform-satisfiesFn", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nexport function toNum(v: string) { return 1; }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: toNum satisfies Function}) x!: number;\n}\n" + }, + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "diagnosticSpans": [[183, 207]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: transform-namespaceFn", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nnamespace NS { export function f(v: string) { return 1; } }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: NS.f}) x!: number;\n}\n" + }, + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "diagnosticSpans": [[196, 200]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: transform-nsClash", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input} from '@angular/core';\nimport * as u from './util';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: u.toNum}) x!: number;\n static ngAcceptInputType_x: string;\n}\n", + "util.ts": "export function toNum(v: string) { return 1; }\n" + }, + "diagnostics": [ + "Class cannot have both a transform function on Input x and a static member called ngAcceptInputType_x" + ], + "classes": {}, + "dtsImports": [], + "skip": "ngtsc reports this at the transform's declaration in util.ts, a file oxc doesn't read (so this snapshot's generator, which keeps test.ts diagnostics, records none); oxc reports the same message on the expression" + }, + { + "name": "probe: transform-nsGeneric", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input} from '@angular/core';\nimport * as u from './util';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: u.g}) x!: number;\n}\n", + "util.ts": "export function g(v: T) { return 1; }\n" + }, + "diagnostics": ["Input transform function cannot be generic Value is a reference to 'g'."], + "classes": {}, + "dtsImports": [], + "skip": "needs declarations from another file; oxc compiles one file at a time (imported consts, types and transforms are opaque)" + }, + { + "name": "probe: transform-coreNamespaceMembers", + "origin": "probe", + "files": { + "test.ts": "import * as core from '@angular/core';\n@core.Component({selector: 'c', template: '
'})\nexport class Cmp {\n @core.Input({transform: (v: string) => 1}) value!: number;\n @core.ViewChild('ref') ref: any;\n @core.Output() changed = new core.EventEmitter();\n @core.HostBinding('class.a') a = true;\n @core.HostListener('click') onClick() {}\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Cmp": { + "inputs": "{value:[2,\"value\",\"value\",(v)=>1]}", + "outputs": "{changed:\"changed\"}", + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery([\"ref\"],5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.ref=_t.first);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: transform-foreignNamespaceMembers", + "origin": "probe", + "files": { + "test.ts": "import {Component, Input} from '@angular/core';\nimport * as foreign from 'foreign-decorators';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @Input() real!: string;\n @foreign.Input({transform: 5}) value!: string;\n @foreign.ViewChild('ref') ref: any;\n @foreign.Output() changed: any;\n @foreign.HostBinding('class.a') a = true;\n @foreign.HostListener('click') onClick() {}\n}\n", + "node_modules/foreign-decorators/index.d.ts": "export declare function Input(o?: any): PropertyDecorator;\nexport declare function Output(): PropertyDecorator;\nexport declare function ViewChild(s: string): PropertyDecorator;\nexport declare function HostBinding(s: string): PropertyDecorator;\nexport declare function HostListener(s: string): MethodDecorator;\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Cmp": { + "inputs": "{real:\"real\"}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: transform-localObjectNamespaceMember", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nconst other = { Input: (o?: any) => (t: any, k: string) => {} };\n@Directive({selector: '[d]'})\nexport class Dir {\n @other.Input({transform: 5}) x!: number;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: transform-staticPropNoInit", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nclass U { static c: (v: string) => number; }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: U.c}) x!: number;\n}\n" + }, + "diagnostics": ["Input transform must be a function Value is a reference to 'c'."], + "diagnosticSpans": [[76, 108]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: transform-staticSetter", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nclass U { static set c(v: any) {} }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: U.c}) x!: number;\n}\n" + }, + "diagnostics": ["Input transform must be a function Value is a reference to 'c'."], + "diagnosticSpans": [[76, 99]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: transform-globalMathRound", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: Math.round}) x!: number;\n}\n" + }, + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "diagnosticSpans": [[136, 146]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: transform-globalJsonParse", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: JSON.parse}) x!: number;\n}\n" + }, + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "diagnosticSpans": [[136, 146]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: transform-globalString", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: String}) x!: number;\n}\n" + }, + "diagnostics": ["Input transform must be a function Value is a reference to 'String'."], + "classes": {}, + "dtsImports": [], + "skip": "ngtsc reports this at the transform's declaration in TypeScript's lib.es5.d.ts, a file oxc doesn't read (so this snapshot's generator, which keeps test.ts diagnostics, records none); oxc reports the same message on the expression" + }, + { + "name": "probe: transform-globalIsNaN", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: isNaN}) x!: number;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{x:[2,\"x\",\"x\",isNaN]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: transform-globalEscape", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: escape}) x!: number;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{x:[2,\"x\",\"x\",escape]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: transform-globalEval", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: eval}) x!: number;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{x:[2,\"x\",\"x\",eval]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: transform-globalDecodeURI", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: decodeURI}) x!: number;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{x:[2,\"x\",\"x\",decodeURI]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: transform-globalNumberClash", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: Number}) x!: number;\n static ngAcceptInputType_x: string;\n}\n" + }, + "diagnostics": ["Input transform must be a function Value is a reference to 'Number'."], + "classes": {}, + "dtsImports": [], + "skip": "ngtsc reports this at the transform's declaration in TypeScript's lib.es5.d.ts, a file oxc doesn't read (so this snapshot's generator, which keeps test.ts diagnostics, records none); oxc reports the same message on the expression" + }, + { + "name": "probe: transform-globalParseIntStatic", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: parseInt}) x!: number;\n static ngAcceptInputType_y: string;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{x:[2,\"x\",\"x\",parseInt]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: transform-instanceClash", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: (v: string) => 1}) x!: number;\n ngAcceptInputType_x: string;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{x:[2,\"x\",\"x\",(v)=>1]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: eval-inputsMathPI", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]', inputs: [Math.PI]})\nexport class Dir {}\n" + }, + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." + ], + "diagnosticSpans": [[103, 112]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: eval-inputsMath", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]', inputs: [Math]})\nexport class Dir {}\n" + }, + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value is a reference to 'Math'." + ], + "diagnosticSpans": [[103, 109]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: eval-inputsNumberMax", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]', inputs: [{name: Number.MAX_VALUE}]})\nexport class Dir {}\n" + }, + "diagnostics": [ + "Value at position 0 of @Directive.inputs array must have a \"name\" property Value could not be determined statically." + ], + "diagnosticSpans": [[103, 129]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: eval-inputsObjKeys", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]', inputs: [Object.keys]})\nexport class Dir {}\n" + }, + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." + ], + "diagnosticSpans": [[103, 116]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: transform-constMathRound", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nconst r = Math.round;\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: r}) x!: number;\n}\n" + }, + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "diagnosticSpans": [[158, 159]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: scope-shadow", + "origin": "probe", + "files": { + "test.ts": "import { Directive } from '@angular/core';\nexport function toBool(v: unknown): boolean { return !!v; }\nfunction make(name: string, toBool: any) { return [{ name, transform: toBool }]; }\n@Directive({ selector: '[d]', inputs: make('x', (v: string) => v.length) })\nexport class D { x: any; }\n" + }, + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], "classes": {}, "dtsImports": [], - "diagnosticSpans": [[196, 251]] + "diagnosticSpans": [[173, 179]] }, { - "name": "probe: initializerApi-outputFromObservableOnCoreNamespace", + "name": "probe: scope-paramMember", "origin": "probe", "files": { - "test.ts": "import { Directive } from '@angular/core';\nimport * as core from '@angular/core';\n@Directive({ selector: '[d]', outputs: ['changed'] })\nexport class D { changed = (core as any).outputFromObservable(null); }\n", - "other.ts": "export function input(...a: any[]): any { return null; }\nexport namespace input { export function required(...a: any[]): any { return null; } }\nexport function model(...a: any[]): any { return null; }\nexport function output(...a: any[]): any { return null; }\nexport function outputFromObservable(...a: any[]): any { return null; }\nexport function viewChild(...a: any[]): any { return null; }\nexport function viewChildren(...a: any[]): any { return null; }\nexport function contentChild(...a: any[]): any { return null; }\nexport function contentChildren(...a: any[]): any { return null; }\n" + "test.ts": "import { Directive } from '@angular/core';\nexport function toBool(v: unknown): boolean { return !!v; }\nconst T = { toBool };\nfunction make(name: string, transform: any) { return [{ name, transform }]; }\n@Directive({ selector: '[d]', inputs: make('x', T.toBool) })\nexport class D { x: any; }\n" }, "diagnostics": [], "classes": { "D": { - "outputs": "{changed:\"changed\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{x:[2,\"x\",\"x\",toBool]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;", + "dts:ngAcceptInputType_x": "staticngAcceptInputType_x:unknown;" } }, "dtsImports": [], "diagnosticSpans": [] }, { - "name": "probe: initializerApi-outputCoreAlias", + "name": "probe: scope-memberOpts", "origin": "probe", "files": { - "test.ts": "import { Directive, output as out } from '@angular/core';\n@Directive({ selector: '[d]', outputs: ['changed'] })\nexport class D { changed = out(); }\n", - "other.ts": "export function input(...a: any[]): any { return null; }\nexport namespace input { export function required(...a: any[]): any { return null; } }\nexport function model(...a: any[]): any { return null; }\nexport function output(...a: any[]): any { return null; }\nexport function outputFromObservable(...a: any[]): any { return null; }\nexport function viewChild(...a: any[]): any { return null; }\nexport function viewChildren(...a: any[]): any { return null; }\nexport function contentChild(...a: any[]): any { return null; }\nexport function contentChildren(...a: any[]): any { return null; }\n" + "test.ts": "import { Directive, Input, booleanAttribute } from '@angular/core';\nfunction opts(t: any) { return { transform: t }; }\n@Directive({ selector: '[d]' })\nexport class D { @Input(opts(booleanAttribute)) x: any; }\n" + }, + "diagnostics": [], + "classes": { + "D": { + "inputs": "{x:[2,\"x\",\"x\",booleanAttribute]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;", + "dts:ngAcceptInputType_x": "staticngAcceptInputType_x:unknown;" + } }, - "diagnostics": ["Output \"changed\" is unexpectedly declared in @Directive as well."], - "classes": {}, "dtsImports": [], - "diagnosticSpans": [[129, 145]] + "diagnosticSpans": [] }, { - "name": "probe: initializerApi-outputCoreNamespace", + "name": "probe: scope-genericHelper", "origin": "probe", "files": { - "test.ts": "import { Directive } from '@angular/core';\nimport * as core from '@angular/core';\n@Directive({ selector: '[d]', outputs: ['changed'] })\nexport class D { changed = core.output(); }\n", - "other.ts": "export function input(...a: any[]): any { return null; }\nexport namespace input { export function required(...a: any[]): any { return null; } }\nexport function model(...a: any[]): any { return null; }\nexport function output(...a: any[]): any { return null; }\nexport function outputFromObservable(...a: any[]): any { return null; }\nexport function viewChild(...a: any[]): any { return null; }\nexport function viewChildren(...a: any[]): any { return null; }\nexport function contentChild(...a: any[]): any { return null; }\nexport function contentChildren(...a: any[]): any { return null; }\n" + "test.ts": "import { Directive } from '@angular/core';\nfunction make(n: string) { return [{ name: n, transform: (v: T) => v }]; }\n@Directive({ selector: '[d]', inputs: make('x') })\nexport class D { x: any; }\n" }, - "diagnostics": ["Output \"changed\" is unexpectedly declared in @Directive as well."], + "diagnostics": [ + "Symbol must be exported in order to be used as the type of an Input transform function" + ], "classes": {}, "dtsImports": [], - "diagnosticSpans": [[153, 177]] + "diagnosticSpans": [[107, 108]] }, { - "name": "probe: initializerApi-outputLocalFunction", + "name": "probe: scope-objParamFn", "origin": "probe", "files": { - "test.ts": "import { Directive } from '@angular/core';\nconst output = (): any => null;\n@Directive({ selector: '[d]', outputs: ['changed'] })\nexport class D { changed = output(); }\n", - "other.ts": "export function input(...a: any[]): any { return null; }\nexport namespace input { export function required(...a: any[]): any { return null; } }\nexport function model(...a: any[]): any { return null; }\nexport function output(...a: any[]): any { return null; }\nexport function outputFromObservable(...a: any[]): any { return null; }\nexport function viewChild(...a: any[]): any { return null; }\nexport function viewChildren(...a: any[]): any { return null; }\nexport function contentChild(...a: any[]): any { return null; }\nexport function contentChildren(...a: any[]): any { return null; }\n" + "test.ts": "import { Directive } from '@angular/core';\nexport function toBool(v: unknown): boolean { return !!v; }\nfunction make(o: any) { return [{ name: 'x', transform: o.t }]; }\n@Directive({ selector: '[d]', inputs: make({ t: toBool }) })\nexport class D { x: any; }\n" }, "diagnostics": [], "classes": { "D": { - "outputs": "{changed:\"changed\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{x:[2,\"x\",\"x\",toBool]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;", + "dts:ngAcceptInputType_x": "staticngAcceptInputType_x:unknown;" } }, "dtsImports": [], "diagnosticSpans": [] }, { - "name": "probe: scope-shadowedByParam", + "name": "probe: scope-paramArrowNamed", "origin": "probe", "files": { - "test.ts": "import {Directive} from '@angular/core';\nfunction make(value: string) { return [{name: 'x', transform: (value: string) => value.trim()}]; }\n@Directive({selector: '[d]', inputs: make('v')})\nexport class D { x: any; }\n" - }, - "diagnostics": [], - "classes": { - "D": { - "inputs": "{x:[2,\"x\",\"x\",(value)=>value.trim()]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "test.ts": "import { Directive } from '@angular/core';\nfunction make(name: string, t: any) { return [{ name, transform: t }]; }\n@Directive({ selector: '[d]', inputs: make('x', (v: string) => v.length) })\nexport class D { x: any; }\n" }, + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "classes": {}, "dtsImports": [], - "diagnosticSpans": [] + "diagnosticSpans": [[108, 109]] }, { - "name": "probe: scope-shadowedByConst", + "name": "probe: scope-memberOptsArrow", "origin": "probe", "files": { - "test.ts": "import {Directive} from '@angular/core';\nfunction make(value: string) { return [{name: 'x', transform: (v: string) => { const value = v.trim(); return value; }}]; }\n@Directive({selector: '[d]', inputs: make('v')})\nexport class D { x: any; }\n" + "test.ts": "import { Directive, Input } from '@angular/core';\nfunction opts(transform: any) { return { transform }; }\n@Directive({ selector: '[d]' })\nexport class D { @Input(opts((v: string) => v.length)) x: any; }\n" }, "diagnostics": [], "classes": { "D": { - "inputs": "{x:[2,\"x\",\"x\",(v)=>{constvalue=v.trim();returnvalue;}]}", + "inputs": "{x:[2,\"x\",\"x\",(v)=>v.length]}", "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, @@ -4561,47 +6473,41 @@ "diagnosticSpans": [] }, { - "name": "probe: scope-shadowedByFunction", + "name": "probe: scope-this", "origin": "probe", "files": { - "test.ts": "import {Directive} from '@angular/core';\nfunction make(value: string) { return [{name: 'x', transform: (v: string) => { function value(s: string) { return s; } return value(v); }}]; }\n@Directive({selector: '[d]', inputs: make('v')})\nexport class D { x: any; }\n" - }, - "diagnostics": [], - "classes": { - "D": { - "inputs": "{x:[2,\"x\",\"x\",(v)=>{functionvalue(s){returns;}returnvalue(v);}]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "test.ts": "import { Directive, booleanAttribute } from '@angular/core';\nclass H { static make() { return [{ name: 'x', transform: this.t }]; } }\n@Directive({ selector: '[d]', inputs: H.make() })\nexport class D { x: any; }\n" }, + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "classes": {}, "dtsImports": [], - "diagnosticSpans": [] + "diagnosticSpans": [[119, 125]] }, { - "name": "probe: scope-shadowedByLoopAndCatch", + "name": "probe: scope-arguments", "origin": "probe", "files": { - "test.ts": "import {Directive} from '@angular/core';\nfunction make(value: string) { return [{name: 'x', transform: (v: string) => { let r = v; for (const value of [v]) { r += value; } try { r += v; } catch (value) { r += value; } return r; }}]; }\n@Directive({selector: '[d]', inputs: make('v')})\nexport class D { x: any; }\n" - }, - "diagnostics": [], - "classes": { - "D": { - "inputs": "{x:[2,\"x\",\"x\",(v)=>{letr=v;for(constvalueof[v]){r+=value;}try{r+=v;}catch(value){r+=value;}returnr;}]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "test.ts": "import { Directive, booleanAttribute } from '@angular/core';\nfunction make() { return [{ name: 'x', transform: arguments[0] }]; }\n@Directive({ selector: '[d]', inputs: make(booleanAttribute) })\nexport class D { x: any; }\n" }, + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "classes": {}, "dtsImports": [], - "diagnosticSpans": [] + "diagnosticSpans": [[111, 123]] }, { - "name": "probe: scope-shadowedInNestedArrow", + "name": "probe: scope-defaultArrow", "origin": "probe", "files": { - "test.ts": "import {Directive} from '@angular/core';\nfunction make(value: string) { return [{name: 'x', transform: (v: string) => { var q = () => { var value = 2; return value; }; return q() + v; }}]; }\n@Directive({selector: '[d]', inputs: make('v')})\nexport class D { x: any; }\n" + "test.ts": "import { Directive } from '@angular/core';\nfunction make(n: string, transform: any = (v: string) => v.length) { return [{ name: n, transform }]; }\n@Directive({ selector: '[d]', inputs: make('x') })\nexport class D { x: any; }\n" }, "diagnostics": [], "classes": { "D": { - "inputs": "{x:[2,\"x\",\"x\",(v)=>{varq=()=>{varvalue=2;returnvalue;};returnq()+v;}]}", + "inputs": "{x:[2,\"x\",\"x\",(v)=>v.length]}", "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, @@ -4609,15 +6515,15 @@ "diagnosticSpans": [] }, { - "name": "probe: scope-shadowedByClass", + "name": "probe: shorthand-constArrow", "origin": "probe", "files": { - "test.ts": "import {Directive} from '@angular/core';\nfunction make(value: string) { return [{name: 'x', transform: (v: string) => { class value {}; return new value() + v; }}]; }\n@Directive({selector: '[d]', inputs: make('v')})\nexport class D { x: any; }\n" + "test.ts": "import { Directive, Input } from '@angular/core';\nconst transform = (v: string) => v.length;\n@Directive({ selector: '[d]', inputs: [{ name: 'x', transform }] })\nexport class D { x: any; }\n" }, "diagnostics": [], "classes": { "D": { - "inputs": "{x:[2,\"x\",\"x\",(v)=>{classvalue{};returnnewvalue()+v;}]}", + "inputs": "{x:[2,\"x\",\"x\",(v)=>v.length]}", "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, @@ -4625,31 +6531,41 @@ "diagnosticSpans": [] }, { - "name": "probe: scope-ownArguments", + "name": "probe: shorthand-constArrowNamedSame", "origin": "probe", "files": { - "test.ts": "import {Directive} from '@angular/core';\nfunction make(value: string) { return [{name: 'x', transform: function (v: string) { return arguments.length ? v : v + v; }}]; }\n@Directive({selector: '[d]', inputs: make('v')})\nexport class D { x: any; }\n" + "test.ts": "import { Directive, Input } from '@angular/core';\nconst transform = (v: string) => v.length;\n@Directive({ selector: '[d]', inputs: [{ name: 'x', transform: transform }] })\nexport class D { x: any; }\n" }, - "diagnostics": [], - "classes": { - "D": { - "inputs": "{x:[2,\"x\",\"x\",function(v){returnarguments.length?v:v+v;}]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[156, 165]] + }, + { + "name": "probe: shorthand-constArrowNamedOther", + "origin": "probe", + "files": { + "test.ts": "import { Directive, Input } from '@angular/core';\nconst t = (v: string) => v.length;\n@Directive({ selector: '[d]', inputs: [{ name: 'x', transform: t }] })\nexport class D { x: any; }\n" }, + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "classes": {}, "dtsImports": [], - "diagnosticSpans": [] + "diagnosticSpans": [[148, 149]] }, { - "name": "probe: scope-ownThis", + "name": "probe: shorthand-constFunctionExpression", "origin": "probe", "files": { - "test.ts": "import {Directive} from '@angular/core';\nfunction make(value: string) { return [{name: 'x', transform: function (v: string) { return this ? v : (() => arguments[0])(); }}]; }\n@Directive({selector: '[d]', inputs: make('v')})\nexport class D { x: any; }\n" + "test.ts": "import { Directive, Input } from '@angular/core';\nconst transform = function (v: string) { return v.length; };\n@Directive({ selector: '[d]', inputs: [{ name: 'x', transform }] })\nexport class D { x: any; }\n" }, "diagnostics": [], "classes": { "D": { - "inputs": "{x:[2,\"x\",\"x\",function(v){returnthis?v:(()=>arguments[0])();}]}", + "inputs": "{x:[2,\"x\",\"x\",function(v){returnv.length;}]}", "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, @@ -4657,15 +6573,15 @@ "diagnosticSpans": [] }, { - "name": "probe: scope-hoistedVar", + "name": "probe: shorthand-letArrow", "origin": "probe", "files": { - "test.ts": "import {Directive} from '@angular/core';\nfunction make(value: string) { return [{name: 'x', transform: (v: string) => { if (v) { var value = v; } return value; }}]; }\n@Directive({selector: '[d]', inputs: make('v')})\nexport class D { x: any; }\n" + "test.ts": "import { Directive, Input } from '@angular/core';\nlet transform = (v: string) => v.length;\n@Directive({ selector: '[d]', inputs: [{ name: 'x', transform }] })\nexport class D { x: any; }\n" }, "diagnostics": [], "classes": { "D": { - "inputs": "{x:[2,\"x\",\"x\",(v)=>{if(v){varvalue=v;}returnvalue;}]}", + "inputs": "{x:[2,\"x\",\"x\",(v)=>v.length]}", "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, @@ -4673,15 +6589,15 @@ "diagnosticSpans": [] }, { - "name": "probe: scope-shadowedByClassName", + "name": "probe: shorthand-constArrowTyped", "origin": "probe", "files": { - "test.ts": "import {Directive} from '@angular/core';\nfunction make(value: string) { return [{name: 'x', transform: (v: string) => new (class value { m() { return value; } })().m() && v}]; }\n@Directive({selector: '[d]', inputs: make('v')})\nexport class D { x: any; }\n" + "test.ts": "import { Directive, Input } from '@angular/core';\nconst transform: (v: string) => number = (v: string) => v.length;\n@Directive({ selector: '[d]', inputs: [{ name: 'x', transform }] })\nexport class D { x: any; }\n" }, "diagnostics": [], "classes": { "D": { - "inputs": "{x:[2,\"x\",\"x\",(v)=>new(classvalue{m(){returnvalue;}})().m()&&v]}", + "inputs": "{x:[2,\"x\",\"x\",(v)=>v.length]}", "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, @@ -4689,82 +6605,96 @@ "diagnosticSpans": [] }, { - "name": "probe: scope-shadowedByDestructuredParam", + "name": "probe: shorthand-constArrowParenthesized", "origin": "probe", "files": { - "test.ts": "import {Directive} from '@angular/core';\nfunction make(value: string) { return [{name: 'x', transform: ({value}: {value: string}) => value}]; }\n@Directive({selector: '[d]', inputs: make('v')})\nexport class D { x: any; }\n" - }, - "diagnostics": [], - "classes": { - "D": { - "inputs": "{x:[2,\"x\",\"x\",({value})=>value]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "test.ts": "import { Directive, Input } from '@angular/core';\nconst transform = ((v: string) => v.length);\n@Directive({ selector: '[d]', inputs: [{ name: 'x', transform }] })\nexport class D { x: any; }\n" }, + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "classes": {}, "dtsImports": [], - "diagnosticSpans": [] + "diagnosticSpans": [[68, 93]] }, { - "name": "probe: scope-spreadConstArgs", + "name": "probe: shorthand-constArrowAs", "origin": "probe", "files": { - "test.ts": "import {Directive, booleanAttribute} from '@angular/core';\nexport function toBool(v: string) { return !!v; }\nfunction make(name: string, t: any) { return [{name, transform: t}]; }\nconst args = ['x', booleanAttribute] as const;\n@Directive({selector: '[d]', inputs: make(...args)})\nexport class D { x: any; }\n" + "test.ts": "import { Directive, Input } from '@angular/core';\nconst transform = ((v: string) => v.length) as any;\n@Directive({ selector: '[d]', inputs: [{ name: 'x', transform }] })\nexport class D { x: any; }\n" }, - "diagnostics": [], - "classes": { - "D": { - "inputs": "{x:[2,\"x\",\"x\",booleanAttribute]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;", - "dts:ngAcceptInputType_x": "staticngAcceptInputType_x:unknown;" - } + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[68, 100]] + }, + { + "name": "probe: shorthand-constChain", + "origin": "probe", + "files": { + "test.ts": "import { Directive, Input } from '@angular/core';\nconst a = (v: string) => v.length;\nconst transform = a;\n@Directive({ selector: '[d]', inputs: [{ name: 'x', transform }] })\nexport class D { x: any; }\n" }, + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "classes": {}, "dtsImports": [], - "diagnosticSpans": [] + "diagnosticSpans": [[103, 104]] }, { - "name": "probe: scope-restParam", + "name": "probe: shorthand-inConstObject", "origin": "probe", "files": { - "test.ts": "import {Directive, booleanAttribute} from '@angular/core';\nexport function toBool(v: string) { return !!v; }\nfunction make(...a: any[]) { return [{name: a[0], transform: a[1]}]; }\n@Directive({selector: '[d]', inputs: make('x', booleanAttribute)})\nexport class D { x: any; }\n" + "test.ts": "import { Directive, Input } from '@angular/core';\nconst transform = (v: string) => v.length;\nconst X = { name: 'x', transform };\n@Directive({ selector: '[d]', inputs: [X] })\nexport class D { x: any; }\n" }, "diagnostics": [], "classes": { "D": { - "inputs": "{x:[2,\"x\",\"x\",booleanAttribute]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;", - "dts:ngAcceptInputType_x": "staticngAcceptInputType_x:unknown;" + "inputs": "{x:[2,\"x\",\"x\",(v)=>v.length]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [], "diagnosticSpans": [] }, { - "name": "probe: scope-restAfterParam", + "name": "probe: shorthand-constArrowUntyped", "origin": "probe", "files": { - "test.ts": "import {Directive, booleanAttribute} from '@angular/core';\nexport function toBool(v: string) { return !!v; }\nfunction make(name: string, ...ts: any[]) { return [{name, transform: ts[0]}]; }\n@Directive({selector: '[d]', inputs: make('x', booleanAttribute)})\nexport class D { x: any; }\n" + "test.ts": "import { Directive, Input } from '@angular/core';\nconst transform = (v) => v;\n@Directive({ selector: '[d]', inputs: [{ name: 'x', transform }] })\nexport class D { x: any; }\n" }, - "diagnostics": [], - "classes": { - "D": { - "inputs": "{x:[2,\"x\",\"x\",booleanAttribute]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;", - "dts:ngAcceptInputType_x": "staticngAcceptInputType_x:unknown;" - } + "diagnostics": [ + "Input transform function first parameter must have a type Value could not be determined statically." + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[68, 76]] + }, + { + "name": "probe: shorthand-constArrowGeneric", + "origin": "probe", + "files": { + "test.ts": "import { Directive, Input } from '@angular/core';\nconst transform = (v: T) => v;\n@Directive({ selector: '[d]', inputs: [{ name: 'x', transform }] })\nexport class D { x: any; }\n" }, + "diagnostics": [ + "Input transform function cannot be generic Value could not be determined statically." + ], + "classes": {}, "dtsImports": [], - "diagnosticSpans": [] + "diagnosticSpans": [[68, 82]] }, { - "name": "probe: scope-spreadArrayLiteral", + "name": "probe: shorthand-objectDestructured", "origin": "probe", "files": { - "test.ts": "import {Directive, booleanAttribute} from '@angular/core';\nexport function toBool(v: string) { return !!v; }\nfunction make(name: string, t: any) { return [{name, transform: t}]; }\n@Directive({selector: '[d]', inputs: make(...['x', toBool])})\nexport class D { x: any; }\n" + "test.ts": "import { Directive, Input } from '@angular/core';\nconst { transform } = { transform: (v: string) => v.length };\n@Directive({ selector: '[d]', inputs: [{ name: 'x', transform }] })\nexport class D { x: any; }\n" }, "diagnostics": [], "classes": { "D": { - "inputs": "{x:[2,\"x\",\"x\",toBool]}", + "inputs": "{x:[2,\"x\",\"x\",(v)=>v.length]}", "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, @@ -4772,15 +6702,15 @@ "diagnosticSpans": [] }, { - "name": "probe: scope-spreadAfterArg", + "name": "probe: shorthand-exportedConstArrow", "origin": "probe", "files": { - "test.ts": "import {Directive, booleanAttribute} from '@angular/core';\nexport function toBool(v: string) { return !!v; }\nfunction make(name: string, t: any) { return [{name, transform: t}]; }\n@Directive({selector: '[d]', inputs: make('x', ...[toBool])})\nexport class D { x: any; }\n" + "test.ts": "import { Directive, Input } from '@angular/core';\nexport const transform = (v: string) => v.length;\n@Directive({ selector: '[d]', inputs: [{ name: 'x', transform }] })\nexport class D { x: any; }\n" }, "diagnostics": [], "classes": { "D": { - "inputs": "{x:[2,\"x\",\"x\",toBool]}", + "inputs": "{x:[2,\"x\",\"x\",(v)=>v.length]}", "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, @@ -4788,15 +6718,15 @@ "diagnosticSpans": [] }, { - "name": "probe: scope-spreadRestThrough", + "name": "probe: shorthand-varRedeclared", "origin": "probe", "files": { - "test.ts": "import {Directive, booleanAttribute} from '@angular/core';\nexport function toBool(v: string) { return !!v; }\nfunction make(name: string, t: any) { return [{name, transform: t}]; }\nfunction outer(...a: any[]) { return make(...a); }\n@Directive({selector: '[d]', inputs: outer('x', toBool)})\nexport class D { x: any; }\n" + "test.ts": "import { Directive, Input } from '@angular/core';\nvar transform = (v: string) => v.length;\nvar transform = (v: string) => v.length;\n@Directive({ selector: '[d]', inputs: [{ name: 'x', transform }] })\nexport class D { x: any; }\n" }, "diagnostics": [], "classes": { "D": { - "inputs": "{x:[2,\"x\",\"x\",toBool]}", + "inputs": "{x:[2,\"x\",\"x\",(v)=>v.length]}", "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, @@ -4804,15 +6734,15 @@ "diagnosticSpans": [] }, { - "name": "probe: scope-restLocalFunction", + "name": "probe: shorthand-spreadConstObject", "origin": "probe", "files": { - "test.ts": "import {Directive, booleanAttribute} from '@angular/core';\nexport function toBool(v: string) { return !!v; }\nfunction make(name: string, ...ts: any[]) { return [{name, transform: ts[0]}]; }\n@Directive({selector: '[d]', inputs: make('x', toBool)})\nexport class D { x: any; }\n" + "test.ts": "import { Directive, Input } from '@angular/core';\nconst transform = (v: string) => v.length;\nconst B = { transform };\n@Directive({ selector: '[d]', inputs: [{ name: 'x', ...B }] })\nexport class D { x: any; }\n" }, "diagnostics": [], "classes": { "D": { - "inputs": "{x:[2,\"x\",\"x\",toBool]}", + "inputs": "{x:[2,\"x\",\"x\",(v)=>v.length]}", "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, @@ -4820,1649 +6750,1935 @@ "diagnosticSpans": [] }, { - "name": "probe: scope-spreadBeforeArgs", + "name": "probe: shorthand-constArrowUnexportedType", "origin": "probe", "files": { - "test.ts": "import {Directive, booleanAttribute} from '@angular/core';\nexport function toBool(v: string) { return !!v; }\nfunction make(name: string, t: any, u: any) { return [{name, transform: u}]; }\nconst pre = ['x'];\n@Directive({selector: '[d]', inputs: make(...pre, toBool, booleanAttribute)})\nexport class D { x: any; }\n" + "test.ts": "import { Directive, Input } from '@angular/core';\ninterface Foo { a: string }\nconst transform = (v: Foo) => 1;\n@Directive({ selector: '[d]', inputs: [{ name: 'x', transform }] })\nexport class D { x: any; }\n" }, - "diagnostics": [], - "classes": { - "D": { - "inputs": "{x:[2,\"x\",\"x\",booleanAttribute]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;", - "dts:ngAcceptInputType_x": "staticngAcceptInputType_x:unknown;" - } + "diagnostics": [ + "Symbol must be exported in order to be used as the type of an Input transform function" + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[100, 103]] + }, + { + "name": "probe: shorthand-constArrowClash", + "origin": "probe", + "files": { + "test.ts": "import { Directive, Input } from '@angular/core';\nconst transform = (v: string) => v.length;\n@Directive({ selector: '[d]', inputs: [{ name: 'x', transform }] })\nexport class D { x: any; static ngAcceptInputType_x: string; }\n" }, + "diagnostics": [ + "Class cannot have both a transform function on Input x and a static member called ngAcceptInputType_x" + ], + "classes": {}, "dtsImports": [], - "diagnosticSpans": [] + "diagnosticSpans": [[68, 91]] }, { - "name": "probe: scope-restSpreadImport", + "name": "probe: shorthand-arrayDestructured", "origin": "probe", "files": { - "test.ts": "import {Directive, booleanAttribute} from '@angular/core';\nfunction make(name: string, t: any) { return [{name, transform: t}]; }\nfunction outer(name: string, ...a: any[]) { return make(name, ...a); }\n@Directive({selector: '[d]', inputs: outer('x', booleanAttribute)})\nexport class D { x: any; }\n" + "test.ts": "import { Directive, Input } from '@angular/core';\nconst [transform] = [(v: string) => v.length];\n@Directive({ selector: '[d]', inputs: [{ name: 'x', transform }] })\nexport class D { x: any; }\n" }, "diagnostics": [], "classes": { "D": { - "inputs": "{x:[2,\"x\",\"x\",booleanAttribute]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;", - "dts:ngAcceptInputType_x": "staticngAcceptInputType_x:unknown;" + "inputs": "{x:[2,\"x\",\"x\",(v)=>v.length]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [], "diagnosticSpans": [] }, { - "name": "probe: transform-typeofEnumKeyof", + "name": "probe: shorthand-objectDestructuredNamed", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nenum Size { S, M }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: (v: keyof typeof Size) => Size[v]}) x!: Size;\n}\n" - }, - "diagnostics": [], - "diagnosticSpans": [], - "classes": { - "Dir": { - "inputs": "{x:[2,\"x\",\"x\",(v)=>Size[v]]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "test.ts": "import { Directive, Input } from '@angular/core';\nconst t = (v: string) => v.length;\nconst { transform } = { transform: t };\n@Directive({ selector: '[d]', inputs: [{ name: 'x', transform }] })\nexport class D { x: any; }\n" }, - "dtsImports": [] + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[120, 121]] }, { - "name": "probe: transform-typeofClass", + "name": "probe: shorthand-nestedDestructured", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nclass Local {}\nexport function toNum(v: typeof Local) { return 1; }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: toNum}) x!: number;\n}\n" + "test.ts": "import { Directive, Input } from '@angular/core';\nconst { o: { transform } } = { o: { transform: (v: string) => v.length } };\n@Directive({ selector: '[d]', inputs: [{ name: 'x', transform }] })\nexport class D { x: any; }\n" }, "diagnostics": [], - "diagnosticSpans": [], "classes": { - "Dir": { - "inputs": "{x:[2,\"x\",\"x\",toNum]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "D": { + "inputs": "{x:[2,\"x\",\"x\",(v)=>v.length]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [] }, { - "name": "probe: transform-instanceTypeTypeof", + "name": "probe: shorthand-memberConstArrow", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nclass Local {}\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: (v: InstanceType) => 1}) x!: number;\n}\n" + "test.ts": "import { Directive, Input } from '@angular/core';\nconst transform = (v: string) => v.length;\n@Directive({ selector: '[d]' })\nexport class D { @Input({ transform }) x: any; }\n" }, "diagnostics": [], - "diagnosticSpans": [], "classes": { - "Dir": { - "inputs": "{x:[2,\"x\",\"x\",(v)=>1]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "D": { + "inputs": "{x:[2,\"x\",\"x\",(v)=>v.length]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [] }, { - "name": "probe: transform-returnTypeTypeofMember", + "name": "probe: shorthand-memberConstArrowNamedSame", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nclass Local { static create(v: string) { return new Local(); } }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: (v: ReturnType) => 1}) x!: number;\n}\n" - }, - "diagnostics": [], - "diagnosticSpans": [], - "classes": { - "Dir": { - "inputs": "{x:[2,\"x\",\"x\",(v)=>1]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "test.ts": "import { Directive, Input } from '@angular/core';\nconst transform = (v: string) => v.length;\n@Directive({ selector: '[d]' })\nexport class D { @Input({ transform: transform }) x: any; }\n" }, - "dtsImports": [] + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[162, 171]] }, { - "name": "probe: transform-qualifiedClassNamespace", + "name": "probe: shorthand-memberConstArrowNamedOther", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nclass C {}\nnamespace C { export type T = string; }\nexport function toNum(v: C.T) { return 1; }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: toNum}) x!: number;\n}\n" - }, - "diagnostics": [], - "diagnosticSpans": [], - "classes": { - "Dir": { - "inputs": "{x:[2,\"x\",\"x\",toNum]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "test.ts": "import { Directive, Input } from '@angular/core';\nconst t = (v: string) => v.length;\n@Directive({ selector: '[d]' })\nexport class D { @Input({ transform: t }) x: any; }\n" }, - "dtsImports": [] + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[154, 155]] }, { - "name": "probe: transform-qualifiedInterfaceNamespace", + "name": "probe: shorthand-memberOptionsConst", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\ninterface Foo { a: string }\nnamespace Foo { export type T = string; }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: (v: Foo.T) => 1}) x!: number;\n}\n" + "test.ts": "import { Directive, Input } from '@angular/core';\nconst transform = (v: string) => v.length;\nconst OPTS = { transform };\n@Directive({ selector: '[d]' })\nexport class D { @Input(OPTS) x: any; }\n" }, "diagnostics": [], - "diagnosticSpans": [], "classes": { - "Dir": { - "inputs": "{x:[2,\"x\",\"x\",(v)=>1]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "D": { + "inputs": "{x:[2,\"x\",\"x\",(v)=>v.length]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [] }, { - "name": "probe: transform-typeofEnum", + "name": "probe: scope-spreadConstFunction", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nenum E { A }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: (v: typeof E) => 1}) x!: number;\n}\n" + "test.ts": "import {Directive, booleanAttribute} from '@angular/core';\nexport function toBool(v: string) { return !!v; }\nfunction make(name: string, t: any) { return [{name, transform: t}]; }\nconst args = ['x', (v: string) => v.trim()] as const;\n@Directive({selector: '[d]', inputs: make(...args)})\nexport class D { x: any; }\n" }, - "diagnostics": [], - "diagnosticSpans": [], - "classes": { - "Dir": { - "inputs": "{x:[2,\"x\",\"x\",(v)=>1]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[173, 174]] + }, + { + "name": "probe: scope-spreadFunction", + "origin": "probe", + "files": { + "test.ts": "import {Directive, booleanAttribute} from '@angular/core';\nfunction make(name: string, t: any) { return [{name, transform: t}]; }\n@Directive({selector: '[d]', inputs: make('x', ...[(v: string) => v.trim()])})\nexport class D { x: any; }\n" }, - "dtsImports": [] + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[123, 124]] }, { - "name": "probe: transform-enumUnexported", + "name": "probe: scope-restFunction", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nenum E { A }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: (v: E) => 1}) x!: number;\n}\n" + "test.ts": "import {Directive, booleanAttribute} from '@angular/core';\nfunction make(...a: any[]) { return [{name: a[0], transform: a[1]}]; }\n@Directive({selector: '[d]', inputs: make('x', (v: string) => v.trim())})\nexport class D { x: any; }\n" }, "diagnostics": [ - "Symbol must be exported in order to be used as the type of an Input transform function" + "Input transform must be a function Value could not be determined statically." ], - "diagnosticSpans": [[153, 154]], "classes": {}, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [[120, 124]] }, { - "name": "probe: transform-indexedAccessUnexported", + "name": "probe: scope-restAfterParamFunction", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\ninterface Foo { a: string }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: (v: Foo['a']) => 1}) x!: number;\n}\n" + "test.ts": "import {Directive, booleanAttribute} from '@angular/core';\nfunction make(name: string, ...ts: any[]) { return [{name, transform: ts[0]}]; }\n@Directive({selector: '[d]', inputs: make('x', (v: string) => v.trim())})\nexport class D { x: any; }\n" }, "diagnostics": [ - "Symbol must be exported in order to be used as the type of an Input transform function" + "Input transform must be a function Value could not be determined statically." ], - "diagnosticSpans": [[168, 176]], "classes": {}, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [[129, 134]] }, { - "name": "probe: transform-typeArgUnexported", + "name": "probe: scope-spreadRestThroughFunction", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\ninterface Foo {}\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: (v: Map) => 1}) x!: number;\n}\n" + "test.ts": "import {Directive, booleanAttribute} from '@angular/core';\nfunction make(name: string, t: any) { return [{name, transform: t}]; }\nfunction outer(...a: any[]) { return make(...a); }\n@Directive({selector: '[d]', inputs: outer('x', (v: string) => v.trim())})\nexport class D { x: any; }\n" }, "diagnostics": [ - "Symbol must be exported in order to be used as the type of an Input transform function" + "Input transform must be a function Value could not be determined statically." ], - "diagnosticSpans": [[157, 173]], "classes": {}, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [[123, 124]] }, { - "name": "probe: transform-typeLiteralMethodUnexported", + "name": "probe: scope-functionAfterSpread", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\ninterface Foo {}\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: (v: {m(x: Foo): void}) => 1}) x!: number;\n}\n" + "test.ts": "import {Directive, booleanAttribute} from '@angular/core';\nfunction make(name: string, t: any) { return [{name, transform: t}]; }\nconst pre = ['x'];\n@Directive({selector: '[d]', inputs: make(...pre, (v: string) => v.trim())})\nexport class D { x: any; }\n" }, "diagnostics": [ - "Symbol must be exported in order to be used as the type of an Input transform function" + "Input transform must be a function Value could not be determined statically." ], - "diagnosticSpans": [[157, 174]], "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[123, 124]] + }, + { + "name": "probe: queries-forwardRef-localObjectMember", + "origin": "probe", + "files": { + "test.ts": "import {Component, ViewChild, ContentChildren, forwardRef, viewChild} from '@angular/core';\nclass Foo {}\nconst util = {forwardRef};\n@Component({selector: 'c', template: ''})\nexport class Cmp {\n @ViewChild(util.forwardRef(() => Foo)) foo: any;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery(util.forwardRef(()=>Foo),5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.foo=_t.first);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: queries-forwardRef-localObjectQueries", + "origin": "probe", + "files": { + "test.ts": "import {Component, ViewChild, ContentChildren, forwardRef, viewChild} from '@angular/core';\nclass Foo {}\nconst util = {forwardRef};\n@Component({selector: 'c', template: '', queries: {foo: new ViewChild(util.forwardRef(() => Foo))}})\nexport class Cmp {\n foo: any;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery(util.forwardRef(()=>Foo),5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.foo=_t.first);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: queries-forwardRef-localObjectSignal", + "origin": "probe", + "files": { + "test.ts": "import {Component, ViewChild, ContentChildren, forwardRef, viewChild} from '@angular/core';\nclass Foo {}\nconst util = {forwardRef};\n@Component({selector: 'c', template: ''})\nexport class Cmp {\n foo = viewChild(util.forwardRef(() => Foo));\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuerySignal(ctx.foo,util.forwardRef(()=>Foo),5);}if(rf&2){i0.ɵɵqueryAdvance();}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" + } + }, "dtsImports": [] }, { - "name": "probe: transform-overloadImplTypeUnexported", + "name": "probe: queries-forwardRef-coreNamespaceMember", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\ninterface Foo { a: string }\nexport function toNum(v: string): number;\nexport function toNum(v: string | Foo): number { return 1; }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: toNum}) x!: number;\n}\n" + "test.ts": "import * as core from '@angular/core';\nclass Foo {}\n@core.Component({selector: 'c', template: ''})\nexport class Cmp {\n @core.ViewChild(core.forwardRef(() => Foo)) foo: any;\n}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { - "Dir": { - "inputs": "{x:[2,\"x\",\"x\",toNum]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery(Foo,5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.foo=_t.first);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: transform-overloadFirstTypeUnexported", + "name": "probe: queries-forwardRef-coreNamespaceQueries", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\ninterface Foo {}\nexport function toNum(v: Foo): number;\nexport function toNum(v: any) { return 1; }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: toNum}) x!: number;\n}\n" + "test.ts": "import * as core from '@angular/core';\nclass Foo {}\n@core.Component({selector: 'c', template: '', queries: {foo: new core.ViewChild(core.forwardRef(function () { return Foo; }))}})\nexport class Cmp {\n foo: any;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery(Foo,5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.foo=_t.first);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" + } }, - "diagnostics": [ - "Symbol must be exported in order to be used as the type of an Input transform function" - ], - "diagnosticSpans": [[108, 111]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: transform-overloadFirstUntyped", + "name": "probe: queries-forwardRef-coreNamespaceSignal", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nexport function toNum(v): number;\nexport function toNum(v: string) { return 1; }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: toNum}) x!: number;\n}\n" + "test.ts": "import * as core from '@angular/core';\nclass Foo {}\n@core.Component({selector: 'c', template: ''})\nexport class Cmp {\n foo = core.viewChild(core.forwardRef(() => Foo));\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuerySignal(ctx.foo,Foo,5);}if(rf&2){i0.ɵɵqueryAdvance();}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" + } }, - "diagnostics": [ - "Input transform function first parameter must have a type Value is a reference to 'toNum'." - ], - "diagnosticSpans": [[66, 99]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: transform-overloadFirstNoParams", + "name": "probe: queries-forwardRef-foreignNamespaceMember", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nexport function toNum(): number;\nexport function toNum(v?: string) { return 1; }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: toNum}) x!: number;\n}\n" + "test.ts": "import {Component, ViewChild} from '@angular/core';\nimport * as other from './other';\nclass Foo {}\n@Component({selector: 'c', template: ''})\nexport class Cmp {\n @ViewChild(other.forwardRef(() => Foo)) foo: any;\n @ViewChild(other.forwardRef(function () { return Foo; })) bar: any;\n}\n", + "other.ts": "export function forwardRef(fn: () => any) { return fn(); }\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { - "Dir": { - "inputs": "{x:[2,\"x\",\"x\",toNum]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;", - "dts:ngAcceptInputType_x": "staticngAcceptInputType_x:unknown;" + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery(other.forwardRef(()=>Foo),5)(other.forwardRef(function(){returnFoo;}),5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.foo=_t.first);i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.bar=_t.first);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: transform-overloadFirstSpread", + "name": "probe: queries-forwardRef-foreignNamespaceQueries", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nexport function toNum(...v: string[]): number;\nexport function toNum(v: any) { return 1; }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: toNum}) x!: number;\n}\n" + "test.ts": "import {Component, ViewChild} from '@angular/core';\nimport * as other from './other';\nclass Foo {}\n@Component({selector: 'c', template: '', queries: {foo: new ViewChild(other.forwardRef(() => Foo))}})\nexport class Cmp {\n foo: any;\n}\n", + "other.ts": "export function forwardRef(fn: () => any) { return fn(); }\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery(other.forwardRef(()=>Foo),5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.foo=_t.first);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" + } }, - "diagnostics": [ - "Input transform function first parameter cannot be a spread parameter Value is a reference to 'toNum'." - ], - "diagnosticSpans": [[66, 112]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: transform-overloadStaticFirstTypeUnexported", + "name": "probe: queries-forwardRef-bareForwardRef", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\ninterface Foo {}\nclass U { static c(v: Foo): number; static c(v: any) { return 1; } }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: U.c}) x!: number;\n}\n" + "test.ts": "import {Component, ViewChild, ContentChildren, forwardRef, viewChild} from '@angular/core';\nclass Foo {}\n@Component({selector: 'c', template: ''})\nexport class Cmp {\n @ViewChild(forwardRef(() => Foo)) foo: any;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery(Foo,5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.foo=_t.first);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" + } }, - "diagnostics": [ - "Symbol must be exported in order to be used as the type of an Input transform function" - ], - "diagnosticSpans": [[105, 108]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: transform-constTernary", + "name": "probe: forwardRef-readCore", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nconst isProd = false;\nexport function a(v: string) { return 1; }\nexport function b(v: string) { return 2; }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: isProd ? a : b}) x!: number;\n}\n" + "test.ts": "import { Directive, ViewChild, forwardRef } from '@angular/core';\nexport class Foo {}\nexport class Bar {}\n@Directive({ selector: '[d]' })\nexport class D { @ViewChild(Foo, { read: forwardRef(() => Bar) }) el: any; }\n" }, "diagnostics": [], - "diagnosticSpans": [], "classes": { - "Dir": { - "inputs": "{x:[2,\"x\",\"x\",b]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "D": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery(Foo,5,forwardRef(()=>Bar));}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.el=_t.first);}}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [] }, { - "name": "probe: transform-literalTernary", + "name": "probe: forwardRef-aliasFromCore", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nexport function toNum(v: string) { return 1; }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: true ? toNum : toNum}) x!: number;\n}\n" + "test.ts": "import { Directive, ViewChild, forwardRef as fr } from '@angular/core';\nexport class Foo {}\n@Directive({ selector: '[d]' })\nexport class D { @ViewChild(fr(() => Foo)) el: any; }\n" }, "diagnostics": [], - "diagnosticSpans": [], "classes": { - "Dir": { - "inputs": "{x:[2,\"x\",\"x\",toNum]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "D": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery(Foo,5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.el=_t.first);}}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [] }, { - "name": "probe: transform-optionalChain", + "name": "probe: forwardRef-otherModule", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nfunction toNum(v: string) { return 1; }\nconst T = { f: toNum };\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: T?.f}) x!: number;\n}\n" + "test.ts": "import { Directive, ViewChild } from '@angular/core';\nimport { forwardRef } from './other';\nexport class Foo {}\n@Directive({ selector: '[d]' })\nexport class D { @ViewChild(forwardRef(() => Foo)) el: any; }\n", + "other.ts": "export function forwardRef(fn: () => any): any { return fn; }\n" }, "diagnostics": [], - "diagnosticSpans": [], "classes": { - "Dir": { - "inputs": "{x:[2,\"x\",\"x\",toNum]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "D": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery(forwardRef(()=>Foo),5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.el=_t.first);}}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [] }, { - "name": "probe: transform-optionalChainExported", + "name": "probe: forwardRef-localFunction", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nexport function toNum(v: string) { return 1; }\nconst T = { f: toNum };\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: T?.f}) x!: number;\n}\n" + "test.ts": "import { Directive, ViewChild } from '@angular/core';\nexport class Foo {}\nfunction forwardRef(fn: () => any): any { return fn; }\n@Directive({ selector: '[d]' })\nexport class D { @ViewChild(forwardRef(() => Foo)) el: any; }\n" }, "diagnostics": [], - "diagnosticSpans": [], "classes": { - "Dir": { - "inputs": "{x:[2,\"x\",\"x\",toNum]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "D": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery(forwardRef(()=>Foo),5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.el=_t.first);}}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [] }, { - "name": "probe: transform-ternaryMeta", + "name": "probe: forwardRef-declaredGlobal", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nconst isProd = false;\nexport function a(v: string) { return 1; }\nexport function b(v: string) { return 2; }\n@Directive({selector: '[d]', inputs: [{name: 'x', transform: isProd ? a : b}]})\nexport class Dir {\n x!: number;\n}\n" + "test.ts": "import { Directive, ViewChild } from '@angular/core';\nexport class Foo {}\ndeclare function forwardRef(fn: () => any): any;\n@Directive({ selector: '[d]' })\nexport class D { @ViewChild(forwardRef(() => Foo)) el: any; }\n" }, "diagnostics": [], - "diagnosticSpans": [], "classes": { - "Dir": { - "inputs": "{x:[2,\"x\",\"x\",b]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "D": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery(forwardRef(()=>Foo),5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.el=_t.first);}}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [] }, { - "name": "probe: transform-clashImported", + "name": "probe: forwardRef-core", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: booleanAttribute}) x!: boolean;\n static ngAcceptInputType_x: boolean | string;\n}\n" + "test.ts": "import { Directive, ViewChild, forwardRef } from '@angular/core';\nexport class Foo {}\n@Directive({ selector: '[d]' })\nexport class D { @ViewChild(forwardRef(() => Foo)) el: any; }\n" + }, + "diagnostics": [], + "classes": { + "D": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery(Foo,5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.el=_t.first);}}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } }, - "diagnostics": [ - "Class cannot have both a transform function on Input x and a static member called ngAcceptInputType_x" - ], - "classes": {}, "dtsImports": [], - "skip": "ngtsc reports this at the transform's declaration in @angular/core's .d.ts, a file oxc doesn't read (so this snapshot's generator, which keeps test.ts diagnostics, records none); oxc reports the same message on the expression" + "diagnosticSpans": [] }, { - "name": "probe: transform-clashImportedMeta", + "name": "probe: forwardRef-queriesAliasFromCore", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]', inputs: [{name: 'x', transform: booleanAttribute}]})\nexport class Dir {\n x!: boolean;\n static ngAcceptInputType_x: boolean | string;\n}\n" + "test.ts": "import { Directive, ViewChild, forwardRef as fr } from '@angular/core';\nexport class Foo {}\n@Directive({ selector: '[d]', queries: { el: new ViewChild(fr(() => Foo)) } })\nexport class D { el: any; }\n" + }, + "diagnostics": [], + "classes": { + "D": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery(Foo,5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.el=_t.first);}}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } }, - "diagnostics": [ - "Class cannot have both a transform function on Input x and a static member called ngAcceptInputType_x" - ], - "classes": {}, "dtsImports": [], - "skip": "ngtsc reports this at the transform's declaration in @angular/core's .d.ts, a file oxc doesn't read (so this snapshot's generator, which keeps test.ts diagnostics, records none); oxc reports the same message on the expression" + "diagnosticSpans": [] }, { - "name": "probe: transform-clashGlobal", + "name": "probe: forwardRef-queriesOtherModule", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: parseInt}) x!: number;\n static ngAcceptInputType_x: string;\n}\n" + "test.ts": "import { Directive, ViewChild } from '@angular/core';\nimport { forwardRef } from './other';\nexport class Foo {}\n@Directive({ selector: '[d]', queries: { el: new ViewChild(forwardRef(() => Foo)) } })\nexport class D { el: any; }\n", + "other.ts": "export function forwardRef(fn: () => any): any { return fn; }\n" + }, + "diagnostics": [], + "classes": { + "D": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery(forwardRef(()=>Foo),5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.el=_t.first);}}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } }, - "diagnostics": [ - "Class cannot have both a transform function on Input x and a static member called ngAcceptInputType_x" - ], - "classes": {}, "dtsImports": [], - "skip": "ngtsc reports this at the transform's declaration in TypeScript's lib.es5.d.ts, a file oxc doesn't read (so this snapshot's generator, which keeps test.ts diagnostics, records none); oxc reports the same message on the expression" + "diagnosticSpans": [] }, { - "name": "probe: transform-letUninitTyped", + "name": "probe: forwardRef-contentChildrenAliasFromCore", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nlet f: (v: string) => number;\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: f}) x!: number;\n}\n" + "test.ts": "import { Directive, ContentChildren, forwardRef as fr } from '@angular/core';\nexport class Foo {}\n@Directive({ selector: '[d]' })\nexport class D { @ContentChildren(fr(() => Foo)) els: any; }\n" }, - "diagnostics": ["Input transform must be a function Value is of type 'undefined'."], - "diagnosticSpans": [[154, 168]], - "classes": {}, - "dtsImports": [] + "diagnostics": [], + "classes": { + "D": { + "contentQueries": "{if(rf&1){i0.ɵɵcontentQuery(dirIndex,Foo,4);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.els=_t);}}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] }, { - "name": "probe: transform-letUninit", + "name": "probe: forwardRef-signalQueryAliasFromCore", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nlet f;\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: f}) x!: number;\n}\n" + "test.ts": "import { Directive, viewChild, forwardRef as fr } from '@angular/core';\nexport class Foo {}\n@Directive({ selector: '[d]' })\nexport class D { el = viewChild(fr(() => Foo)); }\n" }, - "diagnostics": ["Input transform must be a function Value is of type 'undefined'."], - "diagnosticSpans": [[131, 145]], - "classes": {}, - "dtsImports": [] + "diagnostics": [], + "classes": { + "D": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuerySignal(ctx.el,Foo,5);}if(rf&2){i0.ɵɵqueryAdvance();}}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] }, { - "name": "probe: transform-enumAsTransform", + "name": "probe: forwardRef-signalQueryOtherModule", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nenum E { A }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: E}) x!: number;\n}\n" + "test.ts": "import { Directive, viewChild } from '@angular/core';\nimport { forwardRef } from './other';\nexport class Foo {}\n@Directive({ selector: '[d]' })\nexport class D { el = viewChild(forwardRef(() => Foo)); }\n", + "other.ts": "export function forwardRef(fn: () => any): any { return fn; }\n" }, - "diagnostics": ["Input transform must be a function Value is of type '{ A: E }'."], - "diagnosticSpans": [[137, 151]], - "classes": {}, - "dtsImports": [] + "diagnostics": [], + "classes": { + "D": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuerySignal(ctx.el,forwardRef(()=>Foo),5);}if(rf&2){i0.ɵɵqueryAdvance();}}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] }, { - "name": "probe: transform-staticGetter", + "name": "probe: forwardRef-readAliasFromCore", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nclass U { static get c() { return (v: string) => 1; } }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: U.c}) x!: number;\n}\n" + "test.ts": "import { Directive, ViewChild, forwardRef as fr } from '@angular/core';\nexport class Foo {}\nexport class Bar {}\n@Directive({ selector: '[d]' })\nexport class D { @ViewChild(Foo, { read: fr(() => Bar) }) el: any; }\n" }, - "diagnostics": ["Input transform must be a function Value is a reference to 'c'."], - "diagnosticSpans": [[76, 119]], - "classes": {}, - "dtsImports": [] + "diagnostics": [], + "classes": { + "D": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery(Foo,5,fr(()=>Bar));}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.el=_t.first);}}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] }, { - "name": "probe: transform-interfaceExportedLater", + "name": "probe: initializerApi-viewChildCore", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\ninterface Foo { a: string }\nexport function toNum(v: Foo) { return 1; }\nexport { Foo };\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: toNum}) x!: number;\n}\n" + "test.ts": "import { Directive, ViewChild, viewChild } from '@angular/core';\n@Directive({ selector: '[d]', queries: { foo: new ViewChild('x') } })\nexport class D { foo = viewChild('x'); }\n", + "other.ts": "export function input(...a: any[]): any { return null; }\nexport namespace input { export function required(...a: any[]): any { return null; } }\nexport function model(...a: any[]): any { return null; }\nexport function output(...a: any[]): any { return null; }\nexport function outputFromObservable(...a: any[]): any { return null; }\nexport function viewChild(...a: any[]): any { return null; }\nexport function viewChildren(...a: any[]): any { return null; }\nexport function contentChild(...a: any[]): any { return null; }\nexport function contentChildren(...a: any[]): any { return null; }\n" }, "diagnostics": [ - "Symbol must be exported in order to be used as the type of an Input transform function" + "Query is declared multiple times. \"@Directive\" declares a query for the same property." ], - "diagnosticSpans": [[119, 122]], "classes": {}, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [[111, 129]] }, { - "name": "probe: transform-typeExportedLater", + "name": "probe: initializerApi-viewChildCoreAlias", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\ntype Foo = { a: string };\nexport function toNum(v: Foo) { return 1; }\nexport type { Foo };\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: toNum}) x!: number;\n}\n" + "test.ts": "import { Directive, ViewChild, viewChild as vc } from '@angular/core';\n@Directive({ selector: '[d]', queries: { foo: new ViewChild('x') } })\nexport class D { foo = vc('x'); }\n", + "other.ts": "export function input(...a: any[]): any { return null; }\nexport namespace input { export function required(...a: any[]): any { return null; } }\nexport function model(...a: any[]): any { return null; }\nexport function output(...a: any[]): any { return null; }\nexport function outputFromObservable(...a: any[]): any { return null; }\nexport function viewChild(...a: any[]): any { return null; }\nexport function viewChildren(...a: any[]): any { return null; }\nexport function contentChild(...a: any[]): any { return null; }\nexport function contentChildren(...a: any[]): any { return null; }\n" }, "diagnostics": [ - "Symbol must be exported in order to be used as the type of an Input transform function" + "Query is declared multiple times. \"@Directive\" declares a query for the same property." ], - "diagnosticSpans": [[117, 120]], "classes": {}, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [[117, 135]] }, { - "name": "probe: transform-interfaceExportedAs", + "name": "probe: initializerApi-viewChildCoreNamespace", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\ninterface Foo { a: string }\nexport function toNum(v: Foo) { return 1; }\nexport { Foo as Bar };\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: toNum}) x!: number;\n}\n" + "test.ts": "import { Directive, ViewChild } from '@angular/core';\nimport * as core from '@angular/core';\n@Directive({ selector: '[d]', queries: { foo: new ViewChild('x') } })\nexport class D { foo = core.viewChild('x'); }\n", + "other.ts": "export function input(...a: any[]): any { return null; }\nexport namespace input { export function required(...a: any[]): any { return null; } }\nexport function model(...a: any[]): any { return null; }\nexport function output(...a: any[]): any { return null; }\nexport function outputFromObservable(...a: any[]): any { return null; }\nexport function viewChild(...a: any[]): any { return null; }\nexport function viewChildren(...a: any[]): any { return null; }\nexport function contentChild(...a: any[]): any { return null; }\nexport function contentChildren(...a: any[]): any { return null; }\n" }, "diagnostics": [ - "Symbol must be exported in order to be used as the type of an Input transform function" + "Query is declared multiple times. \"@Directive\" declares a query for the same property." ], - "diagnosticSpans": [[119, 122]], "classes": {}, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [[139, 157]] }, { - "name": "probe: transform-interfaceExportDefault", + "name": "probe: initializerApi-viewChildRequiredOtherModuleCast", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\ninterface Foo {}\nexport function toNum(v: Foo) { return 1; }\nexport default Foo;\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: toNum}) x!: number;\n}\n" + "test.ts": "import { Directive, ViewChild } from '@angular/core';\nimport { viewChild } from './other';\n@Directive({ selector: '[d]', queries: { foo: new ViewChild('x') } })\nexport class D { foo = (viewChild as any).required('x'); }\n", + "other.ts": "export function input(...a: any[]): any { return null; }\nexport namespace input { export function required(...a: any[]): any { return null; } }\nexport function model(...a: any[]): any { return null; }\nexport function output(...a: any[]): any { return null; }\nexport function outputFromObservable(...a: any[]): any { return null; }\nexport function viewChild(...a: any[]): any { return null; }\nexport function viewChildren(...a: any[]): any { return null; }\nexport function contentChild(...a: any[]): any { return null; }\nexport function contentChildren(...a: any[]): any { return null; }\n" + }, + "diagnostics": [], + "classes": { + "D": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery([\"x\"],5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.foo=_t.first);}}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: initializerApi-contentChildRequiredCoreNamespace", + "origin": "probe", + "files": { + "test.ts": "import { Directive, ContentChild } from '@angular/core';\nimport * as core from '@angular/core';\n@Directive({ selector: '[d]', queries: { foo: new ContentChild('x') } })\nexport class D { foo = core.contentChild.required('x'); }\n", + "other.ts": "export function input(...a: any[]): any { return null; }\nexport namespace input { export function required(...a: any[]): any { return null; } }\nexport function model(...a: any[]): any { return null; }\nexport function output(...a: any[]): any { return null; }\nexport function outputFromObservable(...a: any[]): any { return null; }\nexport function viewChild(...a: any[]): any { return null; }\nexport function viewChildren(...a: any[]): any { return null; }\nexport function contentChild(...a: any[]): any { return null; }\nexport function contentChildren(...a: any[]): any { return null; }\n" }, "diagnostics": [ - "Symbol must be exported in order to be used as the type of an Input transform function" + "Query is declared multiple times. \"@Directive\" declares a query for the same property." ], - "diagnosticSpans": [[108, 111]], "classes": {}, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [[142, 163]] }, { - "name": "probe: transform-classExportedLater", + "name": "probe: queries-member-ViewChildren-emitDistinctChangesOnly-constFalse", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nclass Foo {}\nexport function toNum(v: Foo) { return 1; }\nexport { Foo };\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: toNum}) x!: number;\n}\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nconst FLAG = false;\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChildren('x', {emitDistinctChangesOnly: FLAG}) q!: any;\n}\n" }, "diagnostics": [], "diagnosticSpans": [], - "classes": { - "Dir": { - "inputs": "{x:[2,\"x\",\"x\",toNum]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "classes": { + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery([\"x\"],1);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.q=_t);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: transform-classExportedAs", + "name": "probe: queries-member-ViewChildren-emitDistinctChangesOnly-constTrue", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nclass C {}\nexport { C as D };\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: (v: C) => 1}) x!: number;\n}\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nconst FLAG = true;\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChildren('x', {emitDistinctChangesOnly: FLAG}) q!: any;\n}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { - "Dir": { - "inputs": "{x:[2,\"x\",\"x\",(v)=>1]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery([\"x\"],5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.q=_t);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: transform-enumExportedLater", + "name": "probe: queries-member-ViewChildren-emitDistinctChangesOnly-string", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nenum E { A }\nexport { E };\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: (v: E) => 1}) x!: number;\n}\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChildren('x', {emitDistinctChangesOnly: 'yes'}) q!: any;\n}\n" }, - "diagnostics": [], - "diagnosticSpans": [], - "classes": { - "Dir": { - "inputs": "{x:[2,\"x\",\"x\",(v)=>1]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "diagnostics": [ + "@ViewChildren options.emitDistinctChangesOnly must be a boolean Value is of type 'string'." + ], + "diagnosticSpans": [[314, 319]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: queries-member-ViewChildren-emitDistinctChangesOnly-constString", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nconst FLAG = 'yes';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChildren('x', {emitDistinctChangesOnly: FLAG}) q!: any;\n}\n" }, + "diagnostics": [ + "@ViewChildren options.emitDistinctChangesOnly must be a boolean Value is of type 'string'." + ], + "diagnosticSpans": [[334, 338]], + "classes": {}, "dtsImports": [] }, { - "name": "probe: transform-classExportDefault", + "name": "probe: queries-member-ViewChildren-emitDistinctChangesOnly-not", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nexport default class Foo {}\nexport function toNum(v: Foo) { return 1; }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: toNum}) x!: number;\n}\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChildren('x', {emitDistinctChangesOnly: !0}) q!: any;\n}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { - "Dir": { - "inputs": "{x:[2,\"x\",\"x\",toNum]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery([\"x\"],5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.q=_t);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: transform-classExportDefaultLater", + "name": "probe: queries-member-ContentChildren-emitDistinctChangesOnly-constFalse", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nclass Foo {}\nexport function toNum(v: Foo) { return 1; }\nexport default Foo;\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: toNum}) x!: number;\n}\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nconst FLAG = false;\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ContentChildren('x', {emitDistinctChangesOnly: FLAG}) q!: any;\n}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { - "Dir": { - "inputs": "{x:[2,\"x\",\"x\",toNum]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "Cmp": { + "contentQueries": "{if(rf&1){i0.ɵɵcontentQuery(dirIndex,[\"x\"],0);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.q=_t);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: transform-classTypeParam", + "name": "probe: queries-member-ContentChildren-emitDistinctChangesOnly-constTrue", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: (v: Tp) => 1}) x!: number;\n}\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nconst FLAG = true;\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ContentChildren('x', {emitDistinctChangesOnly: FLAG}) q!: any;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Cmp": { + "contentQueries": "{if(rf&1){i0.ɵɵcontentQuery(dirIndex,[\"x\"],4);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.q=_t);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" + } }, - "diagnostics": [ - "Symbol must be exported in order to be used as the type of an Input transform function" - ], - "diagnosticSpans": [[144, 146]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: transform-classTypeParamShadowsExported", + "name": "probe: queries-member-ContentChildren-emitDistinctChangesOnly-string", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nexport interface Foo {}\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: (v: Foo) => 1}) x!: number;\n}\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ContentChildren('x', {emitDistinctChangesOnly: 'yes'}) q!: any;\n}\n" }, "diagnostics": [ - "Symbol must be exported in order to be used as the type of an Input transform function" + "@ContentChildren options.emitDistinctChangesOnly must be a boolean Value is of type 'string'." ], - "diagnosticSpans": [[169, 172]], + "diagnosticSpans": [[317, 322]], "classes": {}, "dtsImports": [] }, { - "name": "probe: transform-mappedTypeParam", + "name": "probe: queries-member-ContentChildren-emitDistinctChangesOnly-constString", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: (v: {[K in 'a' | 'b']: K}) => 1}) x!: number;\n}\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nconst FLAG = 'yes';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ContentChildren('x', {emitDistinctChangesOnly: FLAG}) q!: any;\n}\n" }, "diagnostics": [ - "Symbol must be exported in order to be used as the type of an Input transform function" + "@ContentChildren options.emitDistinctChangesOnly must be a boolean Value is of type 'string'." ], - "diagnosticSpans": [[140, 161]], + "diagnosticSpans": [[337, 341]], "classes": {}, "dtsImports": [] }, { - "name": "probe: transform-inferTypeParam", + "name": "probe: queries-member-ContentChildren-emitDistinctChangesOnly-not", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: (v: string extends infer U ? U : never) => 1}) x!: number;\n}\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ContentChildren('x', {emitDistinctChangesOnly: !0}) q!: any;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Cmp": { + "contentQueries": "{if(rf&1){i0.ɵɵcontentQuery(dirIndex,[\"x\"],4);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.q=_t);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" + } }, - "diagnostics": [ - "Symbol must be exported in order to be used as the type of an Input transform function" - ], - "diagnosticSpans": [[140, 174]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: transform-fnTypeParam", + "name": "probe: queries-member-ContentChildren-descendants-constFalse", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: (v: (x: T) => T) => 1}) x!: number;\n}\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nconst FLAG = false;\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ContentChildren('x', {descendants: FLAG}) q!: any;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Cmp": { + "contentQueries": "{if(rf&1){i0.ɵɵcontentQuery(dirIndex,[\"x\"],4);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.q=_t);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" + } }, - "diagnostics": [ - "Symbol must be exported in order to be used as the type of an Input transform function" - ], - "diagnosticSpans": [[140, 154]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: transform-fnTypeParamShadowsExported", + "name": "probe: queries-member-ContentChildren-descendants-constTrue", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nexport interface Foo {}\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: (v: (x: Foo) => void) => 1}) x!: number;\n}\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nconst FLAG = true;\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ContentChildren('x', {descendants: FLAG}) q!: any;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Cmp": { + "contentQueries": "{if(rf&1){i0.ɵɵcontentQuery(dirIndex,[\"x\"],5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.q=_t);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" + } }, - "diagnostics": [ - "Symbol must be exported in order to be used as the type of an Input transform function" - ], - "diagnosticSpans": [[164, 185]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: transform-methodSigTypeParam", + "name": "probe: queries-member-ContentChildren-descendants-string", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: (v: {m(x: T): void}) => 1}) x!: number;\n}\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ContentChildren('x', {descendants: 'yes'}) q!: any;\n}\n" }, "diagnostics": [ - "Symbol must be exported in order to be used as the type of an Input transform function" + "@ContentChildren options.descendants must be a boolean Value is of type 'string'." ], - "diagnosticSpans": [[140, 158]], + "diagnosticSpans": [[305, 310]], "classes": {}, "dtsImports": [] }, { - "name": "probe: transform-conditionalFalseBranchOuter", + "name": "probe: queries-member-ContentChildren-descendants-constString", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nexport interface Foo {}\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: (v: string extends infer U ? U : Foo) => 1}) x!: number;\n}\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nconst FLAG = 'yes';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ContentChildren('x', {descendants: FLAG}) q!: any;\n}\n" }, "diagnostics": [ - "Symbol must be exported in order to be used as the type of an Input transform function" + "@ContentChildren options.descendants must be a boolean Value is of type 'string'." ], - "diagnosticSpans": [[164, 196]], + "diagnosticSpans": [[325, 329]], "classes": {}, "dtsImports": [] }, { - "name": "probe: transform-declareGlobal", + "name": "probe: queries-member-ContentChildren-descendants-not", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\ndeclare global { interface Gl { a: string } }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: (v: Gl) => 1}) x!: number;\n}\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ContentChildren('x', {descendants: !0}) q!: any;\n}\n" }, - "diagnostics": [ - "Symbol must be exported in order to be used as the type of an Input transform function" - ], - "classes": {}, - "dtsImports": [], - "skip": "a type declared in `declare global` is a new global unless it augments one of TypeScript's lib types, which ngtsc resolves to the lib file; oxc doesn't read the lib files, so it can't tell the two apart and accepts both" - }, - { - "name": "probe: transform-globalNumber", - "origin": "probe", - "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: Number}) x!: number;\n}\n" + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Cmp": { + "contentQueries": "{if(rf&1){i0.ɵɵcontentQuery(dirIndex,[\"x\"],5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.q=_t);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" + } }, - "diagnostics": ["Input transform must be a function Value is a reference to 'Number'."], - "classes": {}, - "dtsImports": [], - "skip": "ngtsc reports this at the transform's declaration in TypeScript's lib.es5.d.ts, a file oxc doesn't read (so this snapshot's generator, which keeps test.ts diagnostics, records none); oxc reports the same message on the expression" + "dtsImports": [] }, { - "name": "probe: transform-globalParseInt", + "name": "probe: queries-member-ViewChildren-descendants-constFalse", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: parseInt}) x!: number;\n}\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nconst FLAG = false;\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChildren('x', {descendants: FLAG}) q!: any;\n}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { - "Dir": { - "inputs": "{x:[2,\"x\",\"x\",parseInt]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery([\"x\"],4);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.q=_t);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: transform-satisfiesFn", + "name": "probe: queries-member-ViewChildren-descendants-constTrue", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nexport function toNum(v: string) { return 1; }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: toNum satisfies Function}) x!: number;\n}\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nconst FLAG = true;\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChildren('x', {descendants: FLAG}) q!: any;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery([\"x\"],5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.q=_t);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" + } }, - "diagnostics": [ - "Input transform must be a function Value could not be determined statically." - ], - "diagnosticSpans": [[183, 207]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: transform-namespaceFn", + "name": "probe: queries-member-ViewChildren-descendants-string", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nnamespace NS { export function f(v: string) { return 1; } }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: NS.f}) x!: number;\n}\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChildren('x', {descendants: 'yes'}) q!: any;\n}\n" }, "diagnostics": [ - "Input transform must be a function Value could not be determined statically." + "@ViewChildren options.descendants must be a boolean Value is of type 'string'." ], - "diagnosticSpans": [[196, 200]], + "diagnosticSpans": [[302, 307]], "classes": {}, "dtsImports": [] }, { - "name": "probe: transform-nsClash", + "name": "probe: queries-member-ViewChildren-descendants-constString", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nimport * as u from './util';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: u.toNum}) x!: number;\n static ngAcceptInputType_x: string;\n}\n", - "util.ts": "export function toNum(v: string) { return 1; }\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nconst FLAG = 'yes';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChildren('x', {descendants: FLAG}) q!: any;\n}\n" }, "diagnostics": [ - "Class cannot have both a transform function on Input x and a static member called ngAcceptInputType_x" + "@ViewChildren options.descendants must be a boolean Value is of type 'string'." ], + "diagnosticSpans": [[322, 326]], "classes": {}, - "dtsImports": [], - "skip": "ngtsc reports this at the transform's declaration in util.ts, a file oxc doesn't read (so this snapshot's generator, which keeps test.ts diagnostics, records none); oxc reports the same message on the expression" - }, - { - "name": "probe: transform-nsGeneric", - "origin": "probe", - "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\nimport * as u from './util';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: u.g}) x!: number;\n}\n", - "util.ts": "export function g(v: T) { return 1; }\n" - }, - "diagnostics": ["Input transform function cannot be generic Value is a reference to 'g'."], - "classes": {}, - "dtsImports": [], - "skip": "needs declarations from another file; oxc compiles one file at a time (imported consts, types and transforms are opaque)" + "dtsImports": [] }, { - "name": "probe: transform-coreNamespaceMembers", + "name": "probe: queries-member-ViewChildren-descendants-not", "origin": "probe", "files": { - "test.ts": "import * as core from '@angular/core';\n@core.Component({selector: 'c', template: '
'})\nexport class Cmp {\n @core.Input({transform: (v: string) => 1}) value!: number;\n @core.ViewChild('ref') ref: any;\n @core.Output() changed = new core.EventEmitter();\n @core.HostBinding('class.a') a = true;\n @core.HostListener('click') onClick() {}\n}\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChildren('x', {descendants: !0}) q!: any;\n}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { "Cmp": { - "inputs": "{value:[2,\"value\",\"value\",(v)=>1]}", - "outputs": "{changed:\"changed\"}", - "viewQuery": "{if(rf&1){i0.ɵɵviewQuery([\"ref\"],5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.ref=_t.first);}}", - "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery([\"x\"],5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.q=_t);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: transform-foreignNamespaceMembers", + "name": "probe: queries-member-ContentChild-descendants-constFalse", "origin": "probe", "files": { - "test.ts": "import {Component, Input} from '@angular/core';\nimport * as foreign from 'foreign-decorators';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @Input() real!: string;\n @foreign.Input({transform: 5}) value!: string;\n @foreign.ViewChild('ref') ref: any;\n @foreign.Output() changed: any;\n @foreign.HostBinding('class.a') a = true;\n @foreign.HostListener('click') onClick() {}\n}\n", - "node_modules/foreign-decorators/index.d.ts": "export declare function Input(o?: any): PropertyDecorator;\nexport declare function Output(): PropertyDecorator;\nexport declare function ViewChild(s: string): PropertyDecorator;\nexport declare function HostBinding(s: string): PropertyDecorator;\nexport declare function HostListener(s: string): MethodDecorator;\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nconst FLAG = false;\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ContentChild('x', {descendants: FLAG}) q!: any;\n}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { "Cmp": { - "inputs": "{real:\"real\"}", - "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" + "contentQueries": "{if(rf&1){i0.ɵɵcontentQuery(dirIndex,[\"x\"],4);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.q=_t.first);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: transform-localObjectNamespaceMember", + "name": "probe: queries-member-ContentChild-descendants-constTrue", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nconst other = { Input: (o?: any) => (t: any, k: string) => {} };\n@Directive({selector: '[d]'})\nexport class Dir {\n @other.Input({transform: 5}) x!: number;\n}\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nconst FLAG = true;\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ContentChild('x', {descendants: FLAG}) q!: any;\n}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { - "Dir": { - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "Cmp": { + "contentQueries": "{if(rf&1){i0.ɵɵcontentQuery(dirIndex,[\"x\"],5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.q=_t.first);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: transform-staticPropNoInit", - "origin": "probe", - "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nclass U { static c: (v: string) => number; }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: U.c}) x!: number;\n}\n" - }, - "diagnostics": ["Input transform must be a function Value is a reference to 'c'."], - "diagnosticSpans": [[76, 108]], - "classes": {}, - "dtsImports": [] - }, - { - "name": "probe: transform-staticSetter", + "name": "probe: queries-member-ContentChild-descendants-string", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nclass U { static set c(v: any) {} }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: U.c}) x!: number;\n}\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ContentChild('x', {descendants: 'yes'}) q!: any;\n}\n" }, - "diagnostics": ["Input transform must be a function Value is a reference to 'c'."], - "diagnosticSpans": [[76, 99]], + "diagnostics": [ + "@ContentChild options.descendants must be a boolean Value is of type 'string'." + ], + "diagnosticSpans": [[302, 307]], "classes": {}, "dtsImports": [] }, { - "name": "probe: transform-globalMathRound", + "name": "probe: queries-member-ContentChild-descendants-constString", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: Math.round}) x!: number;\n}\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nconst FLAG = 'yes';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ContentChild('x', {descendants: FLAG}) q!: any;\n}\n" }, "diagnostics": [ - "Input transform must be a function Value could not be determined statically." + "@ContentChild options.descendants must be a boolean Value is of type 'string'." ], - "diagnosticSpans": [[136, 146]], + "diagnosticSpans": [[322, 326]], "classes": {}, "dtsImports": [] }, { - "name": "probe: transform-globalJsonParse", + "name": "probe: queries-member-ContentChild-descendants-not", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: JSON.parse}) x!: number;\n}\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ContentChild('x', {descendants: !0}) q!: any;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Cmp": { + "contentQueries": "{if(rf&1){i0.ɵɵcontentQuery(dirIndex,[\"x\"],5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.q=_t.first);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" + } }, - "diagnostics": [ - "Input transform must be a function Value could not be determined statically." - ], - "diagnosticSpans": [[136, 146]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: transform-globalString", + "name": "probe: queries-member-ViewChild-static-constFalse", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: String}) x!: number;\n}\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nconst FLAG = false;\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChild('x', {static: FLAG}) q!: any;\n}\n" }, - "diagnostics": ["Input transform must be a function Value is a reference to 'String'."], - "classes": {}, - "dtsImports": [], - "skip": "ngtsc reports this at the transform's declaration in TypeScript's lib.es5.d.ts, a file oxc doesn't read (so this snapshot's generator, which keeps test.ts diagnostics, records none); oxc reports the same message on the expression" + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery([\"x\"],5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.q=_t.first);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" + } + }, + "dtsImports": [] }, { - "name": "probe: transform-globalIsNaN", + "name": "probe: queries-member-ViewChild-static-constTrue", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: isNaN}) x!: number;\n}\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nconst FLAG = true;\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChild('x', {static: FLAG}) q!: any;\n}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { - "Dir": { - "inputs": "{x:[2,\"x\",\"x\",isNaN]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery([\"x\"],7);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.q=_t.first);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: transform-globalEscape", + "name": "probe: queries-member-ViewChild-static-string", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChild('x', {static: 'yes'}) q!: any;\n}\n" + }, + "diagnostics": ["@ViewChild options.static must be a boolean Value is of type 'string'."], + "diagnosticSpans": [[280, 283]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: queries-member-ViewChild-static-constString", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nconst FLAG = 'yes';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChild('x', {static: FLAG}) q!: any;\n}\n" + }, + "diagnostics": ["@ViewChild options.static must be a boolean Value is of type 'string'."], + "diagnosticSpans": [[300, 303]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: queries-member-ViewChild-static-not", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: escape}) x!: number;\n}\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChild('x', {static: !0}) q!: any;\n}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { - "Dir": { - "inputs": "{x:[2,\"x\",\"x\",escape]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery([\"x\"],7);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.q=_t.first);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: transform-globalEval", + "name": "probe: queries-member-ContentChild-static-constFalse", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: eval}) x!: number;\n}\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nconst FLAG = false;\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ContentChild('x', {static: FLAG}) q!: any;\n}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { - "Dir": { - "inputs": "{x:[2,\"x\",\"x\",eval]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "Cmp": { + "contentQueries": "{if(rf&1){i0.ɵɵcontentQuery(dirIndex,[\"x\"],5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.q=_t.first);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: transform-globalDecodeURI", + "name": "probe: queries-member-ContentChild-static-constTrue", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: decodeURI}) x!: number;\n}\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nconst FLAG = true;\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ContentChild('x', {static: FLAG}) q!: any;\n}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { - "Dir": { - "inputs": "{x:[2,\"x\",\"x\",decodeURI]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "Cmp": { + "contentQueries": "{if(rf&1){i0.ɵɵcontentQuery(dirIndex,[\"x\"],7);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.q=_t.first);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: transform-globalNumberClash", + "name": "probe: queries-member-ContentChild-static-string", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: Number}) x!: number;\n static ngAcceptInputType_x: string;\n}\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ContentChild('x', {static: 'yes'}) q!: any;\n}\n" }, - "diagnostics": ["Input transform must be a function Value is a reference to 'Number'."], + "diagnostics": ["@ContentChild options.static must be a boolean Value is of type 'string'."], + "diagnosticSpans": [[283, 286]], "classes": {}, - "dtsImports": [], - "skip": "ngtsc reports this at the transform's declaration in TypeScript's lib.es5.d.ts, a file oxc doesn't read (so this snapshot's generator, which keeps test.ts diagnostics, records none); oxc reports the same message on the expression" + "dtsImports": [] }, { - "name": "probe: transform-globalParseIntStatic", + "name": "probe: queries-member-ContentChild-static-constString", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: parseInt}) x!: number;\n static ngAcceptInputType_y: string;\n}\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nconst FLAG = 'yes';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ContentChild('x', {static: FLAG}) q!: any;\n}\n" + }, + "diagnostics": ["@ContentChild options.static must be a boolean Value is of type 'string'."], + "diagnosticSpans": [[303, 306]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: queries-member-ContentChild-static-not", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ContentChild('x', {static: !0}) q!: any;\n}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { - "Dir": { - "inputs": "{x:[2,\"x\",\"x\",parseInt]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "Cmp": { + "contentQueries": "{if(rf&1){i0.ɵɵcontentQuery(dirIndex,[\"x\"],7);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.q=_t.first);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: transform-instanceClash", + "name": "probe: queries-member-static-number", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: (v: string) => 1}) x!: number;\n ngAcceptInputType_x: string;\n}\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChild('x', {static: 1}) q!: any;\n}\n" }, - "diagnostics": [], - "diagnosticSpans": [], - "classes": { - "Dir": { - "inputs": "{x:[2,\"x\",\"x\",(v)=>1]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "diagnostics": ["@ViewChild options.static must be a boolean Value is of type 'number'."], + "diagnosticSpans": [[280, 283]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: queries-member-static-null", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChild('x', {static: null}) q!: any;\n}\n" }, + "diagnostics": ["@ViewChild options.static must be a boolean Value is of type 'null'."], + "diagnosticSpans": [[280, 283]], + "classes": {}, "dtsImports": [] }, { - "name": "probe: eval-inputsMathPI", + "name": "probe: queries-member-static-undefined", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]', inputs: [Math.PI]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChild('x', {static: undefined}) q!: any;\n}\n" }, - "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." - ], - "diagnosticSpans": [[103, 112]], + "diagnostics": ["@ViewChild options.static must be a boolean Value is of type 'undefined'."], + "diagnosticSpans": [[280, 283]], "classes": {}, "dtsImports": [] }, { - "name": "probe: eval-inputsMath", + "name": "probe: queries-member-static-unknownIdent", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]', inputs: [Math]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\ndeclare const someGlobal: boolean;\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChild('x', {static: someGlobal}) q!: any;\n}\n" }, "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value is a reference to 'Math'." + "@ViewChild options.static must be a boolean Value is a reference to 'someGlobal'." ], - "diagnosticSpans": [[103, 109]], + "diagnosticSpans": [[315, 318]], "classes": {}, "dtsImports": [] }, { - "name": "probe: eval-inputsNumberMax", + "name": "probe: queries-member-desc-letUninit", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]', inputs: [{name: Number.MAX_VALUE}]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nlet FLAG;\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChildren('x', {descendants: FLAG}) q!: any;\n}\n" }, "diagnostics": [ - "Value at position 0 of @Directive.inputs array must have a \"name\" property Value could not be determined statically." + "@ViewChildren options.descendants must be a boolean Value is of type 'undefined'." ], - "diagnosticSpans": [[103, 129]], + "diagnosticSpans": [[312, 316]], "classes": {}, "dtsImports": [] }, { - "name": "probe: eval-inputsObjKeys", + "name": "probe: queries-member-static-ternary", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\n@Directive({selector: '[d]', inputs: [Object.keys]})\nexport class Dir {}\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nconst A = 1;\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChild('x', {static: A ? true : false}) q!: any;\n}\n" }, - "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." - ], - "diagnosticSpans": [[103, 116]], + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery([\"x\"],7);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.q=_t.first);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: queries-member-static-enum", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nenum E { A }\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChild('x', {static: E.A}) q!: any;\n}\n" + }, + "diagnostics": ["@ViewChild options.static must be a boolean Value is of type 'E'."], + "diagnosticSpans": [[293, 296]], "classes": {}, "dtsImports": [] }, { - "name": "probe: transform-constMathRound", + "name": "probe: queries-member-static-predTypeRef", "origin": "probe", "files": { - "test.ts": "import {Directive, Input, booleanAttribute} from '@angular/core';\nconst r = Math.round;\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: r}) x!: number;\n}\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChild(ElementRef, {static: 'no'}) q!: any;\n}\n" }, - "diagnostics": [ - "Input transform must be a function Value could not be determined statically." - ], - "diagnosticSpans": [[158, 159]], + "diagnostics": ["@ViewChild options.static must be a boolean Value is of type 'string'."], + "diagnosticSpans": [[280, 290]], "classes": {}, "dtsImports": [] }, { - "name": "probe: scope-shadow", + "name": "probe: queries-member-optsConst", "origin": "probe", "files": { - "test.ts": "import { Directive } from '@angular/core';\nexport function toBool(v: unknown): boolean { return !!v; }\nfunction make(name: string, toBool: any) { return [{ name, transform: toBool }]; }\n@Directive({ selector: '[d]', inputs: make('x', (v: string) => v.length) })\nexport class D { x: any; }\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nconst OPTS = {static: true};\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChild('x', OPTS) q!: any;\n}\n" }, "diagnostics": [ - "Input transform must be a function Value could not be determined statically." + "@ViewChild options must be an object literal. Find more at https://next.angular.dev/errors/NG1001" ], + "diagnosticSpans": [[314, 318]], "classes": {}, - "dtsImports": [], - "diagnosticSpans": [[173, 179]] + "dtsImports": [] }, { - "name": "probe: scope-paramMember", + "name": "probe: queries-member-optsParens", "origin": "probe", "files": { - "test.ts": "import { Directive } from '@angular/core';\nexport function toBool(v: unknown): boolean { return !!v; }\nconst T = { toBool };\nfunction make(name: string, transform: any) { return [{ name, transform }]; }\n@Directive({ selector: '[d]', inputs: make('x', T.toBool) })\nexport class D { x: any; }\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChild('x', ({static: true})) q!: any;\n}\n" }, "diagnostics": [], + "diagnosticSpans": [], "classes": { - "D": { - "inputs": "{x:[2,\"x\",\"x\",toBool]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;", - "dts:ngAcceptInputType_x": "staticngAcceptInputType_x:unknown;" + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery([\"x\"],7);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.q=_t.first);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" } }, - "dtsImports": [], - "diagnosticSpans": [] + "dtsImports": [] }, { - "name": "probe: scope-memberOpts", + "name": "probe: queries-member-optsAs", "origin": "probe", "files": { - "test.ts": "import { Directive, Input, booleanAttribute } from '@angular/core';\nfunction opts(t: any) { return { transform: t }; }\n@Directive({ selector: '[d]' })\nexport class D { @Input(opts(booleanAttribute)) x: any; }\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChild('x', {static: true} as any) q!: any;\n}\n" }, "diagnostics": [], + "diagnosticSpans": [], "classes": { - "D": { - "inputs": "{x:[2,\"x\",\"x\",booleanAttribute]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;", - "dts:ngAcceptInputType_x": "staticngAcceptInputType_x:unknown;" + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery([\"x\"],7);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.q=_t.first);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" } }, - "dtsImports": [], - "diagnosticSpans": [] + "dtsImports": [] }, { - "name": "probe: scope-genericHelper", + "name": "probe: queries-member-optsSpread", "origin": "probe", "files": { - "test.ts": "import { Directive } from '@angular/core';\nfunction make(n: string) { return [{ name: n, transform: (v: T) => v }]; }\n@Directive({ selector: '[d]', inputs: make('x') })\nexport class D { x: any; }\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nconst OPTS = {static: true};\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChild('x', {...OPTS}) q!: any;\n}\n" }, - "diagnostics": [ - "Symbol must be exported in order to be used as the type of an Input transform function" - ], - "classes": {}, - "dtsImports": [], - "diagnosticSpans": [[107, 108]] + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery([\"x\"],5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.q=_t.first);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" + } + }, + "dtsImports": [] }, { - "name": "probe: scope-objParamFn", + "name": "probe: queries-member-optsSpreadThen", "origin": "probe", "files": { - "test.ts": "import { Directive } from '@angular/core';\nexport function toBool(v: unknown): boolean { return !!v; }\nfunction make(o: any) { return [{ name: 'x', transform: o.t }]; }\n@Directive({ selector: '[d]', inputs: make({ t: toBool }) })\nexport class D { x: any; }\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nconst OPTS = {static: true, descendants: true};\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChildren('x', {...OPTS, descendants: false}) q!: any;\n}\n" }, "diagnostics": [], + "diagnosticSpans": [], "classes": { - "D": { - "inputs": "{x:[2,\"x\",\"x\",toBool]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;", - "dts:ngAcceptInputType_x": "staticngAcceptInputType_x:unknown;" + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery([\"x\"],4);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.q=_t);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" } }, - "dtsImports": [], - "diagnosticSpans": [] + "dtsImports": [] }, { - "name": "probe: scope-paramArrowNamed", + "name": "probe: queries-member-optsString", "origin": "probe", "files": { - "test.ts": "import { Directive } from '@angular/core';\nfunction make(name: string, t: any) { return [{ name, transform: t }]; }\n@Directive({ selector: '[d]', inputs: make('x', (v: string) => v.length) })\nexport class D { x: any; }\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChild('x', 'str') q!: any;\n}\n" }, "diagnostics": [ - "Input transform must be a function Value could not be determined statically." + "@ViewChild options must be an object literal. Find more at https://next.angular.dev/errors/NG1001" ], + "diagnosticSpans": [[285, 290]], "classes": {}, - "dtsImports": [], - "diagnosticSpans": [[108, 109]] + "dtsImports": [] }, { - "name": "probe: scope-memberOptsArrow", + "name": "probe: queries-member-readConst", "origin": "probe", "files": { - "test.ts": "import { Directive, Input } from '@angular/core';\nfunction opts(transform: any) { return { transform }; }\n@Directive({ selector: '[d]' })\nexport class D { @Input(opts((v: string) => v.length)) x: any; }\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nconst R = ElementRef;\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChild('x', {read: R}) q!: any;\n}\n" }, "diagnostics": [], + "diagnosticSpans": [], "classes": { - "D": { - "inputs": "{x:[2,\"x\",\"x\",(v)=>v.length]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery([\"x\"],5,R);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.q=_t.first);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" } }, - "dtsImports": [], - "diagnosticSpans": [] + "dtsImports": [] }, { - "name": "probe: scope-this", + "name": "probe: queries-member-readNumber", "origin": "probe", "files": { - "test.ts": "import { Directive, booleanAttribute } from '@angular/core';\nclass H { static make() { return [{ name: 'x', transform: this.t }]; } }\n@Directive({ selector: '[d]', inputs: H.make() })\nexport class D { x: any; }\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChild('x', {read: 1}) q!: any;\n}\n" }, - "diagnostics": [ - "Input transform must be a function Value could not be determined statically." - ], - "classes": {}, - "dtsImports": [], - "diagnosticSpans": [[119, 125]] + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery([\"x\"],5,1);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.q=_t.first);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" + } + }, + "dtsImports": [] }, { - "name": "probe: scope-arguments", + "name": "probe: queries-member-quotedKey", "origin": "probe", "files": { - "test.ts": "import { Directive, booleanAttribute } from '@angular/core';\nfunction make() { return [{ name: 'x', transform: arguments[0] }]; }\n@Directive({ selector: '[d]', inputs: make(booleanAttribute) })\nexport class D { x: any; }\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChildren('x', {'descendants': false, \"emitDistinctChangesOnly\": false}) q!: any;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery([\"x\"],0);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.q=_t);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: queries-member-computedKey", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChildren('x', {['descendants']: false}) q!: any;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery([\"x\"],5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.q=_t);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: queries-member-shorthand", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nconst descendants = false;\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChildren('x', {descendants}) q!: any;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery([\"x\"],4);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.q=_t);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: queries-member-multiErr", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChildren('x', {descendants: 'a', emitDistinctChangesOnly: 'b'}) q!: any;\n @ViewChild('x', {static: 'c'}) r!: any;\n}\n" }, "diagnostics": [ - "Input transform must be a function Value could not be determined statically." + "@ViewChildren options.descendants must be a boolean Value is of type 'string'." ], + "diagnosticSpans": [[302, 305]], "classes": {}, - "dtsImports": [], - "diagnosticSpans": [[111, 123]] + "dtsImports": [] }, { - "name": "probe: scope-defaultArrow", + "name": "probe: queries-member-setter", "origin": "probe", "files": { - "test.ts": "import { Directive } from '@angular/core';\nfunction make(n: string, transform: any = (v: string) => v.length) { return [{ name: n, transform }]; }\n@Directive({ selector: '[d]', inputs: make('x') })\nexport class D { x: any; }\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nconst FLAG = false;\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChildren('x', {emitDistinctChangesOnly: FLAG}) set q(v: any) {}\n}\n" }, "diagnostics": [], + "diagnosticSpans": [], "classes": { - "D": { - "inputs": "{x:[2,\"x\",\"x\",(v)=>v.length]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery([\"x\"],1);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.q=_t);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" } }, - "dtsImports": [], - "diagnosticSpans": [] + "dtsImports": [] }, { - "name": "probe: shorthand-constArrow", + "name": "probe: queries-options-ConstFalse", "origin": "probe", "files": { - "test.ts": "import { Directive, Input } from '@angular/core';\nconst transform = (v: string) => v.length;\n@Directive({ selector: '[d]', inputs: [{ name: 'x', transform }] })\nexport class D { x: any; }\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nconst FLAG = false;\n@Component({selector: 'c', template: '
', queries: {q: new ViewChildren('x', {emitDistinctChangesOnly: FLAG})}})\nexport class Cmp {\n q!: any;\n}\n" }, "diagnostics": [], + "diagnosticSpans": [], "classes": { - "D": { - "inputs": "{x:[2,\"x\",\"x\",(v)=>v.length]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery([\"x\"],1);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.q=_t);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" } }, - "dtsImports": [], - "diagnosticSpans": [] + "dtsImports": [] }, { - "name": "probe: shorthand-constArrowNamedSame", + "name": "probe: queries-options-OptsConst", "origin": "probe", "files": { - "test.ts": "import { Directive, Input } from '@angular/core';\nconst transform = (v: string) => v.length;\n@Directive({ selector: '[d]', inputs: [{ name: 'x', transform: transform }] })\nexport class D { x: any; }\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nconst OPTS = {static: true};\n@Component({selector: 'c', template: '
', queries: {q: new ViewChild('x', OPTS)}})\nexport class Cmp {\n q!: any;\n}\n" }, "diagnostics": [ - "Input transform must be a function Value could not be determined statically." + "@ViewChild options must be an object literal. Find more at https://next.angular.dev/errors/NG1001" ], + "diagnosticSpans": [[308, 312]], "classes": {}, - "dtsImports": [], - "diagnosticSpans": [[156, 165]] + "dtsImports": [] }, { - "name": "probe: shorthand-constArrowNamedOther", + "name": "probe: queries-options-StaticString", "origin": "probe", "files": { - "test.ts": "import { Directive, Input } from '@angular/core';\nconst t = (v: string) => v.length;\n@Directive({ selector: '[d]', inputs: [{ name: 'x', transform: t }] })\nexport class D { x: any; }\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\n@Component({selector: 'c', template: '
', queries: {q: new ViewChild('x', {static: 'c'})}})\nexport class Cmp {\n q!: any;\n}\n" + }, + "diagnostics": ["@ViewChild options.static must be a boolean Value is of type 'string'."], + "diagnosticSpans": [[274, 277]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: queries-predicate-queriesFnExpr", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\n@Component({selector: 'c', template: '
', queries: {item: new ViewChild(function Token() {})}})\nexport class Cmp {\n item: any;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery(functionToken(){},5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.item=_t.first);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" + } }, - "diagnostics": [ - "Input transform must be a function Value could not be determined statically." - ], - "classes": {}, - "dtsImports": [], - "diagnosticSpans": [[148, 149]] + "dtsImports": [] }, { - "name": "probe: shorthand-constFunctionExpression", + "name": "probe: queries-predicate-queriesArrow", "origin": "probe", "files": { - "test.ts": "import { Directive, Input } from '@angular/core';\nconst transform = function (v: string) { return v.length; };\n@Directive({ selector: '[d]', inputs: [{ name: 'x', transform }] })\nexport class D { x: any; }\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\n@Component({selector: 'c', template: '
', queries: {item: new ViewChild(() => ElementRef)}})\nexport class Cmp {\n item: any;\n}\n" }, "diagnostics": [], + "diagnosticSpans": [], "classes": { - "D": { - "inputs": "{x:[2,\"x\",\"x\",function(v){returnv.length;}]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery(()=>ElementRef,5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.item=_t.first);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" } }, - "dtsImports": [], - "diagnosticSpans": [] + "dtsImports": [] }, { - "name": "probe: shorthand-letArrow", + "name": "probe: queries-predicate-queriesCall", "origin": "probe", "files": { - "test.ts": "import { Directive, Input } from '@angular/core';\nlet transform = (v: string) => v.length;\n@Directive({ selector: '[d]', inputs: [{ name: 'x', transform }] })\nexport class D { x: any; }\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nfunction mk(): any { return ElementRef; }\n@Component({selector: 'c', template: '
', queries: {item: new ViewChild(mk())}})\nexport class Cmp {\n item: any;\n}\n" }, "diagnostics": [], + "diagnosticSpans": [], "classes": { - "D": { - "inputs": "{x:[2,\"x\",\"x\",(v)=>v.length]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery(mk(),5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.item=_t.first);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" } }, - "dtsImports": [], - "diagnosticSpans": [] + "dtsImports": [] }, { - "name": "probe: shorthand-constArrowTyped", + "name": "probe: queries-predicate-queriesCallArg", "origin": "probe", "files": { - "test.ts": "import { Directive, Input } from '@angular/core';\nconst transform: (v: string) => number = (v: string) => v.length;\n@Directive({ selector: '[d]', inputs: [{ name: 'x', transform }] })\nexport class D { x: any; }\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\ndeclare function mk(v: any): any;\n@Component({selector: 'c', template: '
', queries: {item: new ViewChild(mk(1))}})\nexport class Cmp {\n item: any;\n}\n" }, "diagnostics": [], + "diagnosticSpans": [], "classes": { - "D": { - "inputs": "{x:[2,\"x\",\"x\",(v)=>v.length]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery(mk(1),5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.item=_t.first);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" } }, - "dtsImports": [], - "diagnosticSpans": [] + "dtsImports": [] }, { - "name": "probe: shorthand-constArrowParenthesized", + "name": "probe: queries-predicate-queriesAs", "origin": "probe", "files": { - "test.ts": "import { Directive, Input } from '@angular/core';\nconst transform = ((v: string) => v.length);\n@Directive({ selector: '[d]', inputs: [{ name: 'x', transform }] })\nexport class D { x: any; }\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\n@Component({selector: 'c', template: '
', queries: {item: new ViewChild(ElementRef as any)}})\nexport class Cmp {\n item: any;\n}\n" }, - "diagnostics": [ - "Input transform must be a function Value could not be determined statically." - ], - "classes": {}, - "dtsImports": [], - "diagnosticSpans": [[68, 93]] + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery(ElementRef,5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.item=_t.first);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" + } + }, + "dtsImports": [] }, { - "name": "probe: shorthand-constArrowAs", + "name": "probe: queries-predicate-queriesMember", "origin": "probe", "files": { - "test.ts": "import { Directive, Input } from '@angular/core';\nconst transform = ((v: string) => v.length) as any;\n@Directive({ selector: '[d]', inputs: [{ name: 'x', transform }] })\nexport class D { x: any; }\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nconst T = {ref: ElementRef};\n@Component({selector: 'c', template: '
', queries: {item: new ViewChild(T.ref)}})\nexport class Cmp {\n item: any;\n}\n" }, - "diagnostics": [ - "Input transform must be a function Value could not be determined statically." - ], - "classes": {}, - "dtsImports": [], - "diagnosticSpans": [[68, 100]] + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery(T.ref,5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.item=_t.first);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" + } + }, + "dtsImports": [] }, { - "name": "probe: shorthand-constChain", + "name": "probe: queries-predicate-queriesGlobal", "origin": "probe", "files": { - "test.ts": "import { Directive, Input } from '@angular/core';\nconst a = (v: string) => v.length;\nconst transform = a;\n@Directive({ selector: '[d]', inputs: [{ name: 'x', transform }] })\nexport class D { x: any; }\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\n@Component({selector: 'c', template: '
', queries: {item: new ViewChild(window)}})\nexport class Cmp {\n item: any;\n}\n" }, - "diagnostics": [ - "Input transform must be a function Value could not be determined statically." - ], - "classes": {}, - "dtsImports": [], - "diagnosticSpans": [[103, 104]] + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery(window,5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.item=_t.first);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" + } + }, + "dtsImports": [] }, { - "name": "probe: shorthand-inConstObject", + "name": "probe: queries-predicate-queriesTemplate", "origin": "probe", "files": { - "test.ts": "import { Directive, Input } from '@angular/core';\nconst transform = (v: string) => v.length;\nconst X = { name: 'x', transform };\n@Directive({ selector: '[d]', inputs: [X] })\nexport class D { x: any; }\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\n@Component({selector: 'c', template: '
', queries: {item: new ViewChild(`x`)}})\nexport class Cmp {\n item: any;\n}\n" }, "diagnostics": [], + "diagnosticSpans": [], "classes": { - "D": { - "inputs": "{x:[2,\"x\",\"x\",(v)=>v.length]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery([\"x\"],5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.item=_t.first);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" } }, - "dtsImports": [], - "diagnosticSpans": [] + "dtsImports": [] }, { - "name": "probe: shorthand-constArrowUntyped", + "name": "probe: queries-predicate-queriesNumber", "origin": "probe", "files": { - "test.ts": "import { Directive, Input } from '@angular/core';\nconst transform = (v) => v;\n@Directive({ selector: '[d]', inputs: [{ name: 'x', transform }] })\nexport class D { x: any; }\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\n@Component({selector: 'c', template: '
', queries: {item: new ViewChild(1)}})\nexport class Cmp {\n item: any;\n}\n" }, - "diagnostics": [ - "Input transform function first parameter must have a type Value could not be determined statically." - ], + "diagnostics": ["@ViewChild predicate cannot be interpreted Value is of type 'number'."], + "diagnosticSpans": [[277, 278]], "classes": {}, - "dtsImports": [], - "diagnosticSpans": [[68, 76]] + "dtsImports": [] }, { - "name": "probe: shorthand-constArrowGeneric", + "name": "probe: queries-predicate-queriesObject", "origin": "probe", "files": { - "test.ts": "import { Directive, Input } from '@angular/core';\nconst transform = (v: T) => v;\n@Directive({ selector: '[d]', inputs: [{ name: 'x', transform }] })\nexport class D { x: any; }\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\n@Component({selector: 'c', template: '
', queries: {item: new ViewChild({})}})\nexport class Cmp {\n item: any;\n}\n" }, - "diagnostics": [ - "Input transform function cannot be generic Value could not be determined statically." - ], + "diagnostics": ["@ViewChild predicate cannot be interpreted Value is of type '{}'."], + "diagnosticSpans": [[277, 279]], "classes": {}, - "dtsImports": [], - "diagnosticSpans": [[68, 82]] + "dtsImports": [] }, { - "name": "probe: shorthand-objectDestructured", + "name": "probe: queries-predicate-queriesNew", "origin": "probe", "files": { - "test.ts": "import { Directive, Input } from '@angular/core';\nconst { transform } = { transform: (v: string) => v.length };\n@Directive({ selector: '[d]', inputs: [{ name: 'x', transform }] })\nexport class D { x: any; }\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\n@Component({selector: 'c', template: '
', queries: {item: new ViewChild(new ElementRef(null))}})\nexport class Cmp {\n item: any;\n}\n" }, "diagnostics": [], + "diagnosticSpans": [], "classes": { - "D": { - "inputs": "{x:[2,\"x\",\"x\",(v)=>v.length]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery(newElementRef(null),5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.item=_t.first);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" } }, - "dtsImports": [], - "diagnosticSpans": [] + "dtsImports": [] }, { - "name": "probe: shorthand-exportedConstArrow", + "name": "probe: queries-predicate-memberFnExpr", "origin": "probe", "files": { - "test.ts": "import { Directive, Input } from '@angular/core';\nexport const transform = (v: string) => v.length;\n@Directive({ selector: '[d]', inputs: [{ name: 'x', transform }] })\nexport class D { x: any; }\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChild(function Token() {}) item: any;\n}\n" }, "diagnostics": [], + "diagnosticSpans": [], "classes": { - "D": { - "inputs": "{x:[2,\"x\",\"x\",(v)=>v.length]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery(functionToken(){},5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.item=_t.first);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" } }, - "dtsImports": [], - "diagnosticSpans": [] + "dtsImports": [] }, { - "name": "probe: shorthand-varRedeclared", + "name": "probe: queries-predicate-memberArrow", "origin": "probe", "files": { - "test.ts": "import { Directive, Input } from '@angular/core';\nvar transform = (v: string) => v.length;\nvar transform = (v: string) => v.length;\n@Directive({ selector: '[d]', inputs: [{ name: 'x', transform }] })\nexport class D { x: any; }\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChild(() => ElementRef) item: any;\n}\n" }, "diagnostics": [], + "diagnosticSpans": [], "classes": { - "D": { - "inputs": "{x:[2,\"x\",\"x\",(v)=>v.length]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery(()=>ElementRef,5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.item=_t.first);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" } }, - "dtsImports": [], - "diagnosticSpans": [] + "dtsImports": [] }, { - "name": "probe: shorthand-spreadConstObject", + "name": "probe: queries-predicate-memberCall", "origin": "probe", "files": { - "test.ts": "import { Directive, Input } from '@angular/core';\nconst transform = (v: string) => v.length;\nconst B = { transform };\n@Directive({ selector: '[d]', inputs: [{ name: 'x', ...B }] })\nexport class D { x: any; }\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nfunction mk(): any { return ElementRef; }\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChild(mk()) item: any;\n}\n" }, "diagnostics": [], + "diagnosticSpans": [], "classes": { - "D": { - "inputs": "{x:[2,\"x\",\"x\",(v)=>v.length]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery(mk(),5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.item=_t.first);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" } }, - "dtsImports": [], - "diagnosticSpans": [] + "dtsImports": [] }, { - "name": "probe: shorthand-constArrowUnexportedType", + "name": "probe: queries-predicate-memberNumber", "origin": "probe", "files": { - "test.ts": "import { Directive, Input } from '@angular/core';\ninterface Foo { a: string }\nconst transform = (v: Foo) => 1;\n@Directive({ selector: '[d]', inputs: [{ name: 'x', transform }] })\nexport class D { x: any; }\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChild(1 as any) item: any;\n}\n" }, - "diagnostics": [ - "Symbol must be exported in order to be used as the type of an Input transform function" - ], + "diagnostics": ["@ViewChild predicate cannot be interpreted Value is of type 'number'."], + "diagnosticSpans": [[280, 288]], "classes": {}, - "dtsImports": [], - "diagnosticSpans": [[100, 103]] + "dtsImports": [] }, { - "name": "probe: shorthand-constArrowClash", + "name": "probe: queries-member-noArgs", "origin": "probe", "files": { - "test.ts": "import { Directive, Input } from '@angular/core';\nconst transform = (v: string) => v.length;\n@Directive({ selector: '[d]', inputs: [{ name: 'x', transform }] })\nexport class D { x: any; static ngAcceptInputType_x: string; }\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChild() q!: any;\n}\n" }, - "diagnostics": [ - "Class cannot have both a transform function on Input x and a static member called ngAcceptInputType_x" - ], + "diagnostics": ["@ViewChild must have arguments"], + "diagnosticSpans": [[269, 290]], "classes": {}, - "dtsImports": [], - "diagnosticSpans": [[68, 91]] + "dtsImports": [] }, { - "name": "probe: shorthand-arrayDestructured", + "name": "probe: queries-member-noCall", "origin": "probe", "files": { - "test.ts": "import { Directive, Input } from '@angular/core';\nconst [transform] = [(v: string) => v.length];\n@Directive({ selector: '[d]', inputs: [{ name: 'x', transform }] })\nexport class D { x: any; }\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChild q!: any;\n}\n" }, - "diagnostics": [], - "classes": { - "D": { - "inputs": "{x:[2,\"x\",\"x\",(v)=>v.length]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "diagnostics": ["@ViewChild must have arguments"], + "diagnosticSpans": [[269, 288]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: queries-member-tooMany", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChild('x', {}, 1 as any) q!: any;\n}\n" }, - "dtsImports": [], - "diagnosticSpans": [] + "diagnostics": ["@ViewChild has too many arguments"], + "diagnosticSpans": [[280, 283]], + "classes": {}, + "dtsImports": [] }, { - "name": "probe: shorthand-objectDestructuredNamed", + "name": "probe: queries-member-noArgsSetter", "origin": "probe", "files": { - "test.ts": "import { Directive, Input } from '@angular/core';\nconst t = (v: string) => v.length;\nconst { transform } = { transform: t };\n@Directive({ selector: '[d]', inputs: [{ name: 'x', transform }] })\nexport class D { x: any; }\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ContentChildren() set q(v: any) {}\n}\n" }, - "diagnostics": [ - "Input transform must be a function Value could not be determined statically." - ], + "diagnostics": ["@ContentChildren must have arguments"], + "diagnosticSpans": [[269, 304]], "classes": {}, - "dtsImports": [], - "diagnosticSpans": [[120, 121]] + "dtsImports": [] }, { - "name": "probe: shorthand-nestedDestructured", + "name": "probe: queries-member-twoMembers", "origin": "probe", "files": { - "test.ts": "import { Directive, Input } from '@angular/core';\nconst { o: { transform } } = { o: { transform: (v: string) => v.length } };\n@Directive({ selector: '[d]', inputs: [{ name: 'x', transform }] })\nexport class D { x: any; }\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChild('x', {static: 'a'}) a!: any;\n @ContentChild('x', {descendants: 'b'}) b!: any;\n}\n" }, - "diagnostics": [], - "classes": { - "D": { - "inputs": "{x:[2,\"x\",\"x\",(v)=>v.length]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "diagnostics": ["@ViewChild options.static must be a boolean Value is of type 'string'."], + "diagnosticSpans": [[280, 283]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: queries-member-contentFirstInOrder", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ContentChild('x', {descendants: 'b'}) b!: any;\n @ViewChild('x', {static: 'a'}) a!: any;\n}\n" }, - "dtsImports": [], - "diagnosticSpans": [] + "diagnostics": [ + "@ContentChild options.descendants must be a boolean Value is of type 'string'." + ], + "diagnosticSpans": [[302, 305]], + "classes": {}, + "dtsImports": [] }, { - "name": "probe: shorthand-memberConstArrow", + "name": "probe: queries-member-memberVsQueries", "origin": "probe", "files": { - "test.ts": "import { Directive, Input } from '@angular/core';\nconst transform = (v: string) => v.length;\n@Directive({ selector: '[d]' })\nexport class D { @Input({ transform }) x: any; }\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\n@Component({selector: 'c', template: '
', queries: {q: new ViewChild('x', {static: 'c'})}})\nexport class Cmp {\n @ViewChild('x', {static: 'a'}) a!: any;\n q!: any;\n}\n" }, - "diagnostics": [], - "classes": { - "D": { - "inputs": "{x:[2,\"x\",\"x\",(v)=>v.length]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "diagnostics": ["@ViewChild options.static must be a boolean Value is of type 'string'."], + "diagnosticSpans": [[329, 332]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: queries-member-inputVsMember", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChild('x', {static: 'a'}) a!: any;\n @Input({transform: 1 as any}) i!: any;\n}\n" }, - "dtsImports": [], - "diagnosticSpans": [] + "diagnostics": ["Input transform must be a function Value is of type 'number'."], + "diagnosticSpans": [[318, 339]], + "classes": {}, + "dtsImports": [] }, { - "name": "probe: shorthand-memberConstArrowNamedSame", + "name": "probe: queries-member-outputsMetaVsMember", "origin": "probe", "files": { - "test.ts": "import { Directive, Input } from '@angular/core';\nconst transform = (v: string) => v.length;\n@Directive({ selector: '[d]' })\nexport class D { @Input({ transform: transform }) x: any; }\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\n@Component({selector: 'c', template: '
', outputs: 1 as any})\nexport class Cmp {\n @ViewChild('x', {static: 'a'}) a!: any;\n}\n" }, "diagnostics": [ - "Input transform must be a function Value could not be determined statically." + "Failed to resolve @Directive.outputs to a string array Value is of type 'number'." ], + "diagnosticSpans": [[256, 264]], "classes": {}, - "dtsImports": [], - "diagnosticSpans": [[162, 171]] + "dtsImports": [] }, { - "name": "probe: shorthand-memberConstArrowNamedOther", + "name": "probe: queries-member-forwardRefStatic", "origin": "probe", "files": { - "test.ts": "import { Directive, Input } from '@angular/core';\nconst t = (v: string) => v.length;\n@Directive({ selector: '[d]' })\nexport class D { @Input({ transform: t }) x: any; }\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nimport {forwardRef} from '@angular/core';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChild(forwardRef(() => ElementRef), {static: 'a'}) a!: any;\n}\n" }, - "diagnostics": [ - "Input transform must be a function Value could not be determined statically." - ], + "diagnostics": ["@ViewChild options.static must be a boolean Value is of type 'string'."], + "diagnosticSpans": [[339, 349]], "classes": {}, - "dtsImports": [], - "diagnosticSpans": [[154, 155]] + "dtsImports": [] }, { - "name": "probe: shorthand-memberOptionsConst", + "name": "probe: queries-member-predicateArrayConst", "origin": "probe", "files": { - "test.ts": "import { Directive, Input } from '@angular/core';\nconst transform = (v: string) => v.length;\nconst OPTS = { transform };\n@Directive({ selector: '[d]' })\nexport class D { @Input(OPTS) x: any; }\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nconst SELS = ['a', 'b'];\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChildren(SELS, {emitDistinctChangesOnly: false}) a!: any;\n}\n" }, "diagnostics": [], + "diagnosticSpans": [], "classes": { - "D": { - "inputs": "{x:[2,\"x\",\"x\",(v)=>v.length]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery([\"a\",\"b\"],1);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.a=_t);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" } - }, - "dtsImports": [], - "diagnosticSpans": [] + }, + "dtsImports": [] }, { - "name": "probe: scope-spreadConstFunction", + "name": "probe: queries-member-predicateBadArray", "origin": "probe", "files": { - "test.ts": "import {Directive, booleanAttribute} from '@angular/core';\nexport function toBool(v: string) { return !!v; }\nfunction make(name: string, t: any) { return [{name, transform: t}]; }\nconst args = ['x', (v: string) => v.trim()] as const;\n@Directive({selector: '[d]', inputs: make(...args)})\nexport class D { x: any; }\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChildren(['a', 1] as any) a!: any;\n}\n" }, "diagnostics": [ - "Input transform must be a function Value could not be determined statically." + "Failed to resolve @ViewChildren predicate at position 1 to a string Value is of type 'number'." ], + "diagnosticSpans": [[283, 298]], "classes": {}, - "dtsImports": [], - "diagnosticSpans": [[173, 174]] + "dtsImports": [] }, { - "name": "probe: scope-spreadFunction", + "name": "probe: queries-member-optsNull", "origin": "probe", "files": { - "test.ts": "import {Directive, booleanAttribute} from '@angular/core';\nfunction make(name: string, t: any) { return [{name, transform: t}]; }\n@Directive({selector: '[d]', inputs: make('x', ...[(v: string) => v.trim()])})\nexport class D { x: any; }\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChild('x', null) a!: any;\n}\n" }, "diagnostics": [ - "Input transform must be a function Value could not be determined statically." + "@ViewChild options must be an object literal. Find more at https://next.angular.dev/errors/NG1001" ], + "diagnosticSpans": [[285, 289]], "classes": {}, - "dtsImports": [], - "diagnosticSpans": [[123, 124]] + "dtsImports": [] }, { - "name": "probe: scope-restFunction", + "name": "probe: queries-member-optsUndefinedArg", "origin": "probe", "files": { - "test.ts": "import {Directive, booleanAttribute} from '@angular/core';\nfunction make(...a: any[]) { return [{name: a[0], transform: a[1]}]; }\n@Directive({selector: '[d]', inputs: make('x', (v: string) => v.trim())})\nexport class D { x: any; }\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChild('x', undefined) a!: any;\n}\n" }, "diagnostics": [ - "Input transform must be a function Value could not be determined statically." + "@ViewChild options must be an object literal. Find more at https://next.angular.dev/errors/NG1001" ], + "diagnosticSpans": [[285, 294]], "classes": {}, - "dtsImports": [], - "diagnosticSpans": [[120, 124]] + "dtsImports": [] }, { - "name": "probe: scope-restAfterParamFunction", + "name": "probe: queries-member-readAndStatic", "origin": "probe", "files": { - "test.ts": "import {Directive, booleanAttribute} from '@angular/core';\nfunction make(name: string, ...ts: any[]) { return [{name, transform: ts[0]}]; }\n@Directive({selector: '[d]', inputs: make('x', (v: string) => v.trim())})\nexport class D { x: any; }\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nconst FLAG = true;\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChild('x', {read: ElementRef, static: FLAG}) a!: any;\n}\n" }, - "diagnostics": [ - "Input transform must be a function Value could not be determined statically." - ], - "classes": {}, - "dtsImports": [], - "diagnosticSpans": [[129, 134]] + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery([\"x\"],7,ElementRef);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.a=_t.first);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" + } + }, + "dtsImports": [] }, { - "name": "probe: scope-spreadRestThroughFunction", + "name": "probe: queries-member-dir", "origin": "probe", "files": { - "test.ts": "import {Directive, booleanAttribute} from '@angular/core';\nfunction make(name: string, t: any) { return [{name, transform: t}]; }\nfunction outer(...a: any[]) { return make(...a); }\n@Directive({selector: '[d]', inputs: outer('x', (v: string) => v.trim())})\nexport class D { x: any; }\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nconst FLAG = true;\n@Directive({selector: '[d]'})\nexport class Dir {\n @ContentChildren('x', {descendants: FLAG, emitDistinctChangesOnly: FLAG}) a!: any;\n}\n" }, - "diagnostics": [ - "Input transform must be a function Value could not be determined statically." - ], + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "contentQueries": "{if(rf&1){i0.ɵɵcontentQuery(dirIndex,[\"x\"],5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.a=_t);}}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: queries-member-signalPlusDecorator", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nimport {viewChild} from '@angular/core';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChild('x', {static: 'a'}) a = viewChild('x');\n}\n" + }, + "diagnostics": ["@ViewChild options.static must be a boolean Value is of type 'string'."], + "diagnosticSpans": [[321, 324]], "classes": {}, - "dtsImports": [], - "diagnosticSpans": [[123, 124]] + "dtsImports": [] }, { - "name": "probe: scope-functionAfterSpread", + "name": "probe: queries-member-getter", "origin": "probe", "files": { - "test.ts": "import {Directive, booleanAttribute} from '@angular/core';\nfunction make(name: string, t: any) { return [{name, transform: t}]; }\nconst pre = ['x'];\n@Directive({selector: '[d]', inputs: make(...pre, (v: string) => v.trim())})\nexport class D { x: any; }\n" + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nconst FLAG = true;\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChild('x', {static: FLAG}) get a(): any { return null; }\n}\n" }, - "diagnostics": [ - "Input transform must be a function Value could not be determined statically." - ], + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery([\"x\"],7);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.a=_t.first);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: queries-member-staticMember", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ViewChildren, ContentChild, ContentChildren, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChild('x', {static: 'a'}) static a: any;\n}\n" + }, + "diagnostics": ["@ViewChild options.static must be a boolean Value is of type 'string'."], + "diagnosticSpans": [[280, 283]], "classes": {}, - "dtsImports": [], - "diagnosticSpans": [[123, 124]] + "dtsImports": [] }, { "name": "probe: transform-global-atob", @@ -7029,202 +9245,372 @@ "dtsImports": [] }, { - "name": "probe: shortCircuit-metaObjAliasOr", + "name": "probe: shortCircuit-metaObjAliasOr", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ContentChild, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nimport {NAME, FLAG, TRUE_FLAG, Token, EMPTY, toBool} from './other';\nconst LOCAL: string = 'localAlias';\nconst EMPTY_LOCAL: string = '';\n@Directive({selector: '[d]', inputs: [{name: 'x', alias: LOCAL || NAME}]})\nexport class Dir {\n x: any;\n}\n", + "other.ts": "import {booleanAttribute} from '@angular/core';\nexport const NAME = 'y';\nexport const EMPTY = '';\nexport const FLAG = false;\nexport const TRUE_FLAG = true;\nexport class Token {}\nexport function toBool(v: string) { return !!v; }\nexport interface Other { a: string }\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{x:[0,\"localAlias\",\"x\"]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: shortCircuit-metaObjAliasAnd", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ContentChild, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nimport {NAME, FLAG, TRUE_FLAG, Token, EMPTY, toBool} from './other';\nconst LOCAL: string = 'localAlias';\nconst EMPTY_LOCAL: string = '';\n@Directive({selector: '[d]', inputs: [{name: 'x', alias: (EMPTY_LOCAL && NAME) || 'z'}]})\nexport class Dir {\n x: any;\n}\n", + "other.ts": "import {booleanAttribute} from '@angular/core';\nexport const NAME = 'y';\nexport const EMPTY = '';\nexport const FLAG = false;\nexport const TRUE_FLAG = true;\nexport class Token {}\nexport function toBool(v: string) { return !!v; }\nexport interface Other { a: string }\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{x:[0,\"z\",\"x\"]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: shortCircuit-metaCond", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ContentChild, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nimport {NAME, FLAG, TRUE_FLAG, Token, EMPTY, toBool} from './other';\nconst LOCAL: string = 'localAlias';\nconst EMPTY_LOCAL: string = '';\n@Directive({selector: '[d]', inputs: [true ? 'x' : NAME]})\nexport class Dir {\n x: any;\n}\n", + "other.ts": "import {booleanAttribute} from '@angular/core';\nexport const NAME = 'y';\nexport const EMPTY = '';\nexport const FLAG = false;\nexport const TRUE_FLAG = true;\nexport class Token {}\nexport function toBool(v: string) { return !!v; }\nexport interface Other { a: string }\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{x:\"x\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: shortCircuit-metaArrayOr", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ContentChild, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nimport {NAME, FLAG, TRUE_FLAG, Token, EMPTY, toBool} from './other';\nconst LOCAL: string = 'localAlias';\nconst EMPTY_LOCAL: string = '';\n@Directive({selector: '[d]', inputs: ['x'] || NAME})\nexport class Dir {\n x: any;\n}\n", + "other.ts": "import {booleanAttribute} from '@angular/core';\nexport const NAME = 'y';\nexport const EMPTY = '';\nexport const FLAG = false;\nexport const TRUE_FLAG = true;\nexport class Token {}\nexport function toBool(v: string) { return !!v; }\nexport interface Other { a: string }\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{x:\"x\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: shortCircuit-metaOutOr", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ContentChild, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nimport {NAME, FLAG, TRUE_FLAG, Token, EMPTY, toBool} from './other';\nconst LOCAL: string = 'localAlias';\nconst EMPTY_LOCAL: string = '';\n@Directive({selector: '[d]', outputs: [LOCAL || NAME]})\nexport class Dir {\n localAlias = new EventEmitter();\n}\n", + "other.ts": "import {booleanAttribute} from '@angular/core';\nexport const NAME = 'y';\nexport const EMPTY = '';\nexport const FLAG = false;\nexport const TRUE_FLAG = true;\nexport class Token {}\nexport function toBool(v: string) { return !!v; }\nexport interface Other { a: string }\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "outputs": "{localAlias:\"localAlias\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: shortCircuit-metaOutCond", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ContentChild, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nimport {NAME, FLAG, TRUE_FLAG, Token, EMPTY, toBool} from './other';\nconst LOCAL: string = 'localAlias';\nconst EMPTY_LOCAL: string = '';\n@Directive({selector: '[d]', outputs: [1 ? LOCAL : NAME]})\nexport class Dir {\n localAlias = new EventEmitter();\n}\n", + "other.ts": "import {booleanAttribute} from '@angular/core';\nexport const NAME = 'y';\nexport const EMPTY = '';\nexport const FLAG = false;\nexport const TRUE_FLAG = true;\nexport class Token {}\nexport function toBool(v: string) { return !!v; }\nexport interface Other { a: string }\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "outputs": "{localAlias:\"localAlias\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: shortCircuit-metaObjRequiredOr", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ContentChild, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nimport {NAME, FLAG, TRUE_FLAG, Token, EMPTY, toBool} from './other';\nconst LOCAL: string = 'localAlias';\nconst EMPTY_LOCAL: string = '';\n@Directive({selector: '[d]', inputs: [{name: 'x', required: true || FLAG}]})\nexport class Dir {\n x: any;\n}\n", + "other.ts": "import {booleanAttribute} from '@angular/core';\nexport const NAME = 'y';\nexport const EMPTY = '';\nexport const FLAG = false;\nexport const TRUE_FLAG = true;\nexport class Token {}\nexport function toBool(v: string) { return !!v; }\nexport interface Other { a: string }\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{x:\"x\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: shortCircuit-metaObjRequiredAnd", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ContentChild, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nimport {NAME, FLAG, TRUE_FLAG, Token, EMPTY, toBool} from './other';\nconst LOCAL: string = 'localAlias';\nconst EMPTY_LOCAL: string = '';\n@Directive({selector: '[d]', inputs: [{name: 'x', required: 0 && FLAG}]})\nexport class Dir {\n x: any;\n}\n", + "other.ts": "import {booleanAttribute} from '@angular/core';\nexport const NAME = 'y';\nexport const EMPTY = '';\nexport const FLAG = false;\nexport const TRUE_FLAG = true;\nexport class Token {}\nexport function toBool(v: string) { return !!v; }\nexport interface Other { a: string }\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{x:\"x\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: shortCircuit-metaSpreadOr", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ContentChild, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nimport {NAME, FLAG, TRUE_FLAG, Token, EMPTY, toBool} from './other';\nconst LOCAL: string = 'localAlias';\nconst EMPTY_LOCAL: string = '';\n@Directive({selector: '[d]', inputs: [...(['x'] || NAME)]})\nexport class Dir {\n x: any;\n}\n", + "other.ts": "import {booleanAttribute} from '@angular/core';\nexport const NAME = 'y';\nexport const EMPTY = '';\nexport const FLAG = false;\nexport const TRUE_FLAG = true;\nexport class Token {}\nexport function toBool(v: string) { return !!v; }\nexport interface Other { a: string }\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{x:\"x\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: shortCircuit-metaNestedOr", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ContentChild, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nimport {NAME, FLAG, TRUE_FLAG, Token, EMPTY, toBool} from './other';\nconst LOCAL: string = 'localAlias';\nconst EMPTY_LOCAL: string = '';\n@Directive({selector: '[d]', inputs: [(EMPTY_LOCAL || 0) || (LOCAL && 'x') || NAME]})\nexport class Dir {\n x: any;\n}\n", + "other.ts": "import {booleanAttribute} from '@angular/core';\nexport const NAME = 'y';\nexport const EMPTY = '';\nexport const FLAG = false;\nexport const TRUE_FLAG = true;\nexport class Token {}\nexport function toBool(v: string) { return !!v; }\nexport interface Other { a: string }\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{x:\"x\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: shortCircuit-metaDynamicUnselected", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ContentChild, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nimport {NAME, FLAG, TRUE_FLAG, Token, EMPTY, toBool} from './other';\nconst LOCAL: string = 'localAlias';\nconst EMPTY_LOCAL: string = '';\n@Directive({selector: '[d]', inputs: ['x' || window.name]})\nexport class Dir {\n x: any;\n}\n", + "other.ts": "import {booleanAttribute} from '@angular/core';\nexport const NAME = 'y';\nexport const EMPTY = '';\nexport const FLAG = false;\nexport const TRUE_FLAG = true;\nexport class Token {}\nexport function toBool(v: string) { return !!v; }\nexport interface Other { a: string }\n" + }, + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." + ], + "diagnosticSpans": [[310, 330]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: shortCircuit-metaCondImportUnselected", "origin": "probe", "files": { - "test.ts": "import {Directive, Component, Input, Output, ViewChild, ContentChild, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nimport {NAME, FLAG, TRUE_FLAG, Token, EMPTY, toBool} from './other';\nconst LOCAL: string = 'localAlias';\nconst EMPTY_LOCAL: string = '';\n@Directive({selector: '[d]', inputs: [{name: 'x', alias: LOCAL || NAME}]})\nexport class Dir {\n x: any;\n}\n", + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ContentChild, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nimport {NAME, FLAG, TRUE_FLAG, Token, EMPTY, toBool} from './other';\nconst LOCAL: string = 'localAlias';\nconst EMPTY_LOCAL: string = '';\n@Directive({selector: '[d]', inputs: 0 ? NAME : ['x']})\nexport class Dir {\n x: any;\n}\n", "other.ts": "import {booleanAttribute} from '@angular/core';\nexport const NAME = 'y';\nexport const EMPTY = '';\nexport const FLAG = false;\nexport const TRUE_FLAG = true;\nexport class Token {}\nexport function toBool(v: string) { return !!v; }\nexport interface Other { a: string }\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{x:[0,\"localAlias\",\"x\"]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{x:\"x\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: shortCircuit-metaObjAliasAnd", + "name": "probe: shortCircuit-qMetaOr", "origin": "probe", "files": { - "test.ts": "import {Directive, Component, Input, Output, ViewChild, ContentChild, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nimport {NAME, FLAG, TRUE_FLAG, Token, EMPTY, toBool} from './other';\nconst LOCAL: string = 'localAlias';\nconst EMPTY_LOCAL: string = '';\n@Directive({selector: '[d]', inputs: [{name: 'x', alias: (EMPTY_LOCAL && NAME) || 'z'}]})\nexport class Dir {\n x: any;\n}\n", + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ContentChild, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nimport {NAME, FLAG, TRUE_FLAG, Token, EMPTY, toBool} from './other';\nconst LOCAL: string = 'localAlias';\nconst EMPTY_LOCAL: string = '';\n@Component({selector: 'c', template: '
', queries: {item: new ViewChild('x' || NAME)}})\nexport class Cmp {\n item: any;\n}\n", "other.ts": "import {booleanAttribute} from '@angular/core';\nexport const NAME = 'y';\nexport const EMPTY = '';\nexport const FLAG = false;\nexport const TRUE_FLAG = true;\nexport class Token {}\nexport function toBool(v: string) { return !!v; }\nexport interface Other { a: string }\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { - "Dir": { - "inputs": "{x:[0,\"z\",\"x\"]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery([\"x\"],5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.item=_t.first);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: shortCircuit-metaCond", + "name": "probe: shortCircuit-qMetaCond", "origin": "probe", "files": { - "test.ts": "import {Directive, Component, Input, Output, ViewChild, ContentChild, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nimport {NAME, FLAG, TRUE_FLAG, Token, EMPTY, toBool} from './other';\nconst LOCAL: string = 'localAlias';\nconst EMPTY_LOCAL: string = '';\n@Directive({selector: '[d]', inputs: [true ? 'x' : NAME]})\nexport class Dir {\n x: any;\n}\n", + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ContentChild, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nimport {NAME, FLAG, TRUE_FLAG, Token, EMPTY, toBool} from './other';\nconst LOCAL: string = 'localAlias';\nconst EMPTY_LOCAL: string = '';\n@Component({selector: 'c', template: '
', queries: {item: new ViewChild(true ? 'x' : NAME)}})\nexport class Cmp {\n item: any;\n}\n", "other.ts": "import {booleanAttribute} from '@angular/core';\nexport const NAME = 'y';\nexport const EMPTY = '';\nexport const FLAG = false;\nexport const TRUE_FLAG = true;\nexport class Token {}\nexport function toBool(v: string) { return !!v; }\nexport interface Other { a: string }\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { - "Dir": { - "inputs": "{x:\"x\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery([\"x\"],5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.item=_t.first);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: shortCircuit-metaArrayOr", + "name": "probe: shortCircuit-qMetaStaticOr", "origin": "probe", "files": { - "test.ts": "import {Directive, Component, Input, Output, ViewChild, ContentChild, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nimport {NAME, FLAG, TRUE_FLAG, Token, EMPTY, toBool} from './other';\nconst LOCAL: string = 'localAlias';\nconst EMPTY_LOCAL: string = '';\n@Directive({selector: '[d]', inputs: ['x'] || NAME})\nexport class Dir {\n x: any;\n}\n", + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ContentChild, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nimport {NAME, FLAG, TRUE_FLAG, Token, EMPTY, toBool} from './other';\nconst LOCAL: string = 'localAlias';\nconst EMPTY_LOCAL: string = '';\n@Component({selector: 'c', template: '
', queries: {item: new ViewChild('x', {static: true || FLAG})}})\nexport class Cmp {\n item: any;\n}\n", "other.ts": "import {booleanAttribute} from '@angular/core';\nexport const NAME = 'y';\nexport const EMPTY = '';\nexport const FLAG = false;\nexport const TRUE_FLAG = true;\nexport class Token {}\nexport function toBool(v: string) { return !!v; }\nexport interface Other { a: string }\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { - "Dir": { - "inputs": "{x:\"x\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery([\"x\"],7);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.item=_t.first);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: shortCircuit-metaOutOr", + "name": "probe: shortCircuit-qMetaReadOr", "origin": "probe", "files": { - "test.ts": "import {Directive, Component, Input, Output, ViewChild, ContentChild, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nimport {NAME, FLAG, TRUE_FLAG, Token, EMPTY, toBool} from './other';\nconst LOCAL: string = 'localAlias';\nconst EMPTY_LOCAL: string = '';\n@Directive({selector: '[d]', outputs: [LOCAL || NAME]})\nexport class Dir {\n localAlias = new EventEmitter();\n}\n", + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ContentChild, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nimport {NAME, FLAG, TRUE_FLAG, Token, EMPTY, toBool} from './other';\nconst LOCAL: string = 'localAlias';\nconst EMPTY_LOCAL: string = '';\n@Component({selector: 'c', template: '
', queries: {item: new ViewChild('x', {read: 0 || Token})}})\nexport class Cmp {\n item: any;\n}\n", "other.ts": "import {booleanAttribute} from '@angular/core';\nexport const NAME = 'y';\nexport const EMPTY = '';\nexport const FLAG = false;\nexport const TRUE_FLAG = true;\nexport class Token {}\nexport function toBool(v: string) { return !!v; }\nexport interface Other { a: string }\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { - "Dir": { - "outputs": "{localAlias:\"localAlias\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery([\"x\"],5,0||Token);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.item=_t.first);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: shortCircuit-metaOutCond", + "name": "probe: shortCircuit-qMetaPredOrToken", "origin": "probe", "files": { - "test.ts": "import {Directive, Component, Input, Output, ViewChild, ContentChild, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nimport {NAME, FLAG, TRUE_FLAG, Token, EMPTY, toBool} from './other';\nconst LOCAL: string = 'localAlias';\nconst EMPTY_LOCAL: string = '';\n@Directive({selector: '[d]', outputs: [1 ? LOCAL : NAME]})\nexport class Dir {\n localAlias = new EventEmitter();\n}\n", + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ContentChild, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nimport {NAME, FLAG, TRUE_FLAG, Token, EMPTY, toBool} from './other';\nconst LOCAL: string = 'localAlias';\nconst EMPTY_LOCAL: string = '';\n@Component({selector: 'c', template: '
', queries: {item: new ViewChild(0 || Token)}})\nexport class Cmp {\n item: any;\n}\n", "other.ts": "import {booleanAttribute} from '@angular/core';\nexport const NAME = 'y';\nexport const EMPTY = '';\nexport const FLAG = false;\nexport const TRUE_FLAG = true;\nexport class Token {}\nexport function toBool(v: string) { return !!v; }\nexport interface Other { a: string }\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { - "Dir": { - "outputs": "{localAlias:\"localAlias\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery(0||Token,5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.item=_t.first);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: shortCircuit-metaObjRequiredOr", + "name": "probe: shortCircuit-qMemberOr", "origin": "probe", "files": { - "test.ts": "import {Directive, Component, Input, Output, ViewChild, ContentChild, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nimport {NAME, FLAG, TRUE_FLAG, Token, EMPTY, toBool} from './other';\nconst LOCAL: string = 'localAlias';\nconst EMPTY_LOCAL: string = '';\n@Directive({selector: '[d]', inputs: [{name: 'x', required: true || FLAG}]})\nexport class Dir {\n x: any;\n}\n", + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ContentChild, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nimport {NAME, FLAG, TRUE_FLAG, Token, EMPTY, toBool} from './other';\nconst LOCAL: string = 'localAlias';\nconst EMPTY_LOCAL: string = '';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChild('x' || NAME) item: any;\n}\n", "other.ts": "import {booleanAttribute} from '@angular/core';\nexport const NAME = 'y';\nexport const EMPTY = '';\nexport const FLAG = false;\nexport const TRUE_FLAG = true;\nexport class Token {}\nexport function toBool(v: string) { return !!v; }\nexport interface Other { a: string }\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { - "Dir": { - "inputs": "{x:\"x\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery([\"x\"],5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.item=_t.first);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: shortCircuit-metaObjRequiredAnd", + "name": "probe: shortCircuit-qMemberCond", "origin": "probe", "files": { - "test.ts": "import {Directive, Component, Input, Output, ViewChild, ContentChild, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nimport {NAME, FLAG, TRUE_FLAG, Token, EMPTY, toBool} from './other';\nconst LOCAL: string = 'localAlias';\nconst EMPTY_LOCAL: string = '';\n@Directive({selector: '[d]', inputs: [{name: 'x', required: 0 && FLAG}]})\nexport class Dir {\n x: any;\n}\n", + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ContentChild, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nimport {NAME, FLAG, TRUE_FLAG, Token, EMPTY, toBool} from './other';\nconst LOCAL: string = 'localAlias';\nconst EMPTY_LOCAL: string = '';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChild(false ? NAME : 'x') item: any;\n}\n", "other.ts": "import {booleanAttribute} from '@angular/core';\nexport const NAME = 'y';\nexport const EMPTY = '';\nexport const FLAG = false;\nexport const TRUE_FLAG = true;\nexport class Token {}\nexport function toBool(v: string) { return !!v; }\nexport interface Other { a: string }\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { - "Dir": { - "inputs": "{x:\"x\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery([\"x\"],5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.item=_t.first);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: shortCircuit-metaSpreadOr", + "name": "probe: shortCircuit-qMemberStaticOr", "origin": "probe", "files": { - "test.ts": "import {Directive, Component, Input, Output, ViewChild, ContentChild, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nimport {NAME, FLAG, TRUE_FLAG, Token, EMPTY, toBool} from './other';\nconst LOCAL: string = 'localAlias';\nconst EMPTY_LOCAL: string = '';\n@Directive({selector: '[d]', inputs: [...(['x'] || NAME)]})\nexport class Dir {\n x: any;\n}\n", + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ContentChild, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nimport {NAME, FLAG, TRUE_FLAG, Token, EMPTY, toBool} from './other';\nconst LOCAL: string = 'localAlias';\nconst EMPTY_LOCAL: string = '';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChild('x', {static: true || FLAG}) item: any;\n}\n", "other.ts": "import {booleanAttribute} from '@angular/core';\nexport const NAME = 'y';\nexport const EMPTY = '';\nexport const FLAG = false;\nexport const TRUE_FLAG = true;\nexport class Token {}\nexport function toBool(v: string) { return !!v; }\nexport interface Other { a: string }\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { - "Dir": { - "inputs": "{x:\"x\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery([\"x\"],7);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.item=_t.first);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: shortCircuit-metaNestedOr", + "name": "probe: shortCircuit-qMemberStaticCond", "origin": "probe", "files": { - "test.ts": "import {Directive, Component, Input, Output, ViewChild, ContentChild, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nimport {NAME, FLAG, TRUE_FLAG, Token, EMPTY, toBool} from './other';\nconst LOCAL: string = 'localAlias';\nconst EMPTY_LOCAL: string = '';\n@Directive({selector: '[d]', inputs: [(EMPTY_LOCAL || 0) || (LOCAL && 'x') || NAME]})\nexport class Dir {\n x: any;\n}\n", + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ContentChild, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nimport {NAME, FLAG, TRUE_FLAG, Token, EMPTY, toBool} from './other';\nconst LOCAL: string = 'localAlias';\nconst EMPTY_LOCAL: string = '';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ViewChild('x', {static: 1 ? true : FLAG}) item: any;\n}\n", "other.ts": "import {booleanAttribute} from '@angular/core';\nexport const NAME = 'y';\nexport const EMPTY = '';\nexport const FLAG = false;\nexport const TRUE_FLAG = true;\nexport class Token {}\nexport function toBool(v: string) { return !!v; }\nexport interface Other { a: string }\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { - "Dir": { - "inputs": "{x:\"x\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "Cmp": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery([\"x\"],7);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.item=_t.first);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: shortCircuit-metaDynamicUnselected", - "origin": "probe", - "files": { - "test.ts": "import {Directive, Component, Input, Output, ViewChild, ContentChild, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nimport {NAME, FLAG, TRUE_FLAG, Token, EMPTY, toBool} from './other';\nconst LOCAL: string = 'localAlias';\nconst EMPTY_LOCAL: string = '';\n@Directive({selector: '[d]', inputs: ['x' || window.name]})\nexport class Dir {\n x: any;\n}\n", - "other.ts": "import {booleanAttribute} from '@angular/core';\nexport const NAME = 'y';\nexport const EMPTY = '';\nexport const FLAG = false;\nexport const TRUE_FLAG = true;\nexport class Token {}\nexport function toBool(v: string) { return !!v; }\nexport interface Other { a: string }\n" - }, - "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." - ], - "diagnosticSpans": [[310, 330]], - "classes": {}, - "dtsImports": [] - }, - { - "name": "probe: shortCircuit-metaCondImportUnselected", + "name": "probe: shortCircuit-qMemberDescOr", "origin": "probe", "files": { - "test.ts": "import {Directive, Component, Input, Output, ViewChild, ContentChild, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nimport {NAME, FLAG, TRUE_FLAG, Token, EMPTY, toBool} from './other';\nconst LOCAL: string = 'localAlias';\nconst EMPTY_LOCAL: string = '';\n@Directive({selector: '[d]', inputs: 0 ? NAME : ['x']})\nexport class Dir {\n x: any;\n}\n", + "test.ts": "import {Directive, Component, Input, Output, ViewChild, ContentChild, ElementRef, booleanAttribute, EventEmitter} from '@angular/core';\nimport {NAME, FLAG, TRUE_FLAG, Token, EMPTY, toBool} from './other';\nconst LOCAL: string = 'localAlias';\nconst EMPTY_LOCAL: string = '';\n@Component({selector: 'c', template: '
'})\nexport class Cmp {\n @ContentChild('x', {descendants: false && FLAG}) item: any;\n}\n", "other.ts": "import {booleanAttribute} from '@angular/core';\nexport const NAME = 'y';\nexport const EMPTY = '';\nexport const FLAG = false;\nexport const TRUE_FLAG = true;\nexport class Token {}\nexport function toBool(v: string) { return !!v; }\nexport interface Other { a: string }\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { - "Dir": { - "inputs": "{x:\"x\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "Cmp": { + "contentQueries": "{if(rf&1){i0.ɵɵcontentQuery(dirIndex,[\"x\"],4);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.item=_t.first);}}", + "dts:ɵcmp": "staticɵcmp:i0.ɵɵComponentDeclaration;" } }, "dtsImports": [] @@ -8992,6 +11378,230 @@ "diagnosticSpans": [[159, 160]], "classes": {}, "dtsImports": [] + }, + { + "name": "probe: r6-ns-queries-typeof", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, ContentChild, ViewChild} from '@angular/core';\nnamespace NS { export const SEL = 'foo'; }\ndeclare const S: typeof NS.SEL;\n@Directive({selector: '[d]', queries: {q: new ContentChild(S)}})\nexport class Dir {\n q: any;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "contentQueries": "{if(rf&1){i0.ɵɵcontentQuery(dirIndex,[\"foo\"],5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.q=_t.first);}}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: r6-ns-queries-plain", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, ContentChild, ViewChild} from '@angular/core';\nnamespace NS { export const SEL = 'foo'; }\n@Directive({selector: '[d]', queries: {q: new ContentChild(NS.SEL)}})\nexport class Dir {\n q: any;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "contentQueries": "{if(rf&1){i0.ɵɵcontentQuery(dirIndex,NS.SEL,5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.q=_t.first);}}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: r6-ns-member-query-typeof", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, ContentChild, ViewChild} from '@angular/core';\nnamespace NS { export const SEL = 'foo'; }\ndeclare const S: typeof NS.SEL;\n@Directive({selector: '[d]', })\nexport class Dir {\n @ContentChild(S) q: any;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "contentQueries": "{if(rf&1){i0.ɵɵcontentQuery(dirIndex,[\"foo\"],5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.q=_t.first);}}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: r6-q495-class-typeof", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, ContentChild, ViewChild} from '@angular/core';\nnamespace NS { export class C {} }\ndeclare const K: typeof NS.C;\n@Directive({selector: '[d]', queries: {q: new ContentChild(K)}})\nexport class Dir {\n q: any;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "contentQueries": "{if(rf&1){i0.ɵɵcontentQuery(dirIndex,K,5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.q=_t.first);}}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: r6-q495-class-plain", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, ContentChild, ViewChild} from '@angular/core';\nnamespace NS { export class C {} }\n@Directive({selector: '[d]', queries: {q: new ContentChild(NS.C)}})\nexport class Dir {\n q: any;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "contentQueries": "{if(rf&1){i0.ɵɵcontentQuery(dirIndex,NS.C,5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.q=_t.first);}}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: r6-q495-member-class-typeof", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, ContentChild, ViewChild} from '@angular/core';\nnamespace NS { export class C {} }\ndeclare const K: typeof NS.C;\n@Directive({selector: '[d]', })\nexport class Dir {\n @ViewChild(K) q: any;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery(K,5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.q=_t.first);}}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: r6-q495-sel-array-typeof", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, ContentChild, ViewChild} from '@angular/core';\nnamespace NS { export const SELS = ['a', 'b']; }\ndeclare const S: typeof NS.SELS;\n@Directive({selector: '[d]', queries: {q: new ContentChild(S)}})\nexport class Dir {\n q: any;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "contentQueries": "{if(rf&1){i0.ɵɵcontentQuery(dirIndex,[\"a\",\"b\"],5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.q=_t.first);}}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: r6-q495-read-typeof", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, ContentChild, ViewChild} from '@angular/core';\nnamespace NS { export class R {} }\ndeclare const K: typeof NS.R;\n@Directive({selector: '[d]', queries: {q: new ContentChild('foo', {read: K})}})\nexport class Dir {\n q: any;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "contentQueries": "{if(rf&1){i0.ɵɵcontentQuery(dirIndex,[\"foo\"],5,K);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.q=_t.first);}}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: r6-q495-static-typeof", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, ContentChild, ViewChild} from '@angular/core';\nnamespace NS { export const ST = true; }\ndeclare const S: typeof NS.ST;\n@Directive({selector: '[d]', queries: {q: new ViewChild('foo', {static: S})}})\nexport class Dir {\n q: any;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery([\"foo\"],7);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.q=_t.first);}}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: r6-q495-member-static-typeof", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, ContentChild, ViewChild} from '@angular/core';\nnamespace NS { export const ST = true; }\ndeclare const S: typeof NS.ST;\n@Directive({selector: '[d]', })\nexport class Dir {\n @ViewChild('foo', {static: S}) q: any;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "viewQuery": "{if(rf&1){i0.ɵɵviewQuery([\"foo\"],7);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.q=_t.first);}}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: r6-q495-queries-typeof", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, ContentChild, ViewChild} from '@angular/core';\nnamespace NS { export const SEL = 'foo'; }\ndeclare const S: typeof NS.SEL;\n@Directive({selector: '[d]', queries: {q: new ContentChild(S, {descendants: true})}})\nexport class Dir {\n q: any;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "contentQueries": "{if(rf&1){i0.ɵɵcontentQuery(dirIndex,[\"foo\"],5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.q=_t.first);}}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: r6-q495-alias-sel", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, ContentChild, ViewChild} from '@angular/core';\nnamespace NS { export const SEL = 'foo'; }\nimport S = NS.SEL;\n@Directive({selector: '[d]', queries: {q: new ContentChild(S)}})\nexport class Dir {\n q: any;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "contentQueries": "{if(rf&1){i0.ɵɵcontentQuery(dirIndex,[\"foo\"],5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.q=_t.first);}}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: r6-q495-member-alias-sel", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, ContentChild, ViewChild} from '@angular/core';\nnamespace NS { export const SEL = 'foo'; }\nimport S = NS.SEL;\n@Directive({selector: '[d]', })\nexport class Dir {\n @ContentChild(S) q: any;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "contentQueries": "{if(rf&1){i0.ɵɵcontentQuery(dirIndex,[\"foo\"],5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.q=_t.first);}}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: r6-q495-alias-class", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, ContentChild, ViewChild} from '@angular/core';\nnamespace NS { export class C {} }\nimport K = NS.C;\n@Directive({selector: '[d]', queries: {q: new ContentChild(K)}})\nexport class Dir {\n q: any;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "contentQueries": "{if(rf&1){i0.ɵɵcontentQuery(dirIndex,K,5);}if(rf&2){let_t;i0.ɵɵqueryRefresh(_t=i0.ɵɵloadQuery())&&(ctx.q=_t.first);}}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] } ] } diff --git a/napi/angular-compiler/src/lib.rs b/napi/angular-compiler/src/lib.rs index e4ef593ed..c4601f87f 100644 --- a/napi/angular-compiler/src/lib.rs +++ b/napi/angular-compiler/src/lib.rs @@ -1553,8 +1553,8 @@ pub fn extract_component_metadata_sync( use oxc_angular_compiler::{ ChangeDetectionStrategy as RustChangeDetection, QueryPredicate, ViewEncapsulation as RustViewEncapsulation, build_import_map, collect_string_consts, - extract_component_metadata, extract_content_queries, extract_input_metadata, - extract_output_metadata, extract_view_queries, + extract_class_queries, extract_component_metadata, extract_input_metadata_in, + extract_output_metadata_in, }; use oxc_ast::ast::{Declaration, ExportDefaultDeclarationKind, Statement}; use oxc_parser::Parser; @@ -1666,8 +1666,14 @@ pub fn extract_component_metadata_sync( metadata.view_providers.as_ref().map(|e| emitter.emit_expression(e)); let animations = metadata.animations.as_ref().map(|e| emitter.emit_expression(e)); - // Extract inputs from @Input decorators - let rust_inputs = extract_input_metadata(&allocator, class, Some(&source)); + // Extract inputs from @Input decorators (also `@core.Input()` + // through a namespace import of @angular/core). + let rust_inputs = extract_input_metadata_in( + &allocator, + class, + Some(&source), + Some(&string_consts), + ); let inputs: Option> = if rust_inputs.is_empty() { None } else { @@ -1688,8 +1694,9 @@ pub fn extract_component_metadata_sync( ) }; - // Extract outputs from @Output decorators - let rust_outputs = extract_output_metadata(&allocator, class); + // Extract outputs from @Output decorators (also `@core.Output()`). + let rust_outputs = + extract_output_metadata_in(&allocator, class, Some(&string_consts)); let outputs: Option> = if rust_outputs.is_empty() { None } else { @@ -1720,8 +1727,10 @@ pub fn extract_component_metadata_sync( } } - // Extract view queries from @ViewChild/@ViewChildren decorators - let rust_view_queries = extract_view_queries(&allocator, class, Some(&source)); + // View and content queries exactly as the component is compiled + // (member queries, then `queries:` metadata). + let (rust_view_queries, rust_content_queries) = + extract_class_queries(&allocator, class, Some(&source), &string_consts); let view_queries: Option> = if rust_view_queries.is_empty() { None @@ -1741,9 +1750,6 @@ pub fn extract_component_metadata_sync( ) }; - // Extract content queries from @ContentChild/@ContentChildren decorators - let rust_content_queries = - extract_content_queries(&allocator, class, Some(&source)); let queries: Option> = if rust_content_queries.is_empty() { None diff --git a/napi/angular-compiler/test/extract-component-metadata.test.ts b/napi/angular-compiler/test/extract-component-metadata.test.ts new file mode 100644 index 000000000..741167030 --- /dev/null +++ b/napi/angular-compiler/test/extract-component-metadata.test.ts @@ -0,0 +1,72 @@ +import { describe, expect, it } from 'vitest' + +import { extractComponentMetadataSync } from '../index.js' + +// The queries reported must be the ones the component is compiled with. +describe('extractComponentMetadataSync queries', () => { + it('resolves const selectors and includes `queries:` metadata after member queries', () => { + const [component] = extractComponentMetadataSync( + ` +import { Component, ContentChild, ViewChild } from '@angular/core'; + +const SEL = 'ref'; + +@Component({ + selector: 'app-x', + template: '
', + queries: { + fromMetaView: new ViewChild('metaRef'), + fromMetaContent: new ContentChild('metaContent', { descendants: false }), + }, +}) +export class X { + @ViewChild(SEL) member: any; + @ContentChild('memberContent') memberContent: any; +} +`, + 'x.component.ts', + ) + + expect(component.viewQueries?.map((q) => [q.propertyName, q.predicate])).toEqual([ + ['member', '["ref"]'], + ['fromMetaView', '["metaRef"]'], + ]) + expect(component.queries?.map((q) => [q.propertyName, q.predicate, q.descendants])).toEqual([ + ['memberContent', '["memberContent"]', true], + ['fromMetaContent', '["metaContent"]', false], + ]) + }) +}) + +// ngtsc reads `@NS.Input()` and the other member decorators only when `NS` is a +// namespace import of `@angular/core`. +describe('extractComponentMetadataSync namespaced member decorators', () => { + const source = (module: string) => ` +import { Component } from '@angular/core'; +import * as NS from '${module}'; + +@Component({ selector: 'app-x', template: '
' }) +export class X { + @NS.Input() value!: string; + @NS.Output() changed: any; + @NS.ViewChild('ref') ref: any; + @NS.HostListener('click') onClick() {} +} +` + + it('reads them through a namespace import of @angular/core', () => { + const [component] = extractComponentMetadataSync(source('@angular/core'), 'x.component.ts') + expect(component.inputs?.map((i) => i.classPropertyName)).toEqual(['value']) + expect(component.outputs?.map((o) => o.classPropertyName)).toEqual(['changed']) + expect(component.viewQueries?.map((q) => q.propertyName)).toEqual(['ref']) + expect(component.host?.listeners).toEqual([['(click)', 'onClick()']]) + }) + + it('ignores them through any other namespace', () => { + const [component] = extractComponentMetadataSync(source('foreign-decorators'), 'x.component.ts') + expect(component.inputs ?? []).toEqual([]) + expect(component.outputs ?? []).toEqual([]) + expect(component.viewQueries ?? []).toEqual([]) + expect(component.host?.listeners ?? []).toEqual([]) + }) +})