diff --git a/crates/oxc_angular_compiler/src/component/decorator.rs b/crates/oxc_angular_compiler/src/component/decorator.rs index 604dad1c9..a9ec45c00 100644 --- a/crates/oxc_angular_compiler/src/component/decorator.rs +++ b/crates/oxc_angular_compiler/src/component/decorator.rs @@ -20,6 +20,7 @@ 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, + resolve_member_transforms, }; use crate::output::oxc_converter::convert_oxc_expression; @@ -263,12 +264,13 @@ pub fn extract_component_metadata<'a>( // Inputs/outputs from the `inputs:`/`outputs:` metadata, overridden by // @Input/@Output/signal members ({...fromMeta, ...fromFields} in ngtsc). - let io = parse_decorator_io(allocator, config_obj, source_text, consts); + 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), |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() diff --git a/crates/oxc_angular_compiler/src/component/transform.rs b/crates/oxc_angular_compiler/src/component/transform.rs index 7ae089c32..2a2798183 100644 --- a/crates/oxc_angular_compiler/src/component/transform.rs +++ b/crates/oxc_angular_compiler/src/component/transform.rs @@ -2536,6 +2536,30 @@ 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 { diff --git a/crates/oxc_angular_compiler/src/directive/decorator.rs b/crates/oxc_angular_compiler/src/directive/decorator.rs index 75fe699da..38d2092f2 100644 --- a/crates/oxc_angular_compiler/src/directive/decorator.rs +++ b/crates/oxc_angular_compiler/src/directive/decorator.rs @@ -15,7 +15,7 @@ use oxc_diagnostics::OxcDiagnostic; use oxc_span::{GetSpan, Span}; use oxc_str::Ident; -use super::evaluator::{Evaluator, FileScope, Prop, Value}; +use super::evaluator::{Evaluator, FileScope, Prop, RefKind, Value, transform_error}; use super::metadata::{ R3DirectiveMetadata, R3DirectiveMetadataBuilder, R3HostDirectiveMetadata, R3HostMetadata, R3InputMetadata, @@ -120,7 +120,7 @@ pub fn extract_directive_metadata<'a>( // Track host metadata from the decorator let mut host_from_decorator: Option> = None; - let io = config_obj.map(|obj| parse_decorator_io(allocator, obj, source_text, consts)); + let io = config_obj.map(|obj| parse_decorator_io(allocator, obj, class, source_text, consts)); // Parse each property in the config object (if present) if let Some(config_obj) = config_obj { @@ -214,6 +214,7 @@ pub fn extract_directive_metadata<'a>( let fields = std::mem::replace(&mut metadata.outputs, Vec::new_in(&allocator)); metadata.outputs = merge_by_class_property(io.outputs, fields, |o| o.0.as_str()); } + resolve_member_transforms(allocator, class, source_text, consts, &mut metadata.inputs); // Merge host metadata from decorator into the existing host metadata if let Some(decorator_host) = host_from_decorator { @@ -674,18 +675,28 @@ pub(super) fn config_property<'a>( }) } -/// ngtsc's error for `value` in `@Directive.{field}`, or, when the value comes -/// from another module, why oxc can't tell (ngtsc would read that file). -fn io_error(field: &str, message: impl FnOnce() -> String, value: &Value<'_>) -> String { +/// ngtsc's error for a `value` of the wrong type (`message` and the line +/// describing the value), or, when the value comes from another module, why oxc +/// can't tell: ngtsc would read that file, and `subject` depends on it. +pub(super) fn value_error( + subject: &str, + message: impl FnOnce() -> String, + value: &Value<'_>, +) -> String { match value { Value::Reference { name, .. } if value.is_import() => format!( - "@Directive.{field} depends on '{name}', which is imported from another module. \ + "{subject} depends on '{name}', which is imported from another module. \ OXC compiles one file at a time and cannot evaluate values from other files." ), _ => format!("{}{}", message(), value.wrong_type_suffix()), } } +/// [`value_error`] for `value` in `@Directive.{field}`. +fn io_error(field: &str, message: impl FnOnce() -> String, value: &Value<'_>) -> String { + value_error(&format!("@Directive.{field}"), message, value) +} + /// oxc's error for a transform written inside a function that the metadata /// calls, using that function's parameters (`transform: (v) => v + name`), so /// it would mean something else, or nothing, where the metadata is compiled. @@ -694,19 +705,40 @@ fn io_error(field: &str, message: impl FnOnce() -> String, value: &Value<'_>) -> /// The same for a transform written in a namespace that uses the namespace's /// declarations (`transform: fn`, with `fn` declared in the namespace), for /// which ngtsc emits the bare names. -fn scoped_transform_error(input: &str, expr: &Expression<'_>, consts: &StringConsts<'_>) -> String { +/// +/// `subject` is where the transform is declared: `@Directive.inputs` or `@Input`. +fn scoped_transform_error( + subject: &str, + input: &str, + expr: &Expression<'_>, + consts: &StringConsts<'_>, +) -> String { match consts.scope().namespace_used_by(expr) { Some(namespace) => format!( - "@Directive.inputs: the transform of \"{input}\" uses a declaration of namespace \ + "{subject}: the transform of \"{input}\" uses a declaration of namespace \ {namespace}, which isn't in scope outside it. OXC can't emit it there." ), None => format!( - "@Directive.inputs: the transform of \"{input}\" uses a parameter of the function \ + "{subject}: the transform of \"{input}\" uses a parameter of the function \ it's written in. OXC can't emit it outside that function." ), } } +/// Whether [`transform_expression`] has no expression to emit for a transform +/// it was given, because it uses the parameters of the function it's written +/// in (see [`scoped_transform_error`]). +fn is_out_of_scope(transform: &Prop<'_>, consts: &StringConsts<'_>) -> bool { + transform.expr.is_some() && transform.origin.is_none() && !is_named_function(transform, consts) +} + +/// Whether a transform is emitted as the name of the same-file function it +/// resolves to (see [`transform_expression`]). +fn is_named_function(transform: &Prop<'_>, consts: &StringConsts<'_>) -> bool { + matches!(&transform.value, Value::Reference { name, kind: RefKind::Function(function, _) } + if consts.scope().is_top_level_function(name, function)) +} + /// Parse `inputs:` / `outputs:` from a decorator metadata object. /// /// Reference: `parseInputsArray` / `parseOutputsArray` in @@ -714,6 +746,7 @@ fn scoped_transform_error(input: &str, expr: &Expression<'_>, consts: &StringCon pub(crate) fn parse_decorator_io<'a>( allocator: &'a Allocator, config: &'a ObjectExpression<'a>, + class: &'a Class<'a>, source_text: Option<&'a str>, consts: &StringConsts<'a>, ) -> DecoratorIo<'a> { @@ -743,19 +776,29 @@ pub(crate) fn parse_decorator_io<'a>( ); None } - Value::Object(_) => { - parse_input_object(allocator, &mut io, item, i, source_text, consts) - } - other => Some(io_error( - "inputs", - || { - "@Directive.inputs array can only contain strings or object literals" - .into() - }, - other, + Value::Object(_) => parse_input_object( + allocator, + &mut io, + item, + i, + class, + span, + source_text, + consts, + ), + other => Some(( + io_error( + "inputs", + || { + "@Directive.inputs array can only contain strings or object literals" + .into() + }, + other, + ), + span, )), }; - io.input_error = io.input_error.take().or(error.map(|e| (e, span))); + io.input_error = io.input_error.take().or(error); } } other => { @@ -815,16 +858,20 @@ fn parse_mapping_string(value: &str) -> (&str, &str) { (field, parts.next().unwrap_or(field)) } -/// `{ name, alias?, required?, transform? }` at `position` in the `inputs:` array. -/// Returns ngtsc's error, if any. +/// `{ name, alias?, required?, transform? }` at `position` in the `inputs:` +/// array, whose value is at `span`. Returns ngtsc's error, if any, and the +/// node it reports it on. +#[expect(clippy::too_many_arguments)] fn parse_input_object<'a>( allocator: &'a Allocator, io: &mut DecoratorIo<'a>, item: &Value<'a>, position: usize, + class: &'a Class<'a>, + span: Span, source_text: Option<&'a str>, consts: &StringConsts<'a>, -) -> Option { +) -> Option<(String, Span)> { let name = match item.prop("name").map(|p| &p.value) { Some(Value::String(name)) => name.as_str(), other => { @@ -833,26 +880,34 @@ fn parse_input_object<'a>( "Value at position {position} of @Directive.inputs array must have a \"name\" property" ) }; - return Some(io_error("inputs", message, other.unwrap_or(&Value::Undefined))); + return Some((io_error("inputs", message, other.unwrap_or(&Value::Undefined)), span)); } }; // ngtsc would read an imported alias or `required` flag from its file; oxc // can't, and guessing would compile the wrong binding. for key in ["alias", "required"] { if let Some(value) = item.prop(key).map(|p| &p.value).filter(|v| v.is_import()) { - return Some(io_error("inputs", String::new, value)); + return Some((io_error("inputs", String::new, value), span)); } } let alias = item.prop("alias").and_then(|p| p.value.as_str()).unwrap_or(name); let required = matches!(item.prop("required").map(|p| &p.value), Some(Value::Bool(true))); - let transform_function = match item.prop("transform") { - Some(Prop { expr: Some(expr), origin: None, .. }) => { - return Some(scoped_transform_error(name, expr, consts)); - } + let (transform_function, error) = match item.prop("transform") { Some(transform) => { - transform.origin.and_then(|e| convert_oxc_expression(allocator, e, source_text)) + let expr = transform_expression(allocator, transform, source_text, consts); + let error = + transform_error(transform, Some(position), name, class, consts.scope(), span) + .or_else(|| match transform { + Prop { expr: Some(written), .. } if is_out_of_scope(transform, consts) => { + let message = + scoped_transform_error("@Directive.inputs", name, written, consts); + Some((message, span)) + } + _ => None, + }); + (expr, error) } - None => None, + None => (None, None), }; upsert_input( &mut io.inputs, @@ -864,7 +919,57 @@ fn parse_input_object<'a>( transform_function, }, ); - None + error +} + +/// The expression ngtsc emits for a transform: a function written in place, or +/// the identifier of the declaration it resolved to (`T.f` where +/// `const T = { f }` becomes `f`). For a static method that identifier isn't in +/// scope, so the written expression is kept there, as it can be written where +/// the metadata is compiled (see [`Prop::origin`]): `None` when it can't. +pub(crate) fn transform_expression<'a>( + allocator: &'a Allocator, + transform: &Prop<'a>, + source_text: Option<&'a str>, + consts: &StringConsts<'a>, +) -> Option> { + match &transform.value { + Value::Reference { name, .. } if is_named_function(transform, consts) => { + Some(OutputAstBuilder::variable(allocator, Ident::from(allocator.alloc_str(name)))) + } + _ => convert_oxc_expression(allocator, transform.origin?, source_text), + } +} + +/// Give `@Input({ transform })` members the transform expression ngtsc emits +/// (see [`transform_expression`]), in place of the one written. +pub(crate) fn resolve_member_transforms<'a>( + allocator: &'a Allocator, + class: &'a Class<'a>, + source_text: Option<&'a str>, + consts: &StringConsts<'a>, + inputs: &mut [R3InputMetadata<'a>], +) { + let evaluator = Evaluator::new(consts); + for element in &class.body.body { + let (key, decorators) = match element { + ClassElement::PropertyDefinition(p) => (&p.key, &p.decorators), + ClassElement::AccessorProperty(p) => (&p.key, &p.decorators), + ClassElement::MethodDefinition(m) => (&m.key, &m.decorators), + _ => continue, + }; + let Some(name) = key.static_name() else { continue }; + let options = super::property_decorators::input_decorator_options(decorators); + let Some(options) = options else { continue }; + let options = evaluator.evaluate(options); + let Some(transform) = options.prop("transform") else { continue }; + let Some(input) = inputs.iter_mut().find(|i| i.class_property_name == name.as_ref()) else { + continue; + }; + if let Some(expr) = transform_expression(allocator, transform, source_text, consts) { + input.transform_function = Some(expr); + } + } } /// ngtsc's `{...fromMeta, ...fromFields}` keyed by class property name: a member @@ -932,7 +1037,7 @@ pub(crate) fn angular_decorator_config<'a>( /// 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 +/// (`extractDirectiveMetadata`): `inputs:`, `@Input` members, `outputs:`, then /// output members. ngtsc stops at the first one. /// /// Each error points where ngtsc's does: the `inputs:` / `outputs:` value, or @@ -945,7 +1050,7 @@ pub fn decorator_io_errors<'a>( 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, None, consts)); + let io = config.map(|config| parse_decorator_io(allocator, config, class, None, 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(), @@ -953,18 +1058,59 @@ pub fn decorator_io_errors<'a>( ), None => Default::default(), }; + let evaluator = Evaluator::new(consts); + let input_members = || { class.body.body.iter().find_map(|element| { - let ClassElement::PropertyDefinition(prop) = element else { return None }; - let name = prop.key.static_name()?; + let (key, decorators, value) = match element { + ClassElement::PropertyDefinition(p) => (&p.key, &p.decorators, p.value.as_ref()), + ClassElement::AccessorProperty(p) => (&p.key, &p.decorators, p.value.as_ref()), + ClassElement::MethodDefinition(m) => (&m.key, &m.decorators, None), + _ => return None, + }; + let name = key.static_name()?; + // `@Input({ transform })` + let options = super::property_decorators::input_decorator_options(decorators); + if let Some(options) = options { + let span = options.span(); + let options = evaluator.evaluate(options); + // ngtsc reads imported options (or an imported alias or + // `required`) from their file; oxc can't, and compiling the + // input without them would be a different binding. + let imported = std::iter::once(&options) + .chain( + ["alias", "required"].iter().filter_map(|k| Some(&options.prop(k)?.value)), + ) + .find(|value| value.is_import()); + if let Some(value) = imported { + return Some((value_error("@Input", String::new, value), span)); + } + if let Some(transform) = options.prop("transform") { + let error = + transform_error(transform, None, &name, class, consts.scope(), span) + .or_else(|| match transform { + Prop { expr: Some(written), .. } + if is_out_of_scope(transform, consts) => + { + let message = + scoped_transform_error("@Input", &name, written, consts); + Some((message, span)) + } + _ => None, + }); + if error.is_some() { + return error; + } + } + } // A signal input only collides with a metadata entry of the same name. - let value = prop.value.as_ref().filter(|_| meta_inputs.contains(&name.as_ref()))?; + let value = value.filter(|_| meta_inputs.contains(&name.as_ref()))?; let is_input = is_initializer_api_call(value, consts, &[INPUT_API, MODEL_API]); is_input.then(|| { let message = format!( "Input \"{name}\" is also declared as non-signal in @{decorator_name}." ); - (message, prop.span) + (message, element.span()) }) }) }; diff --git a/crates/oxc_angular_compiler/src/directive/evaluator.rs b/crates/oxc_angular_compiler/src/directive/evaluator.rs index 112404cbe..a02c214c4 100644 --- a/crates/oxc_angular_compiler/src/directive/evaluator.rs +++ b/crates/oxc_angular_compiler/src/directive/evaluator.rs @@ -18,14 +18,17 @@ use oxc_ast::ast::{ Class, ClassElement, ComputedMemberExpression, ConditionalExpression, Declaration, ExportDefaultDeclarationKind, Expression, ForInStatement, ForOfStatement, ForStatement, ForStatementInit, ForStatementLeft, FormalParameters, Function, FunctionBody, - IdentifierReference, ImportDeclarationSpecifier, LogicalExpression, MethodDefinitionKind, - ModuleExportName, ObjectExpression, ObjectPropertyKind, Program, PropertyKey, PropertyKind, - Statement, StaticBlock, StaticMemberExpression, Super, SwitchStatement, TSEnumDeclaration, - TSEnumMemberName, TSInterfaceDeclaration, TSLiteral, TSModuleReference, TSNamespaceDeclaration, - TSNamespaceDeclarationBody, TSQualifiedName, TSTupleElement, TSType, TSTypeAliasDeclaration, - TSTypeName, TSTypeOperatorOperator, TSTypeParameterDeclaration, TSTypeParameterInstantiation, - TSTypeQueryExprName, TemplateLiteral, ThisExpression, UnaryExpression, VariableDeclaration, - VariableDeclarationKind, + IdentifierReference, ImportDeclarationSpecifier, LogicalExpression, MethodDefinition, + MethodDefinitionKind, ModuleExportName, ObjectExpression, ObjectPropertyKind, Program, + PropertyKey, PropertyKind, Statement, StaticBlock, StaticMemberExpression, Super, + SwitchStatement, TSCallSignatureDeclaration, TSConditionalType, + TSConstructSignatureDeclaration, TSConstructorType, TSEnumDeclaration, TSEnumMemberName, + TSFunctionType, TSInferType, TSInterfaceDeclaration, TSLiteral, TSMappedType, + TSMethodSignature, TSModuleReference, TSNamespaceDeclaration, TSNamespaceDeclarationBody, + TSQualifiedName, TSTupleElement, TSType, TSTypeAliasDeclaration, TSTypeName, + TSTypeOperatorOperator, TSTypeParameterDeclaration, TSTypeParameterInstantiation, + TSTypeQueryExprName, TSTypeReference, TemplateLiteral, ThisExpression, UnaryExpression, + VariableDeclaration, VariableDeclarationKind, }; use oxc_ast_visit::{Visit, walk}; use oxc_span::{GetSpan, Span}; @@ -44,13 +47,25 @@ pub(crate) struct FileScope<'a> { /// there's none) and how many body-less declarations (overloads, /// `declare function`) come with it. functions: HashMap<&'a str, (&'a Function<'a>, usize)>, + /// The first declaration of each function (its first overload, if any), + /// which is the one ngtsc checks as an input transform. + first_functions: HashMap<&'a str, &'a Function<'a>>, enums: HashMap<&'a str, &'a TSEnumDeclaration<'a>>, classes: HashMap<&'a str, &'a Class<'a>>, imports: HashMap<&'a str, Import<'a>>, - /// Names exported from the file (`export ...` and `export { ... }`). + /// Names exported from the file (`export ...`, `export { ... }` and + /// `export default name`). exported: HashSet<&'a str>, - /// Interfaces, type aliases, classes and enums declared in the file. - types: HashSet<&'a str>, + /// Interfaces, type aliases, classes and enums declared in the file, and + /// whether the first declaration of each is itself marked `export`. + types: HashMap<&'a str, bool>, + /// Where each top-level function, class and variable is first declared, as + /// ngtsc's diagnostics point at it: the whole statement (with `export`) for + /// a function or class, the declarator (`x: T`) for a variable. + declaration_spans: HashMap<&'a str, Span>, + /// Namespaces and `import x = ...` aliases: declared in the file, but not + /// read by the evaluator (their values are dynamic). + unread: HashSet<&'a str>, /// Import-equals aliases (`import A = NS.T`, `export import A = NS`, /// `import A = require('m')`): what each stands for. aliases: HashMap<&'a str, &'a TSModuleReference<'a>>, @@ -91,14 +106,17 @@ struct NamespaceBlock<'a> { /// The namespace's name, qualified from the top level (`A.B`). name: String, span: Span, + /// The statement that declares it (with `export`), where ngtsc's + /// diagnostics point. + statement: Span, } /// What `typeof A.B.X` names, for `A.B` a namespace the file declares. enum Qualified<'a> { /// The value `X` declared (and exported) in a namespace block. Declared(usize, &'a str), - /// The (instantiated) namespace `X`. - Namespace(&'a str), + /// The (instantiated) namespace `X`, and its id. + Namespace(&'a str, usize), /// Nothing TypeScript can resolve: `X` isn't exported, or doesn't exist. Missing, } @@ -159,7 +177,7 @@ impl<'a> FileScope<'a> { } } Statement::ExportDeclaration(export) => { - scope.declaration(&export.declaration, true); + scope.declaration(&export.declaration, true, export.span); } Statement::ExportNamedDeclaration(export) => { for spec in &export.specifiers { @@ -170,16 +188,22 @@ impl<'a> FileScope<'a> { } Statement::ExportDefaultDeclaration(export) => match &export.declaration { ExportDefaultDeclarationKind::ClassDeclaration(class) => { - scope.class(class, true); + scope.class(class, true, export.span); } ExportDefaultDeclarationKind::FunctionDeclaration(function) => { - scope.function(function, true); + scope.function(function, true, export.span); + } + ExportDefaultDeclarationKind::TSInterfaceDeclaration(i) => { + scope.types.entry(i.id.name.as_str()).or_insert(true); + } + ExportDefaultDeclarationKind::Identifier(id) => { + scope.exported.insert(id.name.as_str()); } _ => {} }, _ => { if let Some(decl) = stmt.as_declaration() { - scope.declaration(decl, false); + scope.declaration(decl, false, decl.span()); } } } @@ -192,8 +216,15 @@ impl<'a> FileScope<'a> { None => continue, }, }; - if let Declaration::TSNamespaceDeclaration(ns) = decl { - scope.namespace(ns, None, exported, false); + match decl { + Declaration::TSNamespaceDeclaration(ns) => { + scope.unread.insert(ns.id.name.as_str()); + scope.namespace(ns, None, exported, false, stmt.span()); + } + Declaration::TSImportEqualsDeclaration(alias) => { + scope.unread.insert(alias.id.name.as_str()); + } + _ => {} } } scope.mark_instantiated(); @@ -201,13 +232,15 @@ impl<'a> FileScope<'a> { } /// Collects the namespace `ns`, declared in `parent` (`None`: at the top - /// level), and in an ambient context (`declare namespace`) if `ambient`. + /// level) by `statement`, and in an ambient context (`declare namespace`) + /// if `ambient`. fn namespace( &mut self, ns: &'a TSNamespaceDeclaration<'a>, parent: Option, exported: bool, ambient: bool, + statement: Span, ) { let name = ns.id.name.as_str(); // Every declaration in an ambient namespace is exported, with or @@ -243,12 +276,13 @@ impl<'a> FileScope<'a> { parent, name: qualified, span: ns.span, + statement, ..NamespaceBlock::default() }); let statements = match &ns.body { // `namespace A.B {}`: `B` is an exported member of `A`. TSNamespaceDeclarationBody::TSNamespaceDeclaration(inner) => { - self.namespace(inner, Some(index), true, ambient); + self.namespace(inner, Some(index), true, ambient, inner.span); return; } TSNamespaceDeclarationBody::TSModuleBlock(block) => &block.body, @@ -256,14 +290,20 @@ impl<'a> FileScope<'a> { let mut scope = FileScope::default(); let mut nested = std::vec::Vec::new(); for stmt in statements { - let (decl, exported) = match stmt { - Statement::ExportDeclaration(export) => (&export.declaration, true), + let (decl, exported, span) = match stmt { + Statement::ExportDeclaration(export) => (&export.declaration, true, export.span), _ => match stmt.as_declaration() { - Some(decl) => (decl, ambient), + Some(decl) => (decl, false, decl.span()), None => continue, }, }; - scope.declaration(decl, exported); + scope.declaration(decl, exported, span); + // Without `export` it isn't statically exported for ngtsc (see + // `UnexportedType`), but still visible outside the namespace. + let exported = exported || ambient; + if exported { + scope.exported.extend(value_names(decl)); + } match decl { Declaration::FunctionDeclaration(f) => { self.declared_in.insert(std::ptr::from_ref::(f) as usize, index); @@ -277,13 +317,15 @@ impl<'a> FileScope<'a> { } } } - Declaration::TSNamespaceDeclaration(inner) => nested.push((&**inner, exported)), + Declaration::TSNamespaceDeclaration(inner) => { + nested.push((&**inner, exported, span)); + } _ => {} } } self.blocks[index].scope = scope; - for (inner, exported) in nested { - self.namespace(inner, Some(index), exported, ambient); + for (inner, exported, span) in nested { + self.namespace(inner, Some(index), exported, ambient, span); } } @@ -292,15 +334,9 @@ impl<'a> FileScope<'a> { fn mark_instantiated(&mut self) { loop { let before = self.instantiated.len(); - for block in &self.blocks { - let scope = &block.scope; - let values = !scope.variables.is_empty() - || !scope.functions.is_empty() - || !scope.classes.is_empty() - || !scope.enums.is_empty() - || block.namespaces.values().any(|id| self.instantiated.contains(id)); - if values && !self.instantiated.contains(&block.namespace) { - self.instantiated.insert(block.namespace); + for b in 0..self.blocks.len() { + if self.block_has_values(b) { + self.instantiated.insert(self.blocks[b].namespace); } } if self.instantiated.len() == before { @@ -309,6 +345,65 @@ impl<'a> FileScope<'a> { } } + /// Whether the namespace block `b` declares a value: a variable, + /// function, class or enum, or an instantiated namespace. + fn block_has_values(&self, b: usize) -> bool { + let block = &self.blocks[b]; + let scope = &block.scope; + !scope.variables.is_empty() + || !scope.functions.is_empty() + || !scope.classes.is_empty() + || !scope.enums.is_empty() + || block.namespaces.values().any(|id| self.instantiated.contains(id)) + } + + /// A reference to the (instantiated) namespace `name` with the id `id`, + /// which ngtsc points at the first declaration of it that declares a value. + fn namespace_reference<'v>(&self, name: &str, id: usize) -> Value<'v> { + let span = (0..self.blocks.len()) + .find(|&b| self.blocks[b].namespace == id && self.block_has_values(b)) + .map_or(Span::default(), |b| self.blocks[b].statement); + Value::Reference { name: name.into(), kind: RefKind::Namespace(span) } + } + + /// The innermost namespace block whose declaration contains `span`. + fn block_at(&self, span: Span) -> Option { + (0..self.blocks.len()) + .filter(|&b| self.blocks[b].span.contains_inclusive(span)) + .min_by_key(|&b| self.blocks[b].span.size()) + } + + /// For a type named `name` in the namespace block `block` (`None`: at the + /// top level), whether ngtsc's `isStaticallyExported` holds for the + /// declaration it resolves to (see [`Self::type_is_exported`]): in a + /// namespace, whether it's marked `export`. `None` for a name the file + /// doesn't declare as a type. + fn type_is_exported_in(&self, block: Option, name: &str) -> Option { + let mut current = block; + while let Some(b) = current { + let namespace = self.blocks[b].namespace; + if let Some(exported) = self.blocks[b].scope.types.get(name) { + return Some(*exported); + } + // Exported from another body of the namespace. + if self + .blocks + .iter() + .any(|o| o.namespace == namespace && o.scope.types.get(name) == Some(&true)) + { + return Some(true); + } + current = self.blocks[b].parent; + } + self.type_is_exported(name) + } + + /// The declarations of the scope (a namespace block or the top level) the + /// function, static method or class `node` is declared in. + fn scope_of(&self, node: &T) -> &FileScope<'a> { + self.declarations(self.block_of(node)) + } + /// Whether the namespace block `b` itself declares the value `name`: a /// variable, function, class, enum, import-equals alias or instantiated /// namespace. @@ -432,10 +527,12 @@ impl<'a> FileScope<'a> { None => return Some(Qualified::Missing), } } - Some(match self.exporting_block(namespace, last) { - Some(b) if self.blocks[b].namespaces.contains_key(last) => Qualified::Namespace(last), - Some(b) => Qualified::Declared(b, last), - None => Qualified::Missing, + let Some(b) = self.exporting_block(namespace, last) else { + return Some(Qualified::Missing); + }; + Some(match self.blocks[b].namespaces.get(last) { + Some(id) => Qualified::Namespace(last, *id), + None => Qualified::Declared(b, last), }) } @@ -443,17 +540,14 @@ impl<'a> FileScope<'a> { /// that namespace's declarations (or an enclosing one's), which don't /// resolve at the top level. pub(crate) fn namespace_used_by(&self, expr: &Expression<'a>) -> Option<&str> { - let span = expr.span(); - let block = (0..self.blocks.len()) - .filter(|&b| self.blocks[b].span.contains_inclusive(span)) - .min_by_key(|&b| self.blocks[b].span.size())?; + let block = self.block_at(expr.span())?; let frame = Frame::at(Some(block)); let mut uses = UsesFrame::new(&frame, self); uses.visit_expression(expr); uses.found.then(|| self.blocks[block].name.as_str()) } - fn declaration(&mut self, decl: &'a Declaration<'a>, exported: bool) { + fn declaration(&mut self, decl: &'a Declaration<'a>, exported: bool, span: Span) { let name = |scope: &mut Self, name: &'a str| { if exported { scope.exported.insert(name); @@ -473,24 +567,25 @@ impl<'a> FileScope<'a> { None => Variable::Uninitialized, }; self.variables.entry(id).or_insert(variable); + self.declaration_spans.entry(id).or_insert(var.span); name(self, id); } } } - Declaration::FunctionDeclaration(function) => self.function(function, exported), - Declaration::ClassDeclaration(class) => self.class(class, exported), + Declaration::FunctionDeclaration(function) => self.function(function, exported, span), + Declaration::ClassDeclaration(class) => self.class(class, exported, span), Declaration::TSEnumDeclaration(e) => { let id = e.id.name.as_str(); self.enums.entry(id).or_insert(e); - self.types.insert(id); + self.types.entry(id).or_insert(exported); name(self, id); } Declaration::TSInterfaceDeclaration(i) => { - self.types.insert(i.id.name.as_str()); + self.types.entry(i.id.name.as_str()).or_insert(exported); name(self, i.id.name.as_str()); } Declaration::TSTypeAliasDeclaration(t) => { - self.types.insert(t.id.name.as_str()); + self.types.entry(t.id.name.as_str()).or_insert(exported); name(self, t.id.name.as_str()); } Declaration::TSImportEqualsDeclaration(alias) => { @@ -501,12 +596,49 @@ impl<'a> FileScope<'a> { } } - fn function(&mut self, function: &'a Function<'a>, exported: bool) { + /// Whether `function` is the top-level function declaration called `name` + /// (whose name is in scope where the metadata is compiled), rather than a + /// static method. + pub(crate) fn is_top_level_function(&self, name: &str, function: &Function<'_>) -> bool { + self.functions.get(name).is_some_and(|(f, _)| std::ptr::eq(*f, function)) + } + + /// The first declaration of the function or static method `name` whose + /// implementation is `function`: its first overload, if any. That's + /// TypeScript's value declaration, the one ngtsc checks as a transform. + fn first_declaration(&self, name: &str, function: &'a Function<'a>) -> &'a Function<'a> { + // In the namespace it's declared in, if any. + let scope = self.scope_of(function); + if scope.is_top_level_function(name, function) { + return scope.first_functions.get(name).copied().unwrap_or(function); + } + scope.first_static_method(function).map_or(function, |m| &m.value) + } + + /// The first declaration of the static method whose implementation is + /// `function`. + fn first_static_method(&self, function: &Function<'_>) -> Option<&'a MethodDefinition<'a>> { + self.classes.values().find_map(|class| { + let methods = || { + class.body.body.iter().filter_map(|el| match el { + ClassElement::MethodDefinition(m) if m.r#static => Some(&**m), + _ => None, + }) + }; + let method = methods().find(|m| std::ptr::eq(&*m.value, function))?; + let name = method.key.static_name()?; + methods().find(|m| m.key.static_name().is_some_and(|n| n == name)) + }) + } + + fn function(&mut self, function: &'a Function<'a>, exported: bool, span: Span) { let Some(id) = &function.id else { return }; let id = id.name.as_str(); if exported { self.exported.insert(id); } + self.declaration_spans.entry(id).or_insert(span); + self.first_functions.entry(id).or_insert(function); // Overloads are body-less declarations followed by the implementation. let entry = self.functions.entry(id).or_insert((function, 0)); if function.body.is_none() { @@ -517,19 +649,118 @@ impl<'a> FileScope<'a> { } } - fn class(&mut self, class: &'a Class<'a>, exported: bool) { + fn class(&mut self, class: &'a Class<'a>, exported: bool, span: Span) { let Some(id) = &class.id else { return }; let id = id.name.as_str(); self.classes.insert(id, class); - self.types.insert(id); + self.declaration_spans.entry(id).or_insert(span); + self.types.entry(id).or_insert(exported); if exported { self.exported.insert(id); } } + /// For a type declared in the file, whether ngtsc's `isStaticallyExported` + /// holds for the declaration the name resolves to: `None` for a name the + /// file doesn't declare as a type. + /// + /// A name with a value declaration (a class or enum, or a variable or + /// function merged with the type) resolves to it, and a value is also + /// exported by `export { X }` or `export default X`. An interface or type + /// alias has no value declaration: only its own `export` counts. + fn type_is_exported(&self, name: &str) -> Option { + let exported_itself = *self.types.get(name)?; + let has_value = self.classes.contains_key(name) + || self.enums.contains_key(name) + || self.variables.contains_key(name) + || self.functions.contains_key(name); + Some(if has_value { self.exported.contains(name) } else { exported_itself }) + } + pub(crate) fn import(&self, name: &str) -> Option> { self.imports.get(name).copied() } + + /// The expression the top-level variable `name` is initialized with: its + /// initializer or, destructured from an object or array literal, the part + /// it binds (`transform` in `const { transform } = { transform: f }` is `f`). + fn initializer(&self, name: &str) -> Option<&'a Expression<'a>> { + let Variable::Init(init, path) = self.variables.get(name)? else { return None }; + let mut init: &'a Expression<'a> = init; + for key in path { + init = match (key, init.without_parentheses()) { + (PathKey::Key(k), Expression::ObjectExpression(obj)) => { + // A spread could replace the property: only a literal one counts. + let spread = |p: &ObjectPropertyKind<'_>| { + matches!(p, ObjectPropertyKind::SpreadProperty(_)) + }; + if obj.properties.iter().any(spread) { + return None; + } + obj.properties.iter().rev().find_map(|p| match p { + ObjectPropertyKind::ObjectProperty(p) + if !p.computed && p.key.static_name().is_some_and(|n| n == *k) => + { + Some(&p.value) + } + _ => None, + })? + } + // Up to the element, every one must be a plain expression. + (PathKey::Index(i), Expression::ArrayExpression(arr)) => { + let before = arr.elements.get(..=*i)?; + if !before.iter().all(ArrayExpressionElement::is_expression) { + return None; + } + before[*i].as_expression()? + } + _ => return None, + }; + } + Some(init) + } + + /// The type parameters of the innermost same-file function or static + /// method (the functions the evaluator calls) whose body contains `span`. + fn enclosing_type_parameters(&self, span: Span) -> Option<&'a TSTypeParameterDeclaration<'a>> { + // Declared at the top level or in a namespace. + let scopes = || std::iter::once(self).chain(self.blocks.iter().map(|b| &b.scope)); + let methods = scopes().flat_map(|scope| scope.classes.values()).flat_map(|class| { + class.body.body.iter().filter_map(|el| match el { + ClassElement::MethodDefinition(m) if m.r#static => Some(&*m.value), + _ => None, + }) + }); + scopes() + .flat_map(|scope| scope.functions.values()) + .map(|(function, _)| *function) + .chain(methods) + .filter(|f| f.body.as_ref().is_some_and(|body| body.span.contains_inclusive(span))) + .min_by_key(|f| f.span.size()) + .and_then(|f| f.type_parameters.as_deref()) + } +} + +/// The values a declaration declares (not its types, or a namespace). +fn value_names<'a>(decl: &'a Declaration<'a>) -> std::vec::Vec<&'a str> { + let mut names = std::vec::Vec::new(); + match decl { + Declaration::VariableDeclaration(vars) => { + for var in &vars.declarations { + let mut bindings = std::vec::Vec::new(); + collect_bindings(&var.id, &mut std::vec::Vec::new(), &mut bindings); + names.extend(bindings.into_iter().map(|(name, _)| name)); + } + } + Declaration::FunctionDeclaration(f) => { + names.extend(f.id.as_ref().map(|id| id.name.as_str())) + } + Declaration::ClassDeclaration(c) => names.extend(c.id.as_ref().map(|id| id.name.as_str())), + Declaration::TSEnumDeclaration(e) => names.push(e.id.name.as_str()), + Declaration::TSImportEqualsDeclaration(a) => names.push(a.id.name.as_str()), + _ => {} + } + names } /// The names a binding pattern declares, each with its path into the initializer. @@ -606,6 +837,49 @@ fn qualified_parts<'a>(name: &TSQualifiedName<'a>) -> Option { + Function(&'a Function<'a>), + Arrow(&'a ArrowFunctionExpression<'a>), +} + +impl<'a> FnDef<'a> { + fn is_generic(self) -> bool { + match self { + FnDef::Function(f) => f.type_parameters.is_some(), + FnDef::Arrow(f) => f.type_parameters.is_some(), + } + } + + pub(crate) fn params(self) -> &'a FormalParameters<'a> { + match self { + FnDef::Function(f) => &f.params, + FnDef::Arrow(f) => &f.params, + } + } + + fn span(self) -> Span { + match self { + FnDef::Function(f) => f.span, + FnDef::Arrow(f) => f.span, + } + } + + /// The type annotation of the first parameter (after any `this` parameter, + /// which oxc keeps separately): `Ok(None)` when there are no parameters, + /// `Err(())` when the first one has no type. + pub(crate) fn first_param_type(self) -> Result>, ()> { + let params = self.params(); + let annotation = match (params.items.first(), ¶ms.rest) { + (Some(param), _) => ¶m.type_annotation, + (None, Some(rest)) => &rest.type_annotation, + (None, None) => return Ok(None), + }; + annotation.as_ref().map(|t| Some(&t.type_annotation)).ok_or(()) + } +} + /// What a declaration reference resolves to. #[derive(Clone)] pub(crate) enum RefKind<'a> { @@ -613,12 +887,28 @@ pub(crate) enum RefKind<'a> { /// body-less declarations (overloads) that come with it. Function(&'a Function<'a>, usize), Class(&'a Class<'a>), - /// An imported binding, `ns.x` through `import * as ns`, or a value - /// computed from one: its value is in another file. - Import, + /// An imported binding, `ns.x` through `import * as ns` + /// (`namespace_member`), or a value computed from one: its value is in + /// another file. + Import { + namespace_member: bool, + }, /// An identifier with no declaration in this file that names a standard /// ECMAScript global (see [`ES_GLOBALS`]). Global, + /// Any other identifier this file doesn't declare or import: a global + /// declared outside it, in a lib such as the DOM's (`atob`, `window`) or in + /// a project `.d.ts`, which ngtsc resolves to that declaration, or a name + /// declared nowhere, which ngtsc can't resolve. oxc can't tell these apart, + /// so it's dynamic (see [`Value::is_dynamic`]), except that an input + /// transform assumes it's a function, as it does an imported one. + Ambient, + /// A static getter or setter, or a static property without an + /// initializer, declared at the span. + StaticMember(Span), + /// A namespace that declares a value, whose first declaration that does + /// is at the span. + Namespace(Span), /// Any other declaration (a `declare`d variable, an enum member, ...). Other, } @@ -648,6 +938,9 @@ pub(crate) enum Value<'a> { /// `array.slice`, `array.concat` or `string.concat`, which ngtsc can call. Builtin(Builtin<'a>), Dynamic, + /// An arrow or function expression written directly as a property value; + /// the only place ngtsc keeps a function expression analyzable. + Function(FnDef<'a>), } /// ngtsc's `KnownFn`s (partial_evaluator/src/builtin.ts), bound to their receiver. @@ -689,7 +982,13 @@ impl<'a> Value<'a> { /// Whether this is an imported binding (or a value computed from one), which /// can't be evaluated without reading another file. pub(crate) fn is_import(&self) -> bool { - matches!(self, Value::Reference { kind: RefKind::Import, .. }) + matches!(self, Value::Reference { kind: RefKind::Import { .. }, .. }) + } + + /// Whether ngtsc's value is unknown: dynamic, or a global declared outside + /// the file, which is only kept as a name so a transform can refer to it. + pub(crate) fn is_dynamic(&self) -> bool { + matches!(self, Value::Dynamic | Value::Reference { kind: RefKind::Ambient, .. }) } /// ngtsc's `describeResolvedType`, one level deep like its diagnostics. @@ -729,16 +1028,18 @@ impl<'a> Value<'a> { .join(", ") ), Value::Module => "(module)".into(), + _ if self.is_dynamic() => "(not statically analyzable)".into(), Value::Reference { name, .. } | Value::Enum { name, .. } => name.clone(), Value::Builtin(_) => "Function".into(), - Value::Dynamic => "(not statically analyzable)".into(), + Value::Dynamic | Value::Function(_) => "(not statically analyzable)".into(), } } /// The chained line ngtsc's `createValueHasWrongTypeError` adds after a message. pub(crate) fn wrong_type_suffix(&self) -> String { match self { - Value::Dynamic => " Value could not be determined statically.".into(), + Value::Function(_) => " Value could not be determined statically.".into(), + _ if self.is_dynamic() => " Value could not be determined statically.".into(), Value::Reference { name, .. } => format!(" Value is a reference to '{name}'."), _ => format!(" Value is of type '{}'.", self.describe()), } @@ -781,10 +1082,11 @@ fn quote_key(key: &str) -> String { } } -/// The `declare var` / `declare function` globals of TypeScript's ES2022 -/// library (lib.es5.d.ts ... lib.es2022.*.d.ts). ngtsc resolves these to a -/// reference to their declaration; any other undeclared name is unknown to it. -/// DOM globals depend on the `lib` option and are treated as unknown. +/// The `declare var` / `declare function` / `declare namespace` globals of +/// TypeScript's ES2022 library (lib.es5.d.ts ... lib.es2022.*.d.ts), which +/// ngtsc resolves to a reference to their declaration. Other globals (the +/// DOM's, a project's `.d.ts`) depend on the program, and are +/// [`RefKind::Ambient`]. const ES_GLOBALS: &[&str] = &[ "AggregateError", "Array", @@ -812,6 +1114,7 @@ const ES_GLOBALS: &[&str] = &[ "Int16Array", "Int32Array", "Int8Array", + "Intl", "isFinite", "isNaN", "JSON", @@ -826,6 +1129,7 @@ const ES_GLOBALS: &[&str] = &[ "Proxy", "RangeError", "ReferenceError", + "Reflect", "RegExp", "Set", "SharedArrayBuffer", @@ -844,6 +1148,22 @@ const ES_GLOBALS: &[&str] = &[ "WeakSet", ]; +/// The globals in [`ES_GLOBALS`] declared as functions (`declare function`), +/// each with a single signature; the others are `declare var`s. +const ES_GLOBAL_FUNCTIONS: &[&str] = &[ + "decodeURI", + "decodeURIComponent", + "encodeURI", + "encodeURIComponent", + "escape", + "eval", + "isFinite", + "isNaN", + "parseFloat", + "parseInt", + "unescape", +]; + /// Bounds a chain of import-equals aliases (`import A = B; import B = A;`). const MAX_ALIASES: u16 = 64; @@ -1131,9 +1451,45 @@ impl<'s, 'a> Evaluator<'s, 'a> { let Some(key) = self.property_key(&p.key, p.computed, depth, frame) else { return Value::Dynamic; }; - let value = self.eval(&p.value, depth, frame); - let origin = self.origin(&p.value, frame); - props.push(Prop { key, value, expr: Some(&p.value), origin }); + let value = match (&p.value, function_value(&p.value)) { + (_, Some(function)) => function, + // `{ transform }` reads a parameter as it is: ngtsc + // looks a shorthand up by its declaration, which + // doesn't make a function expression opaque the way + // naming it does (see `identifier`). + (Expression::Identifier(id), None) if p.shorthand => { + let name = id.name.as_str(); + match frame.bindings.get(name) { + Some(binding) => binding.value.clone(), + None => match self.slot(frame.block, name) { + Some(slot) => self.stored(slot, depth), + // ngtsc never resolves a shorthand to a global + // it can use as a transform. + None => match self.eval(&p.value, depth, frame) { + value if value.is_dynamic() => Value::Dynamic, + value => value, + }, + }, + } + } + (value, None) => self.eval(value, depth, frame), + }; + let mut expr = &p.value; + let mut origin = self.origin(&p.value, frame); + // A shorthand for a variable stands for its initializer + // (what ngtsc emits, or points its error at). + if let Expression::Identifier(id) = &p.value + && p.shorthand + && !frame.bindings.contains_key(id.name.as_str()) + && let Some((block, name)) = self.slot(frame.block, id.name.as_str()) + && let Some(init) = + self.consts.scope().declarations(block).initializer(name) + && matches!(value, Value::Function(_) | Value::Dynamic) + { + expr = init; + origin = self.origin(init, &Frame::at(block)); + } + props.push(Prop { key, value, expr: Some(expr), origin }); } ObjectPropertyKind::SpreadProperty(spread) => { match self.eval(&spread.argument, depth, frame) { @@ -1168,7 +1524,7 @@ impl<'s, 'a> Evaluator<'s, 'a> { frame: &Frame<'a>, ) -> Value<'a> { let object = self.eval(&m.object, depth, frame); - if matches!(object, Value::Dynamic) { + if object.is_dynamic() { return Value::Dynamic; } match self.eval(&m.expression, depth, frame) { @@ -1187,7 +1543,7 @@ impl<'s, 'a> Evaluator<'s, 'a> { frame: &Frame<'a>, ) -> Value<'a> { match self.eval(&c.test, depth, frame) { - Value::Dynamic => Value::Dynamic, + test if test.is_dynamic() => Value::Dynamic, test if test.is_import() => test, test if test.truthy() => self.eval(&c.consequent, depth, frame), _ => self.eval(&c.alternate, depth, frame), @@ -1206,7 +1562,7 @@ impl<'s, 'a> Evaluator<'s, 'a> { return Value::Dynamic; } match self.eval(&u.argument, depth, frame) { - Value::Dynamic => Value::Dynamic, + value if value.is_dynamic() => Value::Dynamic, value if value.is_import() => value, value => unary(u.operator, &value), } @@ -1245,7 +1601,7 @@ impl<'s, 'a> Evaluator<'s, 'a> { let left = self.eval(&l.left, depth, frame); let right = self.eval(&l.right, depth, frame); match (left, right) { - (Value::Dynamic, _) | (_, Value::Dynamic) => Value::Dynamic, + (left, right) if left.is_dynamic() || right.is_dynamic() => Value::Dynamic, (left, _) if left.is_import() => left, (left, right) => match (l.operator, left.truthy()) { (LogicalOperator::And, true) | (LogicalOperator::Or, false) => right, @@ -1293,7 +1649,13 @@ impl<'s, 'a> Evaluator<'s, 'a> { fn identifier(&self, name: &'a str, depth: u16, frame: &Frame<'a>) -> Value<'a> { if let Some(binding) = frame.bindings.get(name) { - return binding.value.clone(); + return match &binding.value { + // A function expression passed as an argument isn't + // analyzable through the parameter's name (ngtsc wraps it in + // a dynamic value for that identifier). + Value::Function(_) => Value::Dynamic, + value => value.clone(), + }; } let scope = self.consts.scope(); // Inside a namespace, its declarations (and its enclosing ones') come first. @@ -1307,7 +1669,10 @@ impl<'s, 'a> Evaluator<'s, 'a> { return match import.imported { Some(imported) => { let name = if imported == "default" { name } else { imported }; - Value::Reference { name: name.into(), kind: RefKind::Import } + Value::Reference { + name: name.into(), + kind: RefKind::Import { namespace_member: false }, + } } None => Value::Module, }; @@ -1317,8 +1682,11 @@ impl<'s, 'a> Evaluator<'s, 'a> { _ if ES_GLOBALS.contains(&name) => { Value::Reference { name: name.into(), kind: RefKind::Global } } - // ngtsc can't find a declaration for it. - _ => Value::Dynamic, + // TypeScript declares `globalThis` without a declaration ngtsc + // can find. + "globalThis" => Value::Dynamic, + _ if scope.unread.contains(name) => Value::Dynamic, + _ => Value::Reference { name: name.into(), kind: RefKind::Ambient }, } } @@ -1329,7 +1697,13 @@ impl<'s, 'a> Evaluator<'s, 'a> { let file = self.consts.scope(); let scope = file.declarations(block); if scope.variables.contains_key(name) || scope.enums.contains_key(name) { - return Some(self.stored((block, name), depth)); + return Some(match self.stored((block, name), depth) { + // A function expression isn't analyzable through the + // variable's name (ngtsc wraps it in a dynamic value for that + // identifier). + Value::Function(_) => Value::Dynamic, + value => value, + }); } if let Some((function, overloads)) = scope.functions.get(name) { let kind = RefKind::Function(function, *overloads); @@ -1350,7 +1724,7 @@ impl<'s, 'a> Evaluator<'s, 'a> { }; namespace .filter(|id| file.instantiated.contains(id)) - .map(|_| Value::Reference { name: name.into(), kind: RefKind::Other }) + .map(|id| file.namespace_reference(name, *id)) } /// The value of an import-equals alias declared in `block`: what its @@ -1372,8 +1746,7 @@ impl<'s, 'a> Evaluator<'s, 'a> { TSModuleReference::IdentifierReference(id) => { return match scope.namespace_of(block, id.name.as_str(), 0) { Some(ns) if scope.instantiated.contains(&ns) => { - let name = scope.namespace_names[ns]; - Value::Reference { name: name.into(), kind: RefKind::Other } + scope.namespace_reference(scope.namespace_names[ns], ns) } _ => Value::Dynamic, }; @@ -1385,9 +1758,7 @@ impl<'s, 'a> Evaluator<'s, 'a> { Some(Qualified::Declared(b, member)) => { self.declared(Some(b), member, depth).unwrap_or(Value::Dynamic) } - Some(Qualified::Namespace(name)) => { - Value::Reference { name: name.into(), kind: RefKind::Other } - } + Some(Qualified::Namespace(name, id)) => scope.namespace_reference(name, id), _ => Value::Dynamic, } } @@ -1466,12 +1837,28 @@ impl<'s, 'a> Evaluator<'s, 'a> { let (block, name) = slot; match variable { // Declarations don't see the caller's parameters. + // A function expression initializer stays analyzable (ngtsc visits + // it as is); naming the variable makes it opaque (see + // `identifier`), but a shorthand property doesn't (see `object`). Variable::Init(init, path) => { + let scope = self.consts.scope().declarations(block); + if let Some(function) = scope.initializer(name).and_then(function_value) { + return function; + } let mut value = self.eval(init, depth, &Frame::at(block)); for key in path { value = match key { PathKey::Index(i) => self.member(value, Key::Num(*i as f64), depth), - PathKey::Key(k) => self.member(value, Key::Str(k), depth), + // Destructuring reads a property as it is, so a + // function expression there stays analyzable too. + PathKey::Key(k) => match value { + Value::Object(props) => props + .into_iter() + .rev() + .find(|p| p.key == *k) + .map_or(Value::Undefined, |p| p.value), + value => self.member(value, Key::Str(k), depth), + }, PathKey::Unknown => Value::Dynamic, }; if matches!(value, Value::Dynamic) { @@ -1587,8 +1974,8 @@ impl<'s, 'a> Evaluator<'s, 'a> { Some(Qualified::Declared(b, member)) => { return self.declared(Some(b), member, depth).unwrap_or(Value::Dynamic); } - Some(Qualified::Namespace(name)) => { - return Value::Reference { name: name.into(), kind: RefKind::Other }; + Some(Qualified::Namespace(name, id)) => { + return scope.namespace_reference(name, id); } Some(Qualified::Missing) => return Value::Dynamic, None => {} @@ -1600,7 +1987,11 @@ impl<'s, 'a> Evaluator<'s, 'a> { } let imported = matches!(left, TSTypeName::IdentifierReference(id) if self.consts.scope().imports.contains_key(id.name.as_str())); - let kind = if imported { RefKind::Import } else { RefKind::Other }; + let kind = if imported { + RefKind::Import { namespace_member: false } + } else { + RefKind::Other + }; Value::Reference { name: name.right.name.to_string(), kind } } _ => Value::Dynamic, @@ -1672,8 +2063,14 @@ impl<'s, 'a> Evaluator<'s, 'a> { // Each argument's value, and where it was written. let mut args = std::vec::Vec::new(); let mut origins = std::vec::Vec::new(); + // A function expression passed as an argument (or as a default value) + // stays analyzable in the parameter it's bound to, as ngtsc binds the + // value as it is; but not after a spread, or in a rest parameter. + let mut functions = std::vec::Vec::new(); + let mut spread_seen = false; for arg in &call.arguments { if let Argument::SpreadElement(spread) = arg { + spread_seen = true; let values = self.spread(&spread.argument, depth, frame); let known = self .element_origins(&spread.argument, frame) @@ -1682,6 +2079,9 @@ impl<'s, 'a> Evaluator<'s, 'a> { args.extend(values); } else { let expr = arg.to_expression(); + if !spread_seen { + functions.push(function_value(expr)); + } args.push(self.eval(expr, depth, frame)); origins.push(self.origin(expr, frame)); } @@ -1695,11 +2095,17 @@ impl<'s, 'a> Evaluator<'s, 'a> { let binding = match args.get(i + offset) { None | Some(Value::Undefined) if param.initializer.is_some() => { param.initializer.as_ref().map(|init| { - Binding::new(self.eval(init, depth, &scope), self.origin(init, &scope)) + let value = + function_value(init).unwrap_or_else(|| self.eval(init, depth, &scope)); + Binding::new(value, self.origin(init, &scope)) }) } - arg => arg.map(|value| { - Binding::new(value.clone(), origins.get(i + offset).copied().flatten()) + arg => arg.map(|arg| { + let function = functions.get(i + offset).cloned().flatten(); + Binding::new( + function.unwrap_or_else(|| arg.clone()), + origins.get(i + offset).copied().flatten(), + ) }), }; let binding = binding.unwrap_or(Binding::new(Value::Undefined, None)); @@ -1778,9 +2184,15 @@ impl<'s, 'a> Evaluator<'s, 'a> { Key::Num(n) => format_number_like_js(n), }; match object { + // A function expression reached through a property access isn't + // analyzable (`({ f: (v: string) => 1 }).f`). Value::Object(props) => { let key = key_str(); - props.into_iter().rev().find(|p| p.key == key).map_or(Value::Undefined, |p| p.value) + match props.into_iter().rev().find(|p| p.key == key) { + Some(Prop { value: Value::Function(_), .. }) => Value::Dynamic, + Some(p) => p.value, + None => Value::Undefined, + } } Value::Array(items) => match key { Key::Str("length") => Value::Number(items.len() as f64), @@ -1799,15 +2211,17 @@ impl<'s, 'a> Evaluator<'s, 'a> { Value::String(s) if matches!(key, Key::Str("concat")) => { Value::Builtin(Builtin::StringConcat(s)) } - Value::Module => Value::Reference { name: key_str(), kind: RefKind::Import }, + Value::Module => Value::Reference { + name: key_str(), + kind: RefKind::Import { namespace_member: true }, + }, Value::Reference { kind: RefKind::Class(class), .. } => { self.static_member(class, &key_str(), depth) } // The object is in another file, and so is its member. - object @ Value::Reference { kind: RefKind::Import, .. } => object, - Value::Reference { kind: RefKind::Global, .. } => { - Value::Reference { name: key_str(), kind: RefKind::Global } - } + object @ Value::Reference { kind: RefKind::Import { .. }, .. } => object, + // Including a member of a global (`Math.round`): ngtsc only + // resolves the global's own declaration. _ => Value::Dynamic, } } @@ -1821,7 +2235,10 @@ impl<'s, 'a> Evaluator<'s, 'a> { if m.r#static && m.key.static_name().is_some_and(|n| n == key) => { if m.kind != MethodDefinitionKind::Method { - return Value::Reference { name: key.into(), kind: RefKind::Other }; + return Value::Reference { + name: key.into(), + kind: RefKind::StaticMember(m.span), + }; } if m.value.body.is_none() { overloads += 1; @@ -1840,7 +2257,10 @@ impl<'s, 'a> Evaluator<'s, 'a> { let block = self.consts.scope().block_of(class); self.eval(value, depth, &Frame::at(block)) } - None => Value::Reference { name: key.into(), kind: RefKind::Other }, + None => Value::Reference { + name: key.into(), + kind: RefKind::StaticMember(p.span), + }, }; } _ => {} @@ -1855,6 +2275,291 @@ impl<'s, 'a> Evaluator<'s, 'a> { } } +// ============================================================================= +// Input transforms +// ============================================================================= + +/// ngtsc's checks on an input `transform` +/// (`parseDecoratorInputTransformFunction` in +/// packages/compiler-cli/src/ngtsc/annotations/directive/src/shared.ts), with +/// the node each error points at. +/// +/// `position` is the index in the `inputs:` array, `None` for +/// `@Input({ transform })`; `container` is the `inputs:` value or the `@Input` +/// argument, where ngtsc reports a transform that isn't even a reference. +pub(crate) fn transform_error<'a>( + transform: &Prop<'a>, + position: Option, + input_name: &str, + class: &Class<'a>, + scope: &FileScope<'a>, + container: Span, +) -> Option<(String, Span)> { + let value = &transform.value; + let suffix = value.wrong_type_suffix(); + let expr_span = transform.expr.map_or(container, GetSpan::span); + // ngtsc's `value.node`: where the reference is declared, or the expression + // that isn't analyzable. For a declaration in another file, the nearest + // thing in this one is the expression. + let node = || value_node_span(value, expr_span, scope); + let conflicting = format!("ngAcceptInputType_{input_name}"); + let clash = || { + class + .body + .body + .iter() + .any(|el| { + el.r#static() + && el + .property_key() + .and_then(PropertyKey::static_name) + .is_some_and(|n| n == conflicting) + }) + .then(|| { + ( + format!( + "Class cannot have both a transform function on Input {input_name} and a static member called {conflicting}" + ), + node(), + ) + }) + }; + let def = match value { + Value::Function(def) => *def, + Value::Reference { name, kind: RefKind::Function(function, _) } => { + FnDef::Function(scope.first_declaration(name, function)) + } + // An imported function can't be inspected from this file, so whether + // it's generic or overloaded is unknown; the name clash is checked + // after those. + Value::Reference { kind: RefKind::Import { namespace_member: false }, .. } => { + return clash(); + } + // ngtsc can't name `ns.f` in the compiled file. + Value::Reference { kind: RefKind::Import { namespace_member: true }, .. } => { + return clash().or_else(|| { + Some((format!("Input transform function could not be referenced{suffix}"), node())) + }); + } + // A `declare function` of TypeScript's library: neither generic nor + // overloaded. + Value::Reference { name, kind: RefKind::Global } + if ES_GLOBAL_FUNCTIONS.contains(&name.as_str()) => + { + return clash(); + } + // A global declared outside the file (`atob`) is assumed to be a + // function, like an imported one. + Value::Reference { kind: RefKind::Ambient, .. } => return clash(), + Value::Reference { .. } | Value::Dynamic => { + return Some((format!("Input transform must be a function{suffix}"), node())); + } + _ => { + let message = match position { + Some(i) => format!( + "Transform of value at position {i} of @Directive.inputs array must be a function{suffix}" + ), + None => format!("Input transform must be a function{suffix}"), + }; + return Some((message, container)); + } + }; + if def.is_generic() { + return Some((format!("Input transform function cannot be generic{suffix}"), node())); + } + if let Value::Reference { kind: RefKind::Function(_, overloads), .. } = value + && (*overloads).max(1) > 1 + { + return Some(( + format!("Input transform function cannot have multiple signatures{suffix}"), + node(), + )); + } + if let Some(error) = clash() { + return Some(error); + } + match def.first_param_type() { + Ok(None) => None, + Err(()) => Some(( + format!("Input transform function first parameter must have a type{suffix}"), + node(), + )), + Ok(Some(_)) if def.params().items.is_empty() => Some(( + format!( + "Input transform function first parameter cannot be a spread parameter{suffix}" + ), + node(), + )), + Ok(Some(ty)) => { + // An arrow written in a member's `@Input` sees the class's type + // parameters. + let in_class = matches!(value, Value::Function(_)) + && class.body.span.contains_inclusive(def.span()); + let class_params = class.type_parameters.as_deref().filter(|_| in_class); + // One written in a function the metadata calls sees that + // function's type parameters. + let helper_params = match value { + Value::Function(_) => scope.enclosing_type_parameters(def.span()), + _ => None, + }; + // Its types resolve where it's written, in a namespace or not. + let block = scope.block_at(def.span()); + let mut check = + UnexportedType { scope, block, type_params: std::vec::Vec::new(), found: false }; + check.with_params(helper_params, |check| { + check.with_params(class_params, |check| check.visit_ts_type(ty)); + }); + check.found.then(|| { + ( + "Symbol must be exported in order to be used as the type of an Input transform function" + .to_string(), + ty.span(), + ) + }) + } + } +} + +/// The node of ngtsc's `value.node` for a transform: a function expression, +/// the declaration a reference resolves to, or else the expression written. +fn value_node_span(value: &Value<'_>, expr_span: Span, scope: &FileScope<'_>) -> Span { + let declared = |name: &str| scope.declaration_spans.get(name).copied(); + let span = match value { + Value::Function(def) => Some(def.span()), + // Declared at the top level or in a namespace. + Value::Reference { name, kind: RefKind::Function(function, _) } => { + let scope = scope.scope_of(*function); + if scope.is_top_level_function(name, function) { + scope.declaration_spans.get(name.as_str()).copied() + } else { + scope.first_static_method(function).map(|m| m.span) + } + } + Value::Reference { kind: RefKind::Class(class), .. } => class + .id + .as_ref() + .and_then(|id| scope.scope_of(*class).declaration_spans.get(id.name.as_str()).copied()), + Value::Reference { + kind: RefKind::StaticMember(span) | RefKind::Namespace(span), .. + } => Some(*span), + Value::Reference { name, kind: RefKind::Other } + if matches!(scope.variables.get(name.as_str()), Some(Variable::Declared(_))) => + { + declared(name) + } + _ => None, + }; + span.unwrap_or(expr_span) +} + +/// Finds what ngtsc's `assertEmittableInputType` rejects in a transform's +/// parameter type: a type reference whose name is a plain identifier that +/// resolves to a declaration in this file that isn't exported, which can't be +/// written into the `.d.ts`. A type parameter never is. `typeof X` and the +/// left side of `X.Y` aren't type references, so they're never checked. +struct UnexportedType<'s, 'a> { + scope: &'s FileScope<'a>, + /// The namespace block the function is written in (`None`: the top level). + block: Option, + /// The type parameters in scope, innermost last. + type_params: std::vec::Vec<&'a str>, + found: bool, +} + +impl<'a> UnexportedType<'_, 'a> { + /// Visits `walk` with `params` in scope. + fn with_params( + &mut self, + params: Option<&TSTypeParameterDeclaration<'a>>, + walk: impl FnOnce(&mut Self), + ) { + let len = self.type_params.len(); + self.type_params + .extend(params.into_iter().flat_map(|d| &d.params).map(|p| p.name.name.as_str())); + walk(self); + self.type_params.truncate(len); + } +} + +impl<'a> Visit<'a> for UnexportedType<'_, 'a> { + fn visit_ts_type_reference(&mut self, reference: &TSTypeReference<'a>) { + if let TSTypeName::IdentifierReference(id) = &reference.type_name { + let name = id.name.as_str(); + // Innermost first: a type parameter shadows a declaration. + let exported = if self.type_params.contains(&name) { + Some(false) + } else { + self.scope.type_is_exported_in(self.block, name) + }; + self.found |= exported == Some(false); + } + if let Some(args) = &reference.type_arguments { + self.visit_ts_type_parameter_instantiation(args); + } + } + + fn visit_ts_mapped_type(&mut self, ty: &TSMappedType<'a>) { + let len = self.type_params.len(); + self.type_params.push(ty.key.name.as_str()); + walk::walk_ts_mapped_type(self, ty); + self.type_params.truncate(len); + } + + fn visit_ts_function_type(&mut self, ty: &TSFunctionType<'a>) { + self.with_params(ty.type_parameters.as_deref(), |v| walk::walk_ts_function_type(v, ty)); + } + + fn visit_ts_constructor_type(&mut self, ty: &TSConstructorType<'a>) { + self.with_params(ty.type_parameters.as_deref(), |v| walk::walk_ts_constructor_type(v, ty)); + } + + fn visit_ts_method_signature(&mut self, sig: &TSMethodSignature<'a>) { + self.with_params(sig.type_parameters.as_deref(), |v| { + walk::walk_ts_method_signature(v, sig) + }); + } + + fn visit_ts_call_signature_declaration(&mut self, sig: &TSCallSignatureDeclaration<'a>) { + self.with_params(sig.type_parameters.as_deref(), |v| { + walk::walk_ts_call_signature_declaration(v, sig); + }); + } + + fn visit_ts_construct_signature_declaration( + &mut self, + sig: &TSConstructSignatureDeclaration<'a>, + ) { + self.with_params(sig.type_parameters.as_deref(), |v| { + walk::walk_ts_construct_signature_declaration(v, sig); + }); + } + + /// `infer U` declares `U` for the `extends` clause and the true branch. + fn visit_ts_conditional_type(&mut self, ty: &TSConditionalType<'a>) { + self.visit_ts_type(&ty.check_type); + let mut infers = InferNames(std::vec::Vec::new()); + infers.visit_ts_type(&ty.extends_type); + let len = self.type_params.len(); + self.type_params.extend(infers.0); + self.visit_ts_type(&ty.extends_type); + self.visit_ts_type(&ty.true_type); + self.type_params.truncate(len); + self.visit_ts_type(&ty.false_type); + } +} + +/// The type parameters `infer` declares in a conditional type's `extends` +/// clause (not those of a conditional type nested in it). +struct InferNames<'a>(std::vec::Vec<&'a str>); + +impl<'a> Visit<'a> for InferNames<'a> { + fn visit_ts_infer_type(&mut self, ty: &TSInferType<'a>) { + self.0.push(ty.type_parameter.name.name.as_str()); + } + + fn visit_ts_conditional_type(&mut self, _: &TSConditionalType<'a>) {} +} + /// The identifiers an expression mentions. struct Mentions<'a>(std::vec::Vec<&'a str>); @@ -1864,6 +2569,16 @@ impl<'a> Visit<'a> for Mentions<'a> { } } +/// An arrow or function expression written in place, which ngtsc can analyze +/// as an input transform. +fn function_value<'a>(expr: &'a Expression<'a>) -> Option> { + match expr { + Expression::ArrowFunctionExpression(f) => Some(Value::Function(FnDef::Arrow(f))), + Expression::FunctionExpression(f) => Some(Value::Function(FnDef::Function(f))), + _ => None, + } +} + /// Bind a parameter: a destructured parameter's names aren't evaluated. fn bind<'a>(frame: &mut Frame<'a>, pattern: &'a BindingPattern<'a>, binding: Binding<'a>) { if let BindingPattern::BindingIdentifier(id) = pattern { diff --git a/crates/oxc_angular_compiler/src/directive/mod.rs b/crates/oxc_angular_compiler/src/directive/mod.rs index 71aab3981..9a9f1cb12 100644 --- a/crates/oxc_angular_compiler/src/directive/mod.rs +++ b/crates/oxc_angular_compiler/src/directive/mod.rs @@ -31,12 +31,15 @@ pub use decorator::{ find_directive_decorator_span, }; pub(crate) use decorator::{extract_string_value, resolve_template_literal}; -pub(crate) use decorator::{merge_by_class_property, parse_decorator_io}; +pub(crate) use decorator::{ + merge_by_class_property, parse_decorator_io, resolve_member_transforms, +}; pub use definition::{DirectiveDefinitions, generate_directive_definitions}; 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, diff --git a/crates/oxc_angular_compiler/src/directive/property_decorators.rs b/crates/oxc_angular_compiler/src/directive/property_decorators.rs index 77b094287..c5873b64a 100644 --- a/crates/oxc_angular_compiler/src/directive/property_decorators.rs +++ b/crates/oxc_angular_compiler/src/directive/property_decorators.rs @@ -11,6 +11,8 @@ //! 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, @@ -26,27 +28,71 @@ 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); + } +} + /// Find a decorator by name from a list of decorators. /// /// 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()` /// /// Returns the first matching decorator. fn find_decorator_by_name<'a>( decorators: &'a oxc_allocator::Vec<'a, Decorator<'a>>, name: &str, ) -> Option<&'a Decorator<'a>> { - decorators.iter().find(|d| match &d.expression { - Expression::CallExpression(call) => match &call.callee { - Expression::Identifier(id) => id.name == name, - _ => false, - }, + 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)) + } _ => false, + }; + decorators.iter().find(|d| match &d.expression { + Expression::CallExpression(call) => is_name(&call.callee), + expr => is_name(expr), }) } +/// The options argument of an `@Input(...)` decorator, if any. +pub(crate) fn input_decorator_options<'a>( + decorators: &'a oxc_allocator::Vec<'a, Decorator<'a>>, +) -> Option<&'a Expression<'a>> { + match &find_decorator_by_name(decorators, "Input")?.expression { + Expression::CallExpression(call) => call.arguments.first()?.as_expression(), + _ => None, + } +} + /// Get the property key name as an Atom. /// /// Handles both identifier keys and string literal keys. 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 0b2fafc95..a0d5987eb 100644 --- a/crates/oxc_angular_compiler/tests/decorator_metadata_ngtsc_test.rs +++ b/crates/oxc_angular_compiler/tests/decorator_metadata_ngtsc_test.rs @@ -19,7 +19,7 @@ //! merged safely into bundled declaration files; `i0` (`@angular/core`) is //! always imported, so those types are kept. -use std::collections::BTreeMap; +use std::collections::{BTreeMap, HashMap}; use oxc_allocator::Allocator; use oxc_angular_compiler::{TransformOptions, TransformResult, transform_angular_file}; @@ -299,7 +299,7 @@ fn decorator_metadata_matches_ngtsc() { failures.len(), failures.join("\n\n") ); - assert_eq!(compared, 380, "fixtures compared"); + assert_eq!(compared, 575, "fixtures compared"); } fn transform(source: &str) -> TransformResult { @@ -377,50 +377,121 @@ export class Dir {} assert!(strip(&result.code).contains(r#"inputs:{x:[2,"x","x",fn]}"#), "{}", result.code); } +/// The same for an `@Input(...)` argument: ngtsc 22.1.7 reads these from +/// `./shared` (with `export const OPTS = {alias: 'y'}`, it compiles the input +/// as `y`). oxc can't, so it reports them instead of compiling the input +/// without its alias, `required` flag or transform. +#[test] +fn input_decorator_options_imported_from_another_module_are_reported() { + let cases = [ + ("@Input(OPTS) x: any;", "OPTS", "OPTS"), + ("@Input((OPTS)) x: any;", "OPTS", "(OPTS)"), + ("@Input(NAME) x: any;", "NAME", "NAME"), + ("@Input(ns.OPTS) x: any;", "OPTS", "ns.OPTS"), + ("@Input({...OPTS}) x: any;", "OPTS", "{...OPTS}"), + ("@Input({alias: 'z', ...OPTS}) x: any;", "OPTS", "{alias: 'z', ...OPTS}"), + ("@Input(LOCAL) x: any;", "OPTS", "LOCAL"), + ("@Input({alias: NAME}) x: any;", "NAME", "{alias: NAME}"), + ("@Input({required: REQ}) x: any;", "REQ", "{required: REQ}"), + ("@Input(OPTS) set x(v: any) {}", "OPTS", "OPTS"), + ]; + for (member, name, span) in cases { + let source = format!( + "import {{Directive, Input}} from '@angular/core'; +import {{OPTS, NAME, REQ}} from './shared'; +import * as ns from './shared'; +const LOCAL = OPTS; +@Directive({{selector: '[d]'}}) +export class Dir {{ + {member} +}} +" + ); + let message = format!( + "@Input 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())], + "{member}" + ); + } + + // An imported transform is a reference: nothing to evaluate. + let source = "import {Directive, Input} from '@angular/core'; +import {fn} from './shared'; +@Directive({selector: '[d]'}) +export class Dir { + @Input({alias: 'y', transform: fn}) x: any; +} +"; + let result = transform(source); + assert!(errors(&result, source).is_empty(), "{:?}", errors(&result, source)); + assert!(strip(&result.code).contains(r#"inputs:{x:[2,"y","x",fn]}"#), "{}", result.code); +} + /// A transform returned by a function the metadata calls is emitted where the /// directive is compiled, outside that function. A parameter becomes the /// argument it was passed (the snapshot's `scope-*` probes); anything else that -/// uses the function's parameters, `this` or `arguments` would mean something -/// else there, or nothing. ngtsc 22.1.7 emits `(v) => v + name` as written -/// (`name` is then `window.name`) and `booleanAttribute` for `o.t` (the name -/// the argument was first given); oxc reports these instead. +/// uses the function's parameters would mean something else there, or nothing. +/// ngtsc 22.1.7 emits `(v) => v + name` as written (`name` is then +/// `window.name`) and `booleanAttribute` for `o.t` (the name the argument was +/// first given); oxc reports these instead. (`this` and `arguments` there +/// aren't analyzable, so ngtsc rejects those itself: `scope-this`, +/// `scope-arguments`.) #[test] fn transforms_using_the_parameters_of_a_called_function_are_reported() { let cases = [ ( "function make(name: string) { return [{ name, transform: (v: string) => v + name }]; }", + "inputs: make('x')", + "@Directive.inputs", "make('x')", ), ( "function make(o: any) { return [{ name: 'x', transform: o.t }]; }", + "inputs: make({ t: booleanAttribute })", + "@Directive.inputs", "make({ t: booleanAttribute })", ), - ("class H { static make() { return [{ name: 'x', transform: this.t }]; } }", "H.make()"), ( - "function make() { return [{ name: 'x', transform: arguments[0] }]; }", - "make(booleanAttribute)", + "function opts(n: string) { return { transform: (v: string) => v + n }; }", + "", + "@Input", + "opts('a')", ), // Scoped like JavaScript: only a nested non-arrow function has its own // `arguments`, and a name declared in a block isn't in scope after it // (the snapshot's `scope-shadowed*` probes are the names that are). ( "function make(name: string) { return [{ name, transform: (v: string) => arguments.length }]; }", + "inputs: make('x')", + "@Directive.inputs", "make('x')", ), ( "function make(name: string) { return [{ name, transform: (v: string) => { { const name = v; } return name; } }]; }", + "inputs: make('x')", + "@Directive.inputs", "make('x')", ), ( "function make(name: string) { return [{ name, transform: (v: string) => ({ [name]: v }) }]; }", + "inputs: make('x')", + "@Directive.inputs", "make('x')", ), ( "function make(name: string) { return [{ name, transform: (v: string) => { switch (name) { case 'x': let name = v; return name; } return v; } }]; }", + "inputs: make('x')", + "@Directive.inputs", "make('x')", ), ( "function make(name: string) { return [{ name, transform: function (v: string) { return (() => name)(); } }]; }", + "inputs: make('x')", + "@Directive.inputs", "make('x')", ), // Types are erased (the snapshot's `scope-typeOnly-*` probes), but the @@ -428,46 +499,57 @@ fn transforms_using_the_parameters_of_a_called_function_are_reported() { // `satisfies` and `x`, a parameter's default and a call's arguments. ( "function make(name: string) { return [{ name: 'x', transform: (v: string) => name! }]; }", + "inputs: make('x')", + "@Directive.inputs", "make('x')", ), ( "function make(name: string) { return [{ name: 'x', transform: (v: string) => name as typeof name }]; }", + "inputs: make('x')", + "@Directive.inputs", "make('x')", ), ( "function make(name: string) { return [{ name: 'x', transform: (v: string) => name satisfies string }]; }", + "inputs: make('x')", + "@Directive.inputs", "make('x')", ), ( "function make(name: string) { return [{ name: 'x', transform: (v: string) => name }]; }", + "inputs: make('x')", + "@Directive.inputs", "make('x')", ), ( "function make(name: string) { return [{ name: 'x', transform: (v: string, d: typeof name = name) => v }]; }", + "inputs: make('x')", + "@Directive.inputs", "make('x')", ), ( "function id(v: T) { return v; } function make(name: string) { return [{ name: 'x', transform: (v: string) => id(name) }]; }", + "inputs: make('x')", + "@Directive.inputs", "make('x')", ), ]; - for (helper, inputs) in cases { + for (helper, meta, subject, span) in cases { + let member = if meta.is_empty() { "@Input(opts('a')) x: any;" } else { "x: any;" }; let source = format!( - "import {{Directive, booleanAttribute}} from '@angular/core'; + "import {{Directive, Input, booleanAttribute}} from '@angular/core'; {helper} -@Directive({{selector: '[d]', inputs: {inputs}}}) -export class Dir {{ x: any; }} +@Directive({{selector: '[d]', {meta}}}) +export class Dir {{ {member} }} " ); let result = transform(&source); - let message = "@Directive.inputs: the transform of \"x\" uses a parameter of the \ - function it's written in. OXC can't emit it outside that function."; - assert_eq!( - errors(&result, &source), - vec![(message.to_string(), inputs.to_string())], - "{helper}" + let message = format!( + "{subject}: the transform of \"x\" uses a parameter of the function it's \ + written in. OXC can't emit it outside that function." ); + assert_eq!(errors(&result, &source), vec![(message, span.to_string())], "{helper}"); } } @@ -678,3 +760,204 @@ fn evaluation_is_bounded() { } } } + +/// ngtsc emits the method's bare name for `transform: Utils.coerce` (a static +/// method), which here would silently bind the unrelated top-level `coerce`. +/// oxc keeps the expression as written. +#[test] +fn static_method_transform_is_not_confused_with_a_same_named_function() { + let source = "import {Directive, Input} from '@angular/core'; +export function coerce(v: string) { return 1; } +class Utils { static coerce(v: boolean) { return 2; } } +@Directive({selector: '[d]'}) +export class Dir { @Input({transform: Utils.coerce}) x: any; }"; + let code = strip(&transform(source).code); + assert!(code.contains(r#"inputs:{x:[2,"x","x",Utils.coerce]}"#), "{code}"); +} + +/// A transform read through a namespace import (`core.booleanAttribute`): +/// ngtsc 22.1.7 reports that it can't reference it, at the declaration in +/// @angular/core's `.d.ts`, which the snapshot can't record (see +/// `probe: eval-nsImportMember`). oxc reports it on the expression. +#[test] +fn namespace_imported_transform_cannot_be_referenced() { + let source = "import {Directive, Input} from '@angular/core'; +import * as core from '@angular/core'; +@Directive({selector: '[d]'}) +export class Dir { @Input({transform: core.booleanAttribute}) v: any; } +"; + let message = "Input transform function could not be referenced \ + Value is a reference to 'booleanAttribute'."; + assert_eq!( + errors(&transform(source), source), + vec![(message.to_string(), "core.booleanAttribute".to_string())] + ); +} + +/// A transform declared in another file (an import, a namespace member or a +/// global from TypeScript's lib, like `Intl` or the DOM's `atob`): ngtsc +/// 22.1.7 reports these at that declaration, which the snapshot can't record +/// (the fixtures below are skipped for that reason, with the diagnostics ngtsc +/// reported). oxc reports the same message on the expression. +#[test] +fn transform_declared_in_another_file_is_reported_on_the_expression() { + let fixtures: Value = serde_json::from_str(FIXTURES).unwrap(); + let cases = [ + ("probe: transform-clashImported", "booleanAttribute"), + ("probe: transform-clashImportedMeta", "booleanAttribute"), + ("probe: transform-clashGlobal", "parseInt"), + ("probe: transform-globalNumber", "Number"), + ("probe: transform-globalNumberClash", "Number"), + ("probe: transform-globalString", "String"), + ("probe: transform-nsClash", "u.toNum"), + ("probe: transform-global-Intl", "Intl"), + ("probe: transform-global-Reflect", "Reflect"), + ("probe: transform-global-clashAtob", "atob"), + ]; + for (name, expression) in cases { + let fixture = fixtures["fixtures"] + .as_array() + .unwrap() + .iter() + .find(|f| f["name"] == name) + .unwrap_or_else(|| panic!("{name}")); + let source = fixture["files"]["test.ts"].as_str().unwrap(); + let expected: Vec<(String, String)> = fixture["diagnostics"] + .as_array() + .unwrap() + .iter() + .map(|d| (d.as_str().unwrap().to_string(), expression.to_string())) + .collect(); + assert_eq!(errors(&transform(source), source), expected, "{name}"); + } +} + +/// A name the file declares as a namespace or an `import x = ...` alias isn't +/// a global declared elsewhere, so it isn't assumed to be a function the way +/// `atob` is: it's resolved like ngtsc 22.1.7 does. `transform: U` is a +/// reference to the namespace (at its declaration), and `transform: f` is the +/// function the alias names, emitted by the alias's name. The snapshot's +/// `r6-nsval-*` and `r6-alias-*` probes cover more forms. +#[test] +fn file_namespaces_and_aliases_are_not_assumed_to_be_global_functions() { + let namespace = "namespace U { export function f(v: string) { return 1; } }"; + let source = |pre: &str, expr: &str| { + format!( + "import {{Directive, Input}} from '@angular/core';\n{pre}\n\ + @Directive({{selector: '[d]'}})\n\ + export class Dir {{\n @Input({{transform: {expr}}}) x: any;\n}}\n" + ) + }; + + let with_namespace = source(namespace, "U"); + assert_eq!( + errors(&transform(&with_namespace), &with_namespace), + vec![( + "Input transform must be a function Value is a reference to 'U'.".to_string(), + namespace.to_string() + )] + ); + + let with_alias = source(&format!("{namespace}\nimport f = U.f;"), "f"); + let result = transform(&with_alias); + assert_eq!(errors(&result, &with_alias), vec![]); + assert!(strip(&result.code).contains(r#"inputs:{x:[2,"x","x",f]}"#), "{}", result.code); +} + +/// A shorthand `{ transform }` naming a global is looked up through +/// TypeScript's shorthand symbol, which ngtsc 22.1.7 never accepts as a +/// transform: "could not be determined statically" when nothing declares +/// it, and an error about the declaration when a lib or `.d.ts` does (at +/// that declaration). So unlike `transform: atob`, it isn't assumed to be a +/// function. +#[test] +fn shorthand_transform_naming_a_global_is_rejected() { + let source = "import {Directive} from '@angular/core'; +@Directive({selector: '[d]', inputs: [{name: 'x', transform}]}) +export class Dir { + x!: any; +} +"; + assert_eq!( + errors(&transform(source), source), + vec![( + "Input transform must be a function Value could not be determined statically." + .to_string(), + "transform".to_string() + )] + ); +} + +/// ngtsc checks an overloaded static method's first declaration, not its +/// implementation (checked with @angular/compiler-cli 22.1.7, which compiles +/// this; the snapshot can't hold it because ngtsc emits the method's bare name, +/// see `static_method_transform_is_not_confused_with_a_same_named_function`). +#[test] +fn overloaded_static_method_transform_is_checked_at_its_first_declaration() { + let source = "import {Directive, Input} from '@angular/core'; +interface Foo {} +class U { static c(v: string): number; static c(v: string | Foo) { return 1; } } +@Directive({selector: '[d]'}) +export class Dir { @Input({transform: U.c}) x!: number; } +"; + let result = transform(source); + assert_eq!(errors(&result, source), vec![]); + let code = strip(&result.code); + assert!(code.contains(r#"inputs:{x:[2,"x","x",U.c]}"#), "{code}"); +} + +/// Member decorators through a namespace import are Angular's only when the +/// namespace imports `@angular/core` (ngtsc 22.1.7 compiles the query, host +/// binding and listener below for `core`, and none of them for `foreign`). +/// The snapshot compares the inputs and outputs of both +/// (`probe: transform-coreNamespaceMembers` and +/// `probe: transform-foreignNamespaceMembers`). +#[test] +fn namespaced_member_decorators_need_an_angular_core_namespace() { + let members = " +export class Cmp { + @NS.ViewChild('ref') ref: any; + @NS.HostBinding('class.a') a = true; + @NS.HostListener('click') onClick() {} +} +"; + let core = "import * as NS from '@angular/core'; +@NS.Component({selector: 'c', template: '
'})"; + 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 code = transform(&format!("{header}{members}")).code; + for part in ["viewQuery", "ɵɵclassProp(\"a\"", "ɵɵlistener(\"click\""] { + assert_eq!(code.contains(part), compiled, "{part} in\n{code}"); + } + } +} + +/// `resolved_imports` points an imported name at the file that declares it +/// (past a barrel). It doesn't change which module the import is from, so +/// `@core.Input()` through `import * as core from '@angular/core'` is still +/// Angular's when `core` is mapped. +#[test] +fn namespaced_member_decorators_ignore_resolved_import_paths() { + let source = "import {Component} from '@angular/core'; +import * as core from '@angular/core'; +@Component({selector: 'c', template: ''}) +export class Cmp { + @core.Input() x: any; + @core.Output() y: any; +} +"; + let options = TransformOptions { + resolved_imports: Some(HashMap::from([( + "core".to_string(), + "../node_modules/@angular/core/fesm2022/core.mjs".to_string(), + )])), + ..TransformOptions::default() + }; + let allocator = Allocator::default(); + let result = transform_angular_file(&allocator, "test.ts", source, Some(&options), None); + let code = strip(&result.code); + assert!(code.contains(r#"inputs:{x:"x"}"#), "{}", result.code); + assert!(code.contains(r#"outputs:{y:"y"}"#), "{}", result.code); +} 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 7d801e61e..94c50db12 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,121 @@ "dtsImports": [], "diagnosticSpans": [] }, + { + "name": "ngtsc_spec: should produce a diagnostic if the transform value is not a function", + "origin": "packages/compiler-cli/test/ngtsc/ngtsc_spec.ts", + "files": { + "test.ts": "\n import {Directive, Input} from '@angular/core';\n\n const NOT_A_FUNCTION: any = null!;\n\n @Directive({selector: '[dir]'})\n export class Dir {\n @Input({transform: NOT_A_FUNCTION}) value!: number;\n }\n " + }, + "diagnostics": ["Input transform must be a function Value is of type 'null'."], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[196, 223]] + }, + { + "name": "ngtsc_spec: should produce a diagnostic if the transform value in the inputs array is not a function", + "origin": "packages/compiler-cli/test/ngtsc/ngtsc_spec.ts", + "files": { + "test.ts": "\n import {Directive, Input} from '@angular/core';\n\n const NOT_A_FUNCTION: any = null!;\n\n @Directive({\n selector: '[dir]',\n inputs: [{\n name: 'value',\n transform: NOT_A_FUNCTION\n }]\n })\n export class Dir {\n value!: number;\n }\n " + }, + "diagnostics": [ + "Transform of value at position 0 of @Directive.inputs array must be a function Value is of type 'null'." + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[180, 266]] + }, + { + "name": "ngtsc_spec: should produce a diangostic if the transform function first parameter has no arguments", + "origin": "packages/compiler-cli/test/ngtsc/ngtsc_spec.ts", + "files": { + "test.ts": "\n import {Directive, Input} from '@angular/core';\n\n @Directive({selector: '[dir]'})\n export class Dir {\n @Input({transform: (val) => 1}) value!: number;\n }\n " + }, + "diagnostics": [ + "Input transform function first parameter must have a type Value could not be determined statically." + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[178, 188]] + }, + { + "name": "ngtsc_spec: should produce a diangostic if the transform function is generic", + "origin": "packages/compiler-cli/test/ngtsc/ngtsc_spec.ts", + "files": { + "test.ts": "\n import {Directive, Input} from '@angular/core';\n\n @Directive({selector: '[dir]'})\n export class Dir {\n @Input({transform: (val: T) => 1}) value!: number;\n }\n " + }, + "diagnostics": [ + "Input transform function cannot be generic Value could not be determined statically." + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[162, 178]] + }, + { + "name": "ngtsc_spec: should produce a diangostic if there is a conflicting coercion member", + "origin": "packages/compiler-cli/test/ngtsc/ngtsc_spec.ts", + "files": { + "test.ts": "\n import {Directive, Input} from '@angular/core';\n\n @Directive({selector: '[dir]'})\n export class Dir {\n @Input({transform: (val: string) => 1}) value!: number;\n\n static ngAcceptInputType_value: boolean;\n }\n " + }, + "diagnostics": [ + "Class cannot have both a transform function on Input value and a static member called ngAcceptInputType_value" + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[162, 180]] + }, + { + "name": "ngtsc_spec: should produce a diangostic if transform type is not exported", + "origin": "packages/compiler-cli/test/ngtsc/ngtsc_spec.ts", + "files": { + "test.ts": "\n import {Directive, Input} from '@angular/core';\n\n interface InternalType {\n foo: boolean;\n }\n\n @Directive({selector: '[dir]'})\n export class Dir {\n @Input({transform: (val: InternalType) => 1}) val!: number;\n }\n " + }, + "diagnostics": [ + "Symbol must be exported in order to be used as the type of an Input transform function" + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[242, 254]] + }, + { + "name": "ngtsc_spec: should produce a diangostic if the transform value is not a function", + "origin": "packages/compiler-cli/test/ngtsc/ngtsc_spec.ts", + "files": { + "test.ts": "\n import {Directive, Input} from '@angular/core';\n\n function createTransform(outerValue: number) {\n return (innerValue: string) => outerValue;\n }\n\n @Directive({selector: '[dir]'})\n export class Dir {\n @Input({transform: createTransform(1)}) value!: number;\n }\n " + }, + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[287, 305]] + }, + { + "name": "ngtsc_spec: should produce a diangostic if the first parameter of a transform is a spread", + "origin": "packages/compiler-cli/test/ngtsc/ngtsc_spec.ts", + "files": { + "test.ts": "\n import {Directive, Input} from '@angular/core';\n\n function toNumber(...value: (string | boolean)[]) { return 1; }\n\n @Directive({standalone: true})\n export class Dir {\n @Input({transform: toNumber}) value!: number;\n }\n " + }, + "diagnostics": [ + "Input transform function first parameter cannot be a spread parameter Value is a reference to 'toNumber'." + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[70, 133]] + }, + { + "name": "ngtsc_spec: should produce a diangostic if a transform function has multiple signatures", + "origin": "packages/compiler-cli/test/ngtsc/ngtsc_spec.ts", + "files": { + "test.ts": "\n import {Directive, Input} from '@angular/core';\n\n function toNumber(value: boolean): number;\n function toNumber(value: string): number;\n function toNumber(value: boolean | string) { return 1; }\n\n @Directive({standalone: true})\n export class Dir {\n @Input({transform: toNumber}) value!: number;\n }\n " + }, + "diagnostics": [ + "Input transform function cannot have multiple signatures Value is a reference to 'toNumber'." + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[70, 112]] + }, { "name": "ngtsc_spec: should wrap \"inputs\" and \"outputs\" keys if they contain unsafe characters", "origin": "packages/compiler-cli/test/ngtsc/ngtsc_spec.ts", @@ -163,6 +278,33 @@ "dtsImports": [], "diagnosticSpans": [] }, + { + "name": "ngtsc_spec: should produce a diangostic if the transform function type cannot be referenced from the source file", + "origin": "packages/compiler-cli/test/ngtsc/ngtsc_spec.ts", + "files": { + "util.ts": "\n interface InternalType {\n foo: boolean;\n }\n\n export function toNumber(val: InternalType) { return 1; }\n ", + "test.ts": "\n import {Directive, Input} from '@angular/core';\n import {toNumber} from './util';\n\n @Directive({selector: '[dir]'})\n export class Dir {\n @Input({transform: toNumber}) value!: number;\n }\n " + }, + "skip": "needs declarations from another file; oxc compiles one file at a time (imported consts, types and transforms are opaque)" + }, + { + "name": "ngtsc_spec: should produce a diangostic if a sub-type of the transform function cannot be referenced from the source file", + "origin": "packages/compiler-cli/test/ngtsc/ngtsc_spec.ts", + "files": { + "util.ts": "\n interface InternalType {\n foo: boolean;\n }\n\n export function toNumber(val: {value: InternalType}) { return 1; }\n ", + "test.ts": "\n import {Directive, Input} from '@angular/core';\n import {toNumber} from './util';\n\n @Directive({selector: '[dir]'})\n export class Dir {\n @Input({transform: toNumber}) value!: number;\n }\n " + }, + "skip": "needs declarations from another file; oxc compiles one file at a time (imported consts, types and transforms are opaque)" + }, + { + "name": "ngtsc_spec: should produce a diangostic if a generic parameter of the transform function cannot be referenced from the source file", + "origin": "packages/compiler-cli/test/ngtsc/ngtsc_spec.ts", + "files": { + "util.ts": "\n export interface GenericWrapper {\n value: T;\n }\n\n interface InternalType {\n foo: boolean;\n }\n\n export function toNumber(val: GenericWrapper) { return 1; }\n ", + "test.ts": "\n import {Directive, Input} from '@angular/core';\n import {toNumber} from './util';\n\n @Directive({selector: '[dir]'})\n export class Dir {\n @Input({transform: toNumber}) value!: number;\n }\n " + }, + "skip": "needs declarations from another file; oxc compiles one file at a time (imported consts, types and transforms are opaque)" + }, { "name": "authoring_inputs_spec: should fail if signal input is also declared in `inputs` decorator field.", "origin": "packages/compiler-cli/test/ngtsc/authoring_inputs_spec.ts", @@ -226,6 +368,36 @@ "dtsImports": [], "diagnosticSpans": [] }, + { + "name": "acceptance/inherit_definition_feature_spec: inputs re-declared in the `inputs` array", + "origin": "packages/core/test/acceptance/inherit_definition_feature_spec.ts", + "files": { + "test.ts": "import {Component, Directive, Input} from '@angular/core';\n\n@Directive()\nclass Base {\n @Input({transform: (v) => `${v}-transformed`}) someInput: string = '';\n}\n\n@Directive({\n selector: 'dir',\n inputs: ['someInput'],\n})\nclass ActualDir extends Base {}\n\n@Component({\n imports: [ActualDir],\n template: ``,\n})\nexport class TestCmp {}\n" + }, + "diagnostics": [ + "Input transform function first parameter must have a type Value could not be determined statically." + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[107, 132]] + }, + { + "name": "probe: transform-inlineArrowUntyped", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from \"@angular/core\";\n\n@Directive({selector: \"[d]\"})\nexport class Dir { @Input({transform: (v) => 1}) v: any; }\n@Directive({selector: \"[e]\", inputs: [{name: \"w\", transform: (v) => 1}]})\nexport class Dir2 { w: any; }\n" + }, + "diagnostics": [ + "Input transform function first parameter must have a type Value could not be determined statically.", + "Input transform function first parameter must have a type Value could not be determined statically." + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [ + [135, 143], + [217, 225] + ] + }, { "name": "probe: transform-inlineArrowNoParams", "origin": "probe", @@ -248,6 +420,40 @@ "dtsImports": [], "diagnosticSpans": [] }, + { + "name": "probe: transform-constArrowTyped", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from \"@angular/core\";\nexport const f = (v: string) => 1;\n@Directive({selector: \"[d]\"})\nexport class Dir { @Input({transform: f}) v: any; }\n@Directive({selector: \"[e]\", inputs: [{name: \"w\", transform: f}]})\nexport class Dir2 { w: any; }\n" + }, + "diagnostics": [ + "Input transform must be a function Value could not be determined statically.", + "Input transform must be a function Value could not be determined statically." + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [ + [169, 170], + [244, 245] + ] + }, + { + "name": "probe: transform-constArrowAnnotated", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from \"@angular/core\";\nexport const f: (v: string) => number = (v) => 1;\n@Directive({selector: \"[d]\"})\nexport class Dir { @Input({transform: f}) v: any; }\n@Directive({selector: \"[e]\", inputs: [{name: \"w\", transform: f}]})\nexport class Dir2 { w: any; }\n" + }, + "diagnostics": [ + "Input transform must be a function Value could not be determined statically.", + "Input transform must be a function Value could not be determined statically." + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [ + [184, 185], + [259, 260] + ] + }, { "name": "probe: transform-importedFn", "origin": "probe", @@ -270,6 +476,57 @@ "dtsImports": [], "diagnosticSpans": [] }, + { + "name": "probe: transform-generic", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from \"@angular/core\";\nexport function f(v: T) { return 1; }\n@Directive({selector: \"[d]\"})\nexport class Dir { @Input({transform: f}) v: any; }\n@Directive({selector: \"[e]\", inputs: [{name: \"w\", transform: f}]})\nexport class Dir2 { w: any; }\n" + }, + "diagnostics": [ + "Input transform function cannot be generic Value is a reference to 'f'.", + "Input transform function cannot be generic Value is a reference to 'f'." + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [ + [66, 106], + [66, 106] + ] + }, + { + "name": "probe: transform-overloaded", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from \"@angular/core\";\nexport function f(v: string): number;\nexport function f(v: number): number;\nexport function f(v: any) { return 1; }\n@Directive({selector: \"[d]\"})\nexport class Dir { @Input({transform: f}) v: any; }\n@Directive({selector: \"[e]\", inputs: [{name: \"w\", transform: f}]})\nexport class Dir2 { w: any; }\n" + }, + "diagnostics": [ + "Input transform function cannot have multiple signatures Value is a reference to 'f'.", + "Input transform function cannot have multiple signatures Value is a reference to 'f'." + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [ + [66, 103], + [66, 103] + ] + }, + { + "name": "probe: transform-spread", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from \"@angular/core\";\nexport function f(...v: string[]) { return 1; }\n@Directive({selector: \"[d]\"})\nexport class Dir { @Input({transform: f}) v: any; }\n@Directive({selector: \"[e]\", inputs: [{name: \"w\", transform: f}]})\nexport class Dir2 { w: any; }\n" + }, + "diagnostics": [ + "Input transform function first parameter cannot be a spread parameter Value is a reference to 'f'.", + "Input transform function first parameter cannot be a spread parameter Value is a reference to 'f'." + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [ + [66, 113], + [66, 113] + ] + }, { "name": "probe: transform-thisOnly", "origin": "probe", @@ -293,1365 +550,1346 @@ "diagnosticSpans": [] }, { - "name": "probe: eval-inputsObj", + "name": "probe: transform-call", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from \"@angular/core\";\nimport * as core from \"@angular/core\";\n\n@Directive({selector: \"[d]\", inputs: {a: 1}})\nexport class Dir { a: any; }\n" + "test.ts": "import {Directive, Input, booleanAttribute} from \"@angular/core\";\nexport function mk() { return (v: string) => 1; }\n@Directive({selector: \"[d]\"})\nexport class Dir { @Input({transform: mk()}) v: any; }\n@Directive({selector: \"[e]\", inputs: [{name: \"w\", transform: mk()}]})\nexport class Dir2 { w: any; }\n" }, "diagnostics": [ - "Failed to resolve @Directive.inputs to an array Value is of type '{ a: number }'." + "Input transform must be a function Value could not be determined statically.", + "Input transform must be a function Value could not be determined statically." ], "classes": {}, "dtsImports": [], - "diagnosticSpans": [[125, 131]] + "diagnosticSpans": [ + [184, 188], + [262, 266] + ] }, { - "name": "probe: eval-inputsCall", + "name": "probe: transform-staticMethod", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from \"@angular/core\";\nimport * as core from \"@angular/core\";\ndeclare function mk(): any;\n@Directive({selector: \"[d]\", inputs: mk()})\nexport class Dir { a: any; }\n" + "test.ts": "import {Directive, Input, booleanAttribute} from \"@angular/core\";\nexport class U { static f(v: string) { return 1; } }\n@Directive({selector: \"[d]\"})\nexport class Dir { @Input({transform: U.f}) v: any; }\n@Directive({selector: \"[e]\", inputs: [{name: \"w\", transform: U.f}]})\nexport class Dir2 { w: any; }\n" + }, + "skip": "ngtsc emits `f` for `transform: U.f` (a static method), an identifier that isn't in scope, so its output throws a ReferenceError when the module loads; oxc keeps `U.f`" + }, + { + "name": "probe: transform-classRef", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, booleanAttribute} from \"@angular/core\";\nexport class U {}\n@Directive({selector: \"[d]\"})\nexport class Dir { @Input({transform: U}) v: any; }\n@Directive({selector: \"[e]\", inputs: [{name: \"w\", transform: U}]})\nexport class Dir2 { w: any; }\n" }, "diagnostics": [ - "Failed to resolve @Directive.inputs to an array Value could not be determined statically." + "Input transform must be a function Value is a reference to 'U'.", + "Input transform must be a function Value is a reference to 'U'." ], "classes": {}, "dtsImports": [], - "diagnosticSpans": [[152, 156]] + "diagnosticSpans": [ + [66, 83], + [66, 83] + ] }, { - "name": "probe: eval-inputsRef", + "name": "probe: transform-nullLit", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from \"@angular/core\";\nimport * as core from \"@angular/core\";\nexport class U {}\n@Directive({selector: \"[d]\", inputs: U})\nexport class Dir { a: any; }\n" + "test.ts": "import {Directive, Input, booleanAttribute} from \"@angular/core\";\n\n@Directive({selector: \"[d]\"})\nexport class Dir { @Input({transform: null}) v: any; }\n@Directive({selector: \"[e]\", inputs: [{name: \"w\", transform: null}]})\nexport class Dir2 { w: any; }\n" }, "diagnostics": [ - "Failed to resolve @Directive.inputs to an array Value is a reference to 'U'." + "Input transform must be a function Value is of type 'null'.", + "Transform of value at position 0 of @Directive.inputs array must be a function Value is of type 'null'." ], "classes": {}, "dtsImports": [], - "diagnosticSpans": [[142, 143]] + "diagnosticSpans": [ + [123, 140], + [189, 219] + ] }, { - "name": "probe: eval-inputsElemRef", + "name": "probe: transform-constNull", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from \"@angular/core\";\nimport * as core from \"@angular/core\";\nexport class U {}\n@Directive({selector: \"[d]\", inputs: [U]})\nexport class Dir { a: any; }\n" + "test.ts": "import {Directive, Input, booleanAttribute} from \"@angular/core\";\nconst N: any = null!;\n@Directive({selector: \"[d]\"})\nexport class Dir { @Input({transform: N}) v: any; }\n@Directive({selector: \"[e]\", inputs: [{name: \"w\", transform: N}]})\nexport class Dir2 { w: any; }\n" }, "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value is a reference to 'U'." + "Input transform must be a function Value is of type 'null'.", + "Transform of value at position 0 of @Directive.inputs array must be a function Value is of type 'null'." ], "classes": {}, "dtsImports": [], - "diagnosticSpans": [[142, 145]] + "diagnosticSpans": [ + [144, 158], + [207, 234] + ] }, { - "name": "probe: eval-inputsElemDyn", + "name": "probe: transform-stringLit", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from \"@angular/core\";\nimport * as core from \"@angular/core\";\ndeclare const X: any;\n@Directive({selector: \"[d]\", inputs: [X]})\nexport class Dir { a: any; }\n" + "test.ts": "import {Directive, Input, booleanAttribute} from \"@angular/core\";\n\n@Directive({selector: \"[d]\"})\nexport class Dir { @Input({transform: \"x\"}) v: any; }\n@Directive({selector: \"[e]\", inputs: [{name: \"w\", transform: \"x\"}]})\nexport class Dir2 { w: any; }\n" }, "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value is a reference to 'X'." + "Input transform must be a function Value is of type 'string'.", + "Transform of value at position 0 of @Directive.inputs array must be a function Value is of type 'string'." ], "classes": {}, "dtsImports": [], - "diagnosticSpans": [[146, 149]] + "diagnosticSpans": [ + [123, 139], + [188, 217] + ] }, { - "name": "probe: eval-inputsNameNum", + "name": "probe: transform-objLit", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from \"@angular/core\";\nimport * as core from \"@angular/core\";\n\n@Directive({selector: \"[d]\", inputs: [{name: 1}]})\nexport class Dir { a: any; }\n" + "test.ts": "import {Directive, Input, booleanAttribute} from \"@angular/core\";\n\n@Directive({selector: \"[d]\"})\nexport class Dir { @Input({transform: {a: 1}}) v: any; }\n@Directive({selector: \"[e]\", inputs: [{name: \"w\", transform: {a: 1}}]})\nexport class Dir2 { w: any; }\n" }, "diagnostics": [ - "Value at position 0 of @Directive.inputs array must have a \"name\" property Value is of type 'number'." + "Input transform must be a function Value is of type '{ a: number }'.", + "Transform of value at position 0 of @Directive.inputs array must be a function Value is of type '{ a: number }'." ], "classes": {}, "dtsImports": [], - "diagnosticSpans": [[125, 136]] + "diagnosticSpans": [ + [123, 142], + [191, 223] + ] }, { - "name": "probe: eval-inputsNameRef", + "name": "probe: transform-arrLit", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from \"@angular/core\";\nimport * as core from \"@angular/core\";\nexport class U {}\n@Directive({selector: \"[d]\", inputs: [{name: U}]})\nexport class Dir { a: any; }\n" + "test.ts": "import {Directive, Input, booleanAttribute} from \"@angular/core\";\n\n@Directive({selector: \"[d]\"})\nexport class Dir { @Input({transform: [1]}) v: any; }\n@Directive({selector: \"[e]\", inputs: [{name: \"w\", transform: [1]}]})\nexport class Dir2 { w: any; }\n" }, "diagnostics": [ - "Value at position 0 of @Directive.inputs array must have a \"name\" property Value is a reference to 'U'." + "Input transform must be a function Value is of type '[number]'.", + "Transform of value at position 0 of @Directive.inputs array must be a function Value is of type '[number]'." ], "classes": {}, "dtsImports": [], - "diagnosticSpans": [[142, 153]] + "diagnosticSpans": [ + [123, 139], + [188, 217] + ] }, { - "name": "probe: eval-multiErr", + "name": "probe: transform-undef", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from \"@angular/core\";\nimport * as core from \"@angular/core\";\n\n@Directive({selector: \"[d]\", inputs: [1, 2], outputs: [3]})\nexport class Dir { @Input({transform: null}) v: any; }\n" + "test.ts": "import {Directive, Input, booleanAttribute} from \"@angular/core\";\n\n@Directive({selector: \"[d]\"})\nexport class Dir { @Input({transform: undefined}) v: any; }\n@Directive({selector: \"[e]\", inputs: [{name: \"w\", transform: undefined}]})\nexport class Dir2 { w: any; }\n" }, "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value is of type 'number'." + "Input transform must be a function Value is of type 'undefined'.", + "Transform of value at position 0 of @Directive.inputs array must be a function Value is of type 'undefined'." ], "classes": {}, "dtsImports": [], - "diagnosticSpans": [[125, 131]] + "diagnosticSpans": [ + [123, 145], + [194, 229] + ] }, { - "name": "probe: resolve-fnMultiStmt", + "name": "probe: transform-nonExportedParamType", "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" + "test.ts": "import {Directive, Input, booleanAttribute} from \"@angular/core\";\ninterface Hidden { a: 1 }\nexport function f(v: Hidden) { return 1; }\n@Directive({selector: \"[d]\"})\nexport class Dir { @Input({transform: f}) v: any; }\n@Directive({selector: \"[e]\", inputs: [{name: \"w\", transform: f}]})\nexport class Dir2 { w: any; }\n" }, "diagnostics": [ - "Failed to resolve @Directive.inputs to an array Value could not be determined statically." + "Symbol must be exported in order to be used as the type of an Input transform function", + "Symbol must be exported in order to be used as the type of an Input transform function" ], "classes": {}, "dtsImports": [], - "diagnosticSpans": [[130, 134]] + "diagnosticSpans": [ + [113, 119], + [113, 119] + ] }, { - "name": "probe: resolve-arrowConstFn", + "name": "probe: transform-unknownIdent", "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" + "test.ts": "import {Directive, Input, booleanAttribute} from \"@angular/core\";\ndeclare const f: any;\n@Directive({selector: \"[d]\"})\nexport class Dir { @Input({transform: f}) v: any; }\n@Directive({selector: \"[e]\", inputs: [{name: \"w\", transform: f}]})\nexport class Dir2 { w: any; }\n" }, "diagnostics": [ - "Failed to resolve @Directive.inputs to an array Value could not be determined statically." + "Input transform must be a function Value is a reference to 'f'.", + "Input transform must be a function Value is a reference to 'f'." ], "classes": {}, "dtsImports": [], - "diagnosticSpans": [[109, 113]] + "diagnosticSpans": [ + [80, 86], + [80, 86] + ] }, { - "name": "probe: resolve-letArr", + "name": "probe: eval-letArrow", "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" - }, - "diagnostics": [], - "classes": { - "Dir": { - "inputs": "{w:\"w\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "test.ts": "import {Directive, Input} from \"@angular/core\";\nimport * as core from \"@angular/core\";\nlet f = (v: string) => 1;\n@Directive({selector: \"[d]\"})\nexport class Dir { @Input({transform: f}) v: any; }\n" }, + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "classes": {}, "dtsImports": [], - "diagnosticSpans": [] + "diagnosticSpans": [[181, 182]] }, { - "name": "probe: resolve-varArr", + "name": "probe: eval-varFn", "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" - }, - "diagnostics": [], - "classes": { - "Dir": { - "inputs": "{w:\"w\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "test.ts": "import {Directive, Input} from \"@angular/core\";\nimport * as core from \"@angular/core\";\nvar f = function (v: string) { return 1; };\n@Directive({selector: \"[d]\"})\nexport class Dir { @Input({transform: f}) v: any; }\n" }, + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "classes": {}, "dtsImports": [], - "diagnosticSpans": [] + "diagnosticSpans": [[199, 200]] }, { - "name": "probe: resolve-letStrElem", + "name": "probe: eval-staticMissing", "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" - }, - "diagnostics": [], - "classes": { - "Dir": { - "inputs": "{w:\"w\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "test.ts": "import {Directive, Input} from \"@angular/core\";\nimport * as core from \"@angular/core\";\nexport class U {}\n@Directive({selector: \"[d]\"})\nexport class Dir { @Input({transform: U.nope}) v: any; }\n" }, + "diagnostics": ["Input transform must be a function Value is of type 'undefined'."], + "classes": {}, "dtsImports": [], - "diagnosticSpans": [] + "diagnosticSpans": [[161, 180]] }, { - "name": "probe: resolve-inputsTplName", + "name": "probe: eval-instanceMethod", "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" - }, - "diagnostics": [], - "classes": { - "Dir": { - "inputs": "{w:\"w\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "test.ts": "import {Directive, Input} from \"@angular/core\";\nimport * as core from \"@angular/core\";\nexport class U { f(v: string) { return 1; } }\n@Directive({selector: \"[d]\"})\nexport class Dir { @Input({transform: U.prototype.f}) v: any; }\n" }, + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "classes": {}, "dtsImports": [], - "diagnosticSpans": [] + "diagnosticSpans": [[201, 214]] }, { - "name": "probe: resolve-inputsNameViaConst", + "name": "probe: eval-nsImportMember", "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" - }, - "diagnostics": [], - "classes": { - "Dir": { - "inputs": "{w:[0,\"xw\",\"w\"]}", - "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" + "test.ts": "import {Directive, Input} from \"@angular/core\";\nimport * as core from \"@angular/core\";\n\n@Directive({selector: \"[d]\"})\nexport class Dir { @Input({transform: core.booleanAttribute}) v: any; }\n" }, "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." + "Input transform function could not be referenced Value is a reference to 'booleanAttribute'." ], "classes": {}, "dtsImports": [], - "diagnosticSpans": [[86, 98]] - }, - { - "name": "probe: basic-all-forms", - "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" - }, - "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;" - } - }, - "dtsImports": [], - "diagnosticSpans": [] + "skip": "ngtsc reports this at `booleanAttribute`'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: review-duplicateMetadataEntries", + "name": "probe: eval-nsImport", "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; }" - }, - "diagnostics": [], - "classes": { - "Dir": { - "inputs": "{a:[0,\"c\",\"a\"],b:\"b\"}", - "outputs": "{o:\"q\",p:\"p\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "test.ts": "import {Directive, Input} from \"@angular/core\";\nimport * as core from \"@angular/core\";\n\n@Directive({selector: \"[d]\"})\nexport class Dir { @Input({transform: core}) v: any; }\n" }, + "diagnostics": ["Input transform must be a function Value is of type '(module)'."], + "classes": {}, "dtsImports": [], - "diagnosticSpans": [] + "diagnosticSpans": [[144, 161]] }, { - "name": "probe: review-extraColonSegments", + "name": "probe: eval-objMember", "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; }" - }, - "diagnostics": [], - "classes": { - "Dir": { - "inputs": "{a:[0,\"b\",\"a\"]}", - "outputs": "{o:\"p\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "test.ts": "import {Directive, Input} from \"@angular/core\";\nimport * as core from \"@angular/core\";\nconst T = { f: (v: string) => 1 };\n@Directive({selector: \"[d]\"})\nexport class Dir { @Input({transform: T.f}) v: any; }\n" }, + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "classes": {}, "dtsImports": [], - "diagnosticSpans": [] + "diagnosticSpans": [[190, 193]] }, { - "name": "probe: review-dtsMemberOverridesImportedTransform", + "name": "probe: eval-typeofOp", "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; }" - }, - "diagnostics": [], - "classes": { - "Dir": { - "inputs": "{x:[2,\"x\",\"x\",booleanAttribute]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;", - "dts:ngAcceptInputType_x": "staticngAcceptInputType_x:unknown;" - } + "test.ts": "import {Directive, Input} from \"@angular/core\";\nimport * as core from \"@angular/core\";\n\n@Directive({selector: \"[d]\"})\nexport class Dir { @Input({transform: typeof 1}) v: any; }\n" }, + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "classes": {}, "dtsImports": [], - "diagnosticSpans": [] + "diagnosticSpans": [[156, 164]] }, { - "name": "probe: review-numberSmall", + "name": "probe: eval-tpl", "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, Input} from \"@angular/core\";\nimport * as core from \"@angular/core\";\nconst X = \"x\";\n@Directive({selector: \"[d]\"})\nexport class Dir { @Input({transform: `a${X}`}) v: any; }\n" }, + "diagnostics": ["Input transform must be a function Value is of type 'string'."], + "classes": {}, "dtsImports": [], - "diagnosticSpans": [] + "diagnosticSpans": [[158, 178]] }, { - "name": "probe: review-numberLarge", + "name": "probe: eval-tplDyn", "origin": "probe", "files": { - "test.ts": "import {Directive} from \"@angular/core\";\n@Directive({selector: \"[d]\", inputs: [`d${123456789012345680000}`]})\nexport class Dir {}" - }, - "diagnostics": [], - "classes": { - "Dir": { - "inputs": "{d123456789012345680000:\"d123456789012345680000\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "test.ts": "import {Directive, Input} from \"@angular/core\";\nimport * as core from \"@angular/core\";\ndeclare const X: any;\n@Directive({selector: \"[d]\"})\nexport class Dir { @Input({transform: `a${X}`}) v: any; }\n" }, + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "classes": {}, "dtsImports": [], - "diagnosticSpans": [] + "diagnosticSpans": [[177, 184]] }, { - "name": "probe: review-numberMicro", + "name": "probe: eval-newExpr", "origin": "probe", "files": { - "test.ts": "import {Directive} from \"@angular/core\";\n@Directive({selector: \"[d]\", inputs: [`e${0.000001}`]})\nexport class Dir {}" - }, - "diagnostics": [], - "classes": { - "Dir": { - "inputs": "{\"e0.000001\":\"e0.000001\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "test.ts": "import {Directive, Input} from \"@angular/core\";\nimport * as core from \"@angular/core\";\nexport class U {}\n@Directive({selector: \"[d]\"})\nexport class Dir { @Input({transform: new U()}) v: any; }\n" }, + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "classes": {}, "dtsImports": [], - "diagnosticSpans": [] + "diagnosticSpans": [[173, 180]] }, { - "name": "probe: review-numberFraction", + "name": "probe: eval-descObjNested", "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, Input} from \"@angular/core\";\nimport * as core from \"@angular/core\";\n\n@Directive({selector: \"[d]\"})\nexport class Dir { @Input({transform: {a: 1, \"b-c\": \"x\", d: {e: 1}, f: [1], g: () => 1, h: null, i: undefined, j: true}}) v: any; }\n" }, + "diagnostics": [ + "Input transform must be a function Value is of type '{ a: number; 'b-c': string; d: object; f: Array; g: (not statically analyzable); h: null; i: undefined; j: boolean }'." + ], + "classes": {}, "dtsImports": [], - "diagnosticSpans": [] + "diagnosticSpans": [[144, 238]] }, { - "name": "probe: review-infinityGlobal", + "name": "probe: eval-descObjRefs", "origin": "probe", "files": { - "test.ts": "import {Directive} from \"@angular/core\";\n@Directive({selector: \"[d]\", inputs: [`c${Infinity}`]})\nexport class Dir {}" + "test.ts": "import {Directive, Input} from \"@angular/core\";\nimport * as core from \"@angular/core\";\nexport class U {}\nexport function g(v: string) { return 1; }\n@Directive({selector: \"[d]\"})\nexport class Dir { @Input({transform: {a: U, b: g, c: core, d: Number}}) 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 is of type '{ a: U; b: g; c: (module); d: Number }'." ], "classes": {}, "dtsImports": [], - "diagnosticSpans": [[78, 94]] + "diagnosticSpans": [[204, 249]] }, { - "name": "probe: review-nanGlobal", + "name": "probe: eval-descArr", "origin": "probe", "files": { - "test.ts": "import {Directive} from \"@angular/core\";\n@Directive({selector: \"[d]\", inputs: [`n${NaN}`]})\nexport class Dir {}" + "test.ts": "import {Directive, Input} from \"@angular/core\";\nimport * as core from \"@angular/core\";\n\n@Directive({selector: \"[d]\"})\nexport class Dir { @Input({transform: [1, \"a\", [2], {x: 1}, () => 1, null]}) 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 is of type '[number, string, Array, object, (not statically analyzable), null]'." ], "classes": {}, "dtsImports": [], - "diagnosticSpans": [[78, 89]] + "diagnosticSpans": [[144, 193]] }, { - "name": "probe: review-undefinedKeyword", + "name": "probe: eval-descEmptyObj", "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, Input} from \"@angular/core\";\nimport * as core from \"@angular/core\";\n\n@Directive({selector: \"[d]\"})\nexport class Dir { @Input({transform: {}}) v: any; }\n" }, + "diagnostics": ["Input transform must be a function Value is of type '{}'."], + "classes": {}, "dtsImports": [], - "diagnosticSpans": [] + "diagnosticSpans": [[144, 159]] }, { - "name": "probe: review-numberExponent", + "name": "probe: eval-descEmptyArr", "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, Input} from \"@angular/core\";\nimport * as core from \"@angular/core\";\n\n@Directive({selector: \"[d]\"})\nexport class Dir { @Input({transform: []}) v: any; }\n" }, + "diagnostics": ["Input transform must be a function Value is of type '[]'."], + "classes": {}, "dtsImports": [], - "diagnosticSpans": [] + "diagnosticSpans": [[144, 159]] }, { - "name": "probe: eval-binaryPlus", + "name": "probe: eval-descSpreadObj", "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, Input} from \"@angular/core\";\nimport * as core from \"@angular/core\";\nconst O = {a: 1};\n@Directive({selector: \"[d]\"})\nexport class Dir { @Input({transform: {...O, b: \"x\"}}) v: any; }\n" }, - "dtsImports": [] + "diagnostics": [ + "Input transform must be a function Value is of type '{ a: number; b: string }'." + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[161, 188]] }, { - "name": "probe: eval-binaryArith", + "name": "probe: eval-descSpreadArr", "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" - }, - "diagnostics": [], - "diagnosticSpans": [], - "classes": { - "Dir": { - "inputs": "{x5:\"x5\",y1024:\"y1024\",\"z1768-415\":\"z1768-415\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "test.ts": "import {Directive, Input} from \"@angular/core\";\nimport * as core from \"@angular/core\";\nconst A = [1];\n@Directive({selector: \"[d]\"})\nexport class Dir { @Input({transform: [...A, \"x\"]}) v: any; }\n" }, - "dtsImports": [] + "diagnostics": ["Input transform must be a function Value is of type '[number, string]'."], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[158, 182]] }, { - "name": "probe: eval-binaryCompare", + "name": "probe: eval-descComputedKey", "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" - }, - "diagnostics": [], - "diagnosticSpans": [], - "classes": { - "Dir": { - "inputs": "{atruetruefalsefalsetruetruetruefalse:\"atruetruefalsefalsetruetruetruefalse\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "test.ts": "import {Directive, Input} from \"@angular/core\";\nimport * as core from \"@angular/core\";\nconst K = \"k\";\n@Directive({selector: \"[d]\"})\nexport class Dir { @Input({transform: {[K]: 1}}) v: any; }\n" }, - "dtsImports": [] + "diagnostics": ["Input transform must be a function Value is of type '{ k: number }'."], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[158, 179]] }, { - "name": "probe: eval-conditional", + "name": "probe: eval-descMethodShorthand", "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" - }, - "diagnostics": [], - "diagnosticSpans": [], - "classes": { - "Dir": { - "inputs": "{a:\"a\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "test.ts": "import {Directive, Input} from \"@angular/core\";\nimport * as core from \"@angular/core\";\n\n@Directive({selector: \"[d]\"})\nexport class Dir { @Input({transform: {m() { return 1; }}}) v: any; }\n" }, - "dtsImports": [] + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[156, 175]] }, { - "name": "probe: eval-conditionalFalsy", + "name": "probe: eval-inputsObj", "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\";\nimport * as core from \"@angular/core\";\n\n@Directive({selector: \"[d]\", inputs: {a: 1}})\nexport class Dir { a: any; }\n" }, - "dtsImports": [] + "diagnostics": [ + "Failed to resolve @Directive.inputs to an array Value is of type '{ a: number }'." + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[125, 131]] }, { - "name": "probe: eval-conditionalDynamic", + "name": "probe: eval-inputsCall", "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\";\nimport * as core from \"@angular/core\";\ndeclare function mk(): any;\n@Directive({selector: \"[d]\", inputs: mk()})\nexport class Dir { 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": [[152, 156]] }, { - "name": "probe: eval-logicalOr", + "name": "probe: eval-inputsRef", "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" - }, - "diagnostics": [], - "diagnosticSpans": [], - "classes": { - "Dir": { - "inputs": "{a:\"a\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "test.ts": "import {Directive, Input} from \"@angular/core\";\nimport * as core from \"@angular/core\";\nexport class U {}\n@Directive({selector: \"[d]\", inputs: U})\nexport class Dir { a: any; }\n" }, - "dtsImports": [] + "diagnostics": [ + "Failed to resolve @Directive.inputs to an array Value is a reference to 'U'." + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[142, 143]] }, { - "name": "probe: eval-logicalAnd", + "name": "probe: eval-inputsElemRef", "origin": "probe", "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: ['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\";\nimport * as core from \"@angular/core\";\nexport class U {}\n@Directive({selector: \"[d]\", inputs: [U]})\nexport class Dir { a: any; }\n" }, - "dtsImports": [] + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value is a reference to 'U'." + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[142, 145]] }, { - "name": "probe: eval-logicalElem", + "name": "probe: eval-inputsElemDyn", "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\";\nimport * as core from \"@angular/core\";\ndeclare const X: any;\n@Directive({selector: \"[d]\", inputs: [X]})\nexport class Dir { a: any; }\n" }, - "diagnostics": [], - "diagnosticSpans": [], - "classes": { - "Dir": { - "inputs": "{a:\"a\",c:\"c\",d:\"d\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value is a reference to 'X'." + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[146, 149]] + }, + { + "name": "probe: eval-inputsNameNum", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input} from \"@angular/core\";\nimport * as core from \"@angular/core\";\n\n@Directive({selector: \"[d]\", inputs: [{name: 1}]})\nexport class Dir { a: any; }\n" }, - "dtsImports": [] + "diagnostics": [ + "Value at position 0 of @Directive.inputs array must have a \"name\" property Value is of type 'number'." + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[125, 136]] }, { - "name": "probe: eval-nullish", + "name": "probe: eval-inputsNameRef", "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\";\nimport * as core from \"@angular/core\";\nexport class U {}\n@Directive({selector: \"[d]\", inputs: [{name: U}]})\nexport class Dir { a: any; }\n" }, "diagnostics": [ - "Failed to resolve @Directive.inputs to an array Value could not be determined statically." + "Value at position 0 of @Directive.inputs array must have a \"name\" property Value is a reference to 'U'." ], - "diagnosticSpans": [[101, 111]], "classes": {}, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [[142, 153]] }, { - "name": "probe: eval-unary", + "name": "probe: eval-multiErr", "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" + "test.ts": "import {Directive, Input} from \"@angular/core\";\nimport * as core from \"@angular/core\";\n\n@Directive({selector: \"[d]\", inputs: [1, 2], outputs: [3]})\nexport class Dir { @Input({transform: null}) v: any; }\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": [ + "@Directive.inputs array can only contain strings or object literals Value is of type 'number'." + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[125, 131]] + }, + { + "name": "probe: eval-orderFieldBeforeOutputsMeta", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input} from \"@angular/core\";\nimport * as core from \"@angular/core\";\n\n@Directive({selector: \"[d]\", outputs: [3]})\nexport class Dir { @Input({transform: null}) v: any; }\n" }, - "dtsImports": [] + "diagnostics": ["Input transform must be a function Value is of type 'null'."], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[158, 175]] }, { - "name": "probe: eval-typeof", + "name": "probe: resolve-fnMultiStmt", "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\";\nfunction mk() { const x = [\"w\"]; return x; }\n@Directive({selector: \"[d]\", inputs: mk()})\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." + "Failed to resolve @Directive.inputs to an array Value could not be determined statically." ], - "diagnosticSpans": [[85, 97]], "classes": {}, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [[130, 134]] }, { - "name": "probe: eval-void", + "name": "probe: resolve-arrowConstFn", "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\";\nconst mk = () => [\"w\"];\n@Directive({selector: \"[d]\", inputs: mk()})\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." + "Failed to resolve @Directive.inputs to an array Value could not be determined statically." ], - "diagnosticSpans": [[85, 93]], "classes": {}, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [[109, 113]] }, { - "name": "probe: eval-tplEnum", + "name": "probe: resolve-letArr", "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" + "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": "{ax:\"ax\",b2:\"b2\",c1:\"c1\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{w:\"w\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [] }, { - "name": "probe: eval-enumMember", + "name": "probe: resolve-varArr", "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\";\nvar INPUTS = [\"w\"];\n@Directive({selector: \"[d]\", inputs: INPUTS})\nexport class Dir { w: any; a: any; }\n" }, - "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value is of type 'E'." - ], - "diagnosticSpans": [[104, 109]], - "classes": {}, - "dtsImports": [] + "diagnostics": [], + "classes": { + "Dir": { + "inputs": "{w:\"w\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] }, { - "name": "probe: eval-enumMemberBinary", + "name": "probe: resolve-letStrElem", "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\";\nlet S = \"w\";\n@Directive({selector: \"[d]\", inputs: [S]})\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": [] + "dtsImports": [], + "diagnosticSpans": [] }, { - "name": "probe: eval-enumWhole", + "name": "probe: resolve-transformIndexed", "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" + "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 is of type '{ A: E }'." + "Input transform must be a function Value could not be determined statically." ], - "diagnosticSpans": [[104, 105]], "classes": {}, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [[117, 138]] }, { - "name": "probe: eval-enumMissing", + "name": "probe: resolve-transformCondArrow", "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" + "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": [ - "@Directive.inputs array can only contain strings or object literals Value is of type 'undefined'." + "Input transform must be a function Value could not be determined statically." ], - "diagnosticSpans": [[104, 109]], "classes": {}, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [[117, 147]] }, { - "name": "probe: eval-constEnum", + "name": "probe: resolve-transformParen", "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\";\n\n@Directive({selector: \"[d]\"})\nexport class Dir { @Input({transform: ((v: string) => 1)}) v: any; }\n" }, - "diagnostics": [], - "diagnosticSpans": [], - "classes": { - "Dir": { - "inputs": "{x:\"x\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[117, 135]] + }, + { + "name": "probe: resolve-transformAs", + "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" }, - "dtsImports": [] + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[117, 142]] }, { - "name": "probe: eval-enumComputedInit", + "name": "probe: resolve-transformObjInline", "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]\"})\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 could not be determined statically." + "Input transform must be a function Value could not be determined statically." ], - "diagnosticSpans": [[117, 127]], "classes": {}, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [[117, 142]] }, { - "name": "probe: eval-destructObj", + "name": "probe: resolve-inputsTplName", "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 {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": "{a:\"a\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{w:\"w\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [] }, { - "name": "probe: eval-destructObjRename", + "name": "probe: resolve-inputsNameViaConst", "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} 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": "{a:\"a\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{w:[0,\"xw\",\"w\"]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [] }, { - "name": "probe: eval-destructObjNested", + "name": "probe: resolve-inputsHole", "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;" - } + "test.ts": "import {Directive, Input} from \"@angular/core\";\n\n@Directive({selector: \"[d]\", inputs: [\"w\", , \"a\"]})\nexport class Dir { w: any; a: any; }\n" }, - "dtsImports": [] + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[86, 98]] }, { - "name": "probe: eval-destructArr", + "name": "probe: basic-all-forms", "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 { 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\",b:\"b\"}", - "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-destructDefault", + "name": "probe: review-duplicateMetadataEntries", "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';\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": [ - "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": [], + "classes": { + "Dir": { + "inputs": "{a:[0,\"c\",\"a\"],b:\"b\"}", + "outputs": "{o:\"q\",p:\"p\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } }, - "diagnostics": ["Failed to resolve @Directive.inputs to an array Value is of type 'string'."], - "diagnosticSpans": [[119, 120]], - "classes": {}, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [] }, { - "name": "probe: eval-destructRestObj", + "name": "probe: review-extraColonSegments", "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, 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-destructFromConst", + "name": "probe: review-dtsMemberOverridesImportedTransform", "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, 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\"}", - "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-destructStringKey", + "name": "probe: review-namespacedInput", "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';\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 could not be determined statically." - ], - "diagnosticSpans": [[114, 115]], + "diagnostics": ["Input transform must be a function Value is of type 'null'."], "classes": {}, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [[166, 183]] }, { - "name": "probe: eval-fnCall", + "name": "probe: review-aliasedInput", "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, 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": ["Input transform must be a function Value is of type 'null'."], + "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`" + }, + { + "name": "probe: review-numberSmall", + "origin": "probe", + "files": { + "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-fnCallParams", + "name": "probe: review-numberLarge", "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: [`d${123456789012345680000}`]})\nexport class Dir {}" }, "diagnostics": [], - "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{a:\"a\",b2:\"b2\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{d123456789012345680000:\"d123456789012345680000\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [] }, { - "name": "probe: eval-fnCallDefault", + "name": "probe: review-numberMicro", "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" + "test.ts": "import {Directive} from \"@angular/core\";\n@Directive({selector: \"[d]\", inputs: [`e${0.000001}`]})\nexport class Dir {}" }, "diagnostics": [], - "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{d:\"d\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{\"e0.000001\":\"e0.000001\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [] }, { - "name": "probe: eval-fnCallRest", + "name": "probe: review-numberFraction", "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" + "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\",b:\"b\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{\"f1.5\":\"f1.5\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, - "dtsImports": [] + "dtsImports": [], + "diagnosticSpans": [] }, { - "name": "probe: eval-fnCallMissingArg", + "name": "probe: review-infinityGlobal", "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: [`c${Infinity}`]})\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, 94]] }, { - "name": "probe: eval-fnCallNested", + "name": "probe: review-nanGlobal", "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: [`n${NaN}`]})\nexport class Dir {}" + }, + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[78, 89]] + }, + { + "name": "probe: review-undefinedKeyword", + "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;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: review-numberExponent", + "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;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: eval-binaryPlus", + "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": "{q1:\"q1\",qz1:\"qz1\"}", - "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-fnCallExported", + "name": "probe: eval-binaryArith", "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, 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": "{a:\"a\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{x5:\"x5\",y1024:\"y1024\",\"z1768-415\":\"z1768-415\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: eval-fnCallConstRef", + "name": "probe: eval-binaryCompare", "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${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": "{p:\"p\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{atruetruefalsefalsetruetruetruefalse:\"atruetruefalsefalsetruetruetruefalse\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: eval-fnCallEmptyReturn", + "name": "probe: eval-conditional", "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';\nconst C = true;\n@Directive({selector: '[d]', inputs: C ? ['a'] : ['b']})\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 is of type 'undefined'." - ], - "diagnosticSpans": [[111, 115]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: eval-fnCallSpreadArgs", + "name": "probe: eval-conditionalFalsy", "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';\nconst C = '';\n@Directive({selector: '[d]', inputs: C ? ['a'] : ['b']})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{x:\"x\",y:\"y\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{b:\"b\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: eval-fnOverload", + "name": "probe: eval-conditionalDynamic", "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';\ndeclare function f(): boolean;\n@Directive({selector: '[d]', inputs: f() ? ['a'] : ['b']})\nexport class Dir {}\n" }, "diagnostics": [ "Failed to resolve @Directive.inputs to an array Value could not be determined statically." ], - "diagnosticSpans": [[152, 156]], + "diagnosticSpans": [[116, 135]], "classes": {}, "dtsImports": [] }, { - "name": "probe: eval-fnDeclare", + "name": "probe: eval-logicalOr", "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": [ - "Failed to resolve @Directive.inputs to an array Value could not be determined statically." - ], - "diagnosticSpans": [[118, 122]], - "classes": {}, - "dtsImports": [] - }, - { - "name": "probe: eval-fnExpressionConst", - "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" - }, - "diagnostics": [ - "Failed to resolve @Directive.inputs to an array Value could not be determined statically." - ], - "diagnosticSpans": [[127, 131]], - "classes": {}, - "dtsImports": [] - }, - { - "name": "probe: eval-fnParamDestructured", - "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" - }, - "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." - ], - "diagnosticSpans": [[131, 143]], - "classes": {}, - "dtsImports": [] - }, - { - "name": "probe: eval-fnParamShadow", - "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\",b:\"b\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{a:\"a\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: eval-declareReadonlyTuple", + "name": "probe: eval-destructObjNested", "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: {B}} = {A: {B: ['a']}};\n@Directive({selector: '[d]', inputs: B})\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-destructArr", "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 [A, , B] = [['a'], 0, ['b']];\n@Directive({selector: '[d]', inputs: [...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-declareStringArray", + "name": "probe: eval-destructDefault", "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 = ['z']} = {} as any;\n@Directive({selector: '[d]', inputs: A})\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 is of type 'undefined'." ], - "diagnosticSpans": [[112, 113]], + "diagnosticSpans": [[116, 117]], "classes": {}, "dtsImports": [] }, { - "name": "probe: eval-declareTypeof", + "name": "probe: eval-destructRestArr", "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';\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": [], @@ -1664,10 +1902,10 @@ "dtsImports": [] }, { - "name": "probe: eval-declareLiteralElem", + "name": "probe: eval-destructFromConst", "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';\nconst O = {A: ['a']};\nconst {A} = O;\n@Directive({selector: '[d]', inputs: A})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], @@ -1680,68 +1918,116 @@ "dtsImports": [] }, { - "name": "probe: eval-declareNumberElem", + "name": "probe: eval-destructStringKey", "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';\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": [] + }, + { + "name": "probe: eval-fnCall", + "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" }, "diagnostics": [], "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{n1:\"n1\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{a:\"a\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: eval-declareLet", + "name": "probe: eval-fnCallParams", "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(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-letNoInit", + "name": "probe: eval-fnCallDefault", "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 = '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;" + } }, - "diagnostics": [ - "Failed to resolve @Directive.inputs to an array Value is of type 'undefined'." - ], - "diagnosticSpans": [[92, 93]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: eval-letNoInitElem", + "name": "probe: eval-fnCallRest", "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 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": [] + }, + { + "name": "probe: eval-fnCallMissingArg", + "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" }, "diagnostics": [ "@Directive.inputs array can only contain strings or object literals Value is of type 'undefined'." ], - "diagnosticSpans": [[100, 103]], + "diagnosticSpans": [[125, 129]], "classes": {}, "dtsImports": [] }, { - "name": "probe: eval-varTwice", + "name": "probe: eval-fnCallNested", "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';\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;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: eval-fnCallExported", + "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" }, "diagnostics": [], "diagnosticSpans": [], @@ -1754,146 +2040,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": [], @@ -1906,284 +2185,252 @@ "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": [ - "@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", - "origin": "probe", - "files": { - "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: [{...'x', name: 'a'}]})\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": [[85, 106]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: msg-objSpreadDynamic", + "name": "probe: eval-stringConcat", "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('b', 1, true, null)]})\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": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{ab1truenull:\"ab1truenull\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } }, - "diagnostics": ["Failed to resolve outputs at position 0 to a string Value is of type 'E'."], - "diagnosticSpans": [[105, 110]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: msg-anonymousClassRef", + "name": "probe: eval-stringConcatBad", "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: ['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": [[85, 95]], - "classes": {}, - "dtsImports": [] - }, - { - "name": "probe: rej-satisfies", - "origin": "probe", - "files": { - "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 could not be determined statically." - ], - "diagnosticSpans": [[85, 109]], + "diagnosticSpans": [[85, 108]], "classes": {}, "dtsImports": [] }, { - "name": "probe: rej-typeAssertion", + "name": "probe: eval-stringLength", "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';\n@Directive({selector: '[d]', inputs: [`n${'😀'.length}`, `m${'abc'.length}`]})\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, 100]], + "diagnosticSpans": [[85, 124]], "classes": {}, "dtsImports": [] }, { - "name": "probe: rej-elemSatisfies", + "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": [ "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." ], - "diagnosticSpans": [[85, 107]], + "diagnosticSpans": [[85, 95]], "classes": {}, "dtsImports": [] }, { - "name": "probe: rej-arrayStringIndex", + "name": "probe: eval-arrayMethodOther", "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';\nconst A = ['a'];\n@Directive({selector: '[d]', inputs: A.map(x => 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": [[107, 115]], + "diagnosticSpans": [[102, 115]], "classes": {}, "dtsImports": [] }, { - "name": "probe: rej-arrayNumIndex", + "name": "probe: eval-declareTuple", "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: ['a', '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\",b:\"b\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: rej-arrayFloatIndex", + "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.5]]})\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": [ - "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." - ], - "diagnosticSpans": [[107, 115]], - "classes": {}, - "dtsImports": [] - }, - { - "name": "probe: rej-arrayOutOfRange", - "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" + "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 is of type 'undefined'." - ], - "diagnosticSpans": [[107, 113]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: rej-arrayNegIndex", + "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": "{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, 114]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: rej-arrayPropOther", + "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.foo]})\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, 114]], + "diagnosticSpans": [[112, 113]], "classes": {}, "dtsImports": [] }, { - "name": "probe: rej-objectIndexNum", + "name": "probe: eval-declareTypeof", "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';\nconst Y = ['a'];\ndeclare const X: typeof Y;\n@Directive({selector: '[d]', inputs: X})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], @@ -2196,249 +2443,191 @@ "dtsImports": [] }, { - "name": "probe: rej-computedConfigKey", + "name": "probe: eval-declareLiteralElem", "origin": "probe", "files": { - "test.ts": "import {Directive} from '@angular/core';\nconst K = 'inputs';\n@Directive({selector: '[d]', [K]: ['a']})\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": [], "classes": { "Dir": { - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{a:\"a\"}", + "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", - "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;" - } - }, - "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: key-integerLike", - "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;" - } - }, - "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: key-integerOutputs", + "name": "probe: eval-libGlobal", "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, 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-integerMerge", + "name": "probe: eval-namespaceImport", "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} 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-protoWithMember", + "name": "probe: eval-namespaceImportElem", "origin": "probe", "files": { - "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": "{a:\"a\"}", - "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" }, + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value is of type '(module)'." + ], + "diagnosticSpans": [[117, 123]], + "classes": {}, "dtsImports": [] }, { - "name": "probe: key-whitespaceAlias", + "name": "probe: eval-objMethod", "origin": "probe", "files": { - "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": "{a:[0,\"spaced alias\",\"a\"],b:\"b\"}", - "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" }, + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." + ], + "diagnosticSpans": [[85, 106]], + "classes": {}, "dtsImports": [] }, { - "name": "probe: depth-chain300", + "name": "probe: eval-objShorthand", "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" + "test.ts": "import {Directive, Input} from '@angular/core';\nconst name = 'a';\n@Directive({selector: '[d]', inputs: [{name}]})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], @@ -2451,10 +2640,10 @@ "dtsImports": [] }, { - "name": "probe: depth-chain1000", + "name": "probe: eval-objComputedStr", "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';\nconst K = 'name';\n@Directive({selector: '[d]', inputs: [{[K]: 'a'}]})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], @@ -2467,26 +2656,23 @@ "dtsImports": [] }, { - "name": "probe: depth-chainSpread300", + "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-chainSpread1000", + "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": [], @@ -2499,1046 +2685,3696 @@ "dtsImports": [] }, { - "name": "probe: misc-enumIndex", + "name": "probe: eval-objComputedNumDescribe", "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: {[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-enumStringKey", + "name": "probe: eval-objSpreadArray", "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: [{...['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-enumSelfRef", + "name": "probe: eval-objGetter", "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';\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": [[133, 143]], + "diagnosticSpans": [[85, 121]], "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-enumTwice", + "name": "probe: msg-spreadNonArray", "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';\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": [[101, 112]], + "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-enumOutsideConst", + "name": "probe: msg-spreadUnknown", "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';\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": [[152, 162]], + "diagnosticSpans": [[112, 125]], "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-thisParam", + "name": "probe: msg-spreadRef", "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';\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": [[96, 107]], + "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-typeofQualified", + "name": "probe: msg-spreadNonArrayOutputs", "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]', outputs: ['x', ...S]})\nexport class Dir {}\n" }, "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value is a reference to 'A'." + "Failed to resolve outputs at position 1 to a string Value could not be determined statically." ], - "diagnosticSpans": [[155, 158]], + "diagnosticSpans": [[104, 115]], "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-tupleNonLiteral", + "name": "probe: msg-spreadObjInArr", "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';\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 could not be determined statically." ], - "diagnosticSpans": [[139, 140]], + "diagnosticSpans": [[103, 109]], "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-tupleNeg", + "name": "probe: msg-objSpreadNonObject", "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;" - } - }, - "dtsImports": [] - }, - { - "name": "probe: misc-tupleTemplateType", - "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;" - } - }, - "dtsImports": [] - }, - { - "name": "probe: misc-declareTypeRefClass", - "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: [{...'x', name: 'a'}]})\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, 106]], "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-declareTypeRefAlias", + "name": "probe: msg-objSpreadDynamic", "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';\ndeclare function f(): any;\n@Directive({selector: '[d]', inputs: [{...f(), name: 'a'}]})\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": [[143, 144]], + "diagnosticSpans": [[112, 133]], "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-declareTupleOptional", + "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" + "test.ts": "import {Directive, Input} from '@angular/core';\nenum E { A = 'x' }\n@Directive({selector: '[d]', outputs: [E.A]})\nexport class Dir {}\n" }, - "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." - ], - "diagnosticSpans": [[132, 133]], + "diagnostics": ["Failed to resolve outputs at position 0 to a string Value is of type 'E'."], + "diagnosticSpans": [[105, 110]], "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-declareTupleRest", + "name": "probe: msg-anonymousClassRef", "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: [class {}]})\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, 95]], "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-declareUnion", + "name": "probe: rej-satisfies", "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';\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": [[139, 140]], + "diagnosticSpans": [[85, 109]], "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-declareNull", - "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" - }, - "diagnostics": [], - "diagnosticSpans": [], - "classes": { - "Dir": { - "inputs": "{nulltrue1:\"nulltrue1\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } - }, - "dtsImports": [] - }, - { - "name": "probe: misc-declareExport", - "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;" - } - }, - "dtsImports": [] - }, - { - "name": "probe: misc-declareVar", - "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;" - } - }, - "dtsImports": [] - }, - { - "name": "probe: misc-describeObjOrder", + "name": "probe: rej-typeAssertion", "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';\n@Directive({selector: '[d]', inputs: ['a']})\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 }'." + "Failed to resolve @Directive.inputs to an array Value could not be determined statically." ], - "diagnosticSpans": [[107, 142]], + "diagnosticSpans": [[85, 100]], "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-describeNested", + "name": "probe: rej-elemSatisfies", "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';\n@Directive({selector: '[d]', inputs: ['a' satisfies string]})\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": [[85, 107]], "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-describeFunction", + "name": "probe: rej-arrayStringIndex", "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 X = ['a', 'b'];\n@Directive({selector: '[d]', inputs: [X['0']]})\nexport class Dir {}\n" }, "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value is of type 'Function'." + "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." ], - "diagnosticSpans": [[124, 134]], + "diagnosticSpans": [[107, 115]], "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-describeBuiltinStr", + "name": "probe: rej-arrayNumIndex", "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" + "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": "{b:\"b\"}", + "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-arrayFloatIndex", "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, 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 is a reference to 'm'." + "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." ], - "diagnosticSpans": [[144, 149]], + "diagnosticSpans": [[107, 115]], "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-staticFieldUndefined", + "name": "probe: rej-arrayOutOfRange", "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" + "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 a reference to 'm'." + "@Directive.inputs array can only contain strings or object literals Value is of type 'undefined'." ], - "diagnosticSpans": [[137, 142]], + "diagnosticSpans": [[107, 113]], "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-staticPrototype", + "name": "probe: rej-arrayNegIndex", "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, 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": [[118, 131]], + "diagnosticSpans": [[107, 114]], "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-staticInstanceMember", + "name": "probe: rej-arrayPropOther", "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, 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 'undefined'." + "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." ], - "diagnosticSpans": [[128, 133]], + "diagnosticSpans": [[107, 114]], "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-fnRef", + "name": "probe: rej-objectIndexNum", "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, Input} from '@angular/core';\nconst O = {1: 'a'};\n@Directive({selector: '[d]', inputs: [O[1]]})\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-computedConfigKey", "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';\nconst K = 'inputs';\n@Directive({selector: '[d]', [K]: ['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 could not be determined statically." - ], - "diagnosticSpans": [[135, 144]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-mathPI", + "name": "probe: rej-computedConfigKeyLiteral", "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} 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 could not be determined statically." - ], - "diagnosticSpans": [[107, 121]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-condEnumZero", + "name": "probe: rej-stringConfigKey", "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} from '@angular/core';\n@Directive({selector: '[d]', 'inputs': ['a'], \"outputs\": ['o']})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{t:\"t\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{a:\"a\"}", + "outputs": "{o:\"o\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: misc-unaryArray", + "name": "probe: rej-shorthandConfigKey", "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} from '@angular/core';\nconst inputs = ['a'];\n@Directive({selector: '[d]', inputs})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{\"-50false-4\":\"-50false-4\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{a:\"a\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: misc-binaryArrayOperand", + "name": "probe: rej-duplicateConfigKey", "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} from '@angular/core';\n@Directive({selector: '[d]', inputs: ['a'], inputs: ['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]], - "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" + "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 is of type 'null'." - ], - "diagnosticSpans": [[118, 139]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-orDynamicRhs", + "name": "probe: key-proto", "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: ['__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": [[134, 146]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-plusNumStr", + "name": "probe: key-protoObj", "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]', inputs: [{name: '__proto__'}, 'b']})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{x330161201000NaN1NaN2:\"x330161201000NaN1NaN2\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{b:\"b\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: misc-looseEq", + "name": "probe: key-protoAlias", "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: ['a: __proto__', 'b']})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{truetruetruefalsetruetruetruefalse:\"truetruetruefalsetruetruetruefalse\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{a:[0,\"__proto__\",\"a\"],b:\"b\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: misc-divZero", + "name": "probe: key-protoOutputs", "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]', outputs: ['__proto__', 'b']})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{\"Infinity-InfinityNaNNaN00.51-1\":\"Infinity-InfinityNaNNaN00.51-1\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "outputs": "{b:\"b\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: misc-bitwise", + "name": "probe: key-integerOrder", "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: ['b', '1', 'a', '0', '10', '2']})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{\"-21474836481429496729521\":\"-21474836481429496729521\"}", - "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-hexLiteral", + "name": "probe: key-integerLike", "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} 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": { - "inputs": "{\"311000370.551e-7\":\"311000370.551e-7\"}", - "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-bigint", + "name": "probe: key-integerOutputs", "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} from '@angular/core';\n@Directive({selector: '[d]', outputs: ['b', '1', 'a']})\nexport class Dir {}\n" }, - "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", - "origin": "probe", - "files": { - "test.ts": "import {Directive, Input, input, output, model} 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 could not be determined statically." - ], - "diagnosticSpans": [[107, 112]], - "classes": {}, - "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-new", + "name": "probe: key-integerMerge", "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} from '@angular/core';\n@Directive({selector: '[d]', inputs: ['b', '1']})\nexport class Dir { @Input() a: any; @Input() c: any; }\n" }, - "diagnostics": [ - "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." - ], - "diagnosticSpans": [[107, 124]], - "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-optionalChain", + "name": "probe: key-protoWithMember", "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} from '@angular/core';\n@Directive({selector: '[d]', inputs: ['__proto__']})\nexport class Dir { @Input() a: any; }\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{x:\"x\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{a:\"a\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: misc-nonNull", + "name": "probe: key-whitespaceAlias", "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} from '@angular/core';\n@Directive({selector: '[d]', inputs: ['a: spaced alias ', ' b ']})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{x:\"x\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{a:[0,\"spaced alias\",\"a\"],b:\"b\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: misc-asConst", + "name": "probe: depth-chain300", "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';\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\",b:\"b\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{a:\"a\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: misc-parenSeq", + "name": "probe: depth-chain1000", "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 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, 119]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-assign", + "name": "probe: depth-chainSpread300", "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';\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": [[114, 123]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-classExpr", + "name": "probe: depth-chainSpread1000", "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';\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, 121]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-objProtoKey", + "name": "probe: misc-enumIndex", "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';\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": "{a:\"a\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{x51c3:\"x51c3\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: misc-objDupKey", + "name": "probe: misc-enumStringKey", "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';\nenum E { 'x-y' = 'q' }\n@Directive({selector: '[d]', inputs: [`${E['x-y']}`]})\nexport class Dir {}\n" }, "diagnostics": [], "diagnosticSpans": [], "classes": { "Dir": { - "inputs": "{b:\"b\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{q:\"q\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: misc-objDescribeDup", + "name": "probe: misc-enumSelfRef", "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';\nenum E { A = 'x', B = A }\n@Directive({selector: '[d]', inputs: [`${E.B}`]})\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 could not be determined statically." ], - "diagnosticSpans": [[107, 127]], + "diagnosticSpans": [[133, 143]], "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-objIndexUndefinedKey", + "name": "probe: misc-enumTwice", "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';\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": "{undefined:\"undefined\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{x:\"x\",undefined:\"undefined\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: misc-arrayHoleDescribe", + "name": "probe: misc-enumOutsideConst", "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 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, 114]], + "diagnosticSpans": [[152, 162]], "classes": {}, "dtsImports": [] }, { - "name": "probe: misc-arrayInArrayDescribe", + "name": "probe: misc-thisParam", "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" + "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": { - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "inputs": "{b:\"b\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [] }, { - "name": "probe: span-signalCollision", + "name": "probe: misc-typeofQualified", "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';\nenum E { A = 'x' }\ndeclare const X: typeof E.A;\n@Directive({selector: '[d]', inputs: [X]})\nexport class Dir {}\n" }, - "diagnostics": ["Input \"v\" is also declared as non-signal in @Directive."], - "diagnosticSpans": [[136, 156]], + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value is a reference to 'A'." + ], + "diagnosticSpans": [[155, 158]], "classes": {}, "dtsImports": [] }, { - "name": "probe: span-outputCollision", + "name": "probe: misc-tupleNonLiteral", "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 const X: ['a', string];\n@Directive({selector: '[d]', inputs: X})\nexport class Dir {}\n" }, - "diagnostics": ["Output \"o\" is unexpectedly declared in @Directive as well."], - "diagnosticSpans": [[137, 158]], + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." + ], + "diagnosticSpans": [[139, 140]], "classes": {}, "dtsImports": [] }, { - "name": "probe: span-decoratedCollision", + "name": "probe: misc-tupleNeg", "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';\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;" + } }, - "diagnostics": ["Input \"v\" is also declared as non-signal in @Directive."], - "diagnosticSpans": [[173, 202]], - "classes": {}, "dtsImports": [] }, { - "name": "probe: span-shorthandInputs", + "name": "probe: misc-tupleTemplateType", "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';\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;" + } }, - "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", + "name": "probe: misc-declareTypeRefClass", "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';\nclass U {}\ndeclare const X: U;\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 'number'." + "@Directive.inputs array can only contain strings or object literals Value is a reference to 'U'." ], - "diagnosticSpans": [[107, 128]], + "diagnosticSpans": [[138, 141]], "classes": {}, "dtsImports": [] }, { - "name": "probe: span-unicode", + "name": "probe: misc-declareTypeRefAlias", "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';\ntype T = ['a'];\ndeclare const X: T;\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 'number'." + "Failed to resolve @Directive.inputs to an array Value is a reference to 'X'." ], - "diagnosticSpans": [[123, 129]], + "diagnosticSpans": [[143, 144]], "classes": {}, "dtsImports": [] }, { - "name": "probe: span-parenthesized", + "name": "probe: misc-declareTupleOptional", "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';\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 is of type 'number'." + "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." ], - "diagnosticSpans": [[107, 114]], + "diagnosticSpans": [[132, 133]], "classes": {}, "dtsImports": [] }, { - "name": "probe: scope-paramImport", + "name": "probe: misc-declareTupleRest", "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;" - } + "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" }, - "dtsImports": [], - "diagnosticSpans": [] + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." + ], + "diagnosticSpans": [[144, 145]], + "classes": {}, + "dtsImports": [] }, { - "name": "probe: scope-paramLocal", + "name": "probe: misc-declareUnion", "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;" - } + "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" }, - "dtsImports": [], - "diagnosticSpans": [] + "diagnostics": [ + "Failed to resolve @Directive.inputs to an array Value is a reference to 'X'." + ], + "diagnosticSpans": [[139, 140]], + "classes": {}, + "dtsImports": [] }, { - "name": "probe: scope-paramArrow", + "name": "probe: misc-declareNull", "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';\ndeclare const X: [null, true, 1];\n@Directive({selector: '[d]', inputs: [`${X[0]}${X[1]}${X[2]}`]})\nexport class Dir {}\n" }, "diagnostics": [], + "diagnosticSpans": [], "classes": { - "D": { - "inputs": "{x:[2,\"x\",\"x\",(v)=>v.length]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "Dir": { + "inputs": "{nulltrue1:\"nulltrue1\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, - "dtsImports": [], - "diagnosticSpans": [] + "dtsImports": [] }, { - "name": "probe: scope-bodyRef", + "name": "probe: misc-declareExport", "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';\nexport declare const X: ['a'];\n@Directive({selector: '[d]', inputs: X})\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": "{a:\"a\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, - "dtsImports": [], - "diagnosticSpans": [] + "dtsImports": [] }, { - "name": "probe: scope-constObj", + "name": "probe: misc-declareVar", "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';\ndeclare var X: ['a'];\n@Directive({selector: '[d]', inputs: X})\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": "{a:\"a\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, - "dtsImports": [], - "diagnosticSpans": [] + "dtsImports": [] }, { - "name": "probe: scope-staticMethod", + "name": "probe: misc-describeObjOrder", "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;" - } + "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" }, - "dtsImports": [], - "diagnosticSpans": [] + "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: scope-nestedHelper", + "name": "probe: misc-describeNested", "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;" - } + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: [[{a: 1}, [1]]]})\nexport class Dir {}\n" }, - "dtsImports": [], - "diagnosticSpans": [] + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value is of type '[object, Array]'." + ], + "diagnosticSpans": [[107, 122]], + "classes": {}, + "dtsImports": [] }, { - "name": "probe: scope-defaultParam", + "name": "probe: misc-describeFunction", "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;" - } + "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" }, - "dtsImports": [], - "diagnosticSpans": [] + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value is of type 'Function'." + ], + "diagnosticSpans": [[124, 134]], + "classes": {}, + "dtsImports": [] }, { - "name": "probe: scope-aliasParam", + "name": "probe: misc-describeBuiltinStr", "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;" - } + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: ['a'.concat]})\nexport class Dir {}\n" }, - "dtsImports": [], - "diagnosticSpans": [] + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value is of type 'Function'." + ], + "diagnosticSpans": [[107, 119]], + "classes": {}, + "dtsImports": [] }, { - "name": "probe: scope-aliasImportParam", + "name": "probe: misc-staticMethodRef", "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';\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 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": [ + "@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" + }, + "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", + "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" + }, + "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" + }, + "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", + "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" + }, + "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" + }, + "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", + "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" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{t:\"t\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: misc-unaryArray", + "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" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{\"-50false-4\":\"-50false-4\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: misc-binaryArrayOperand", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, input, output, model} 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." + ], + "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" + }, + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value is of type 'null'." + ], + "diagnosticSpans": [[118, 139]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: misc-orDynamicRhs", + "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" + }, + "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": { + "Dir": { + "inputs": "{x330161201000NaN1NaN2:\"x330161201000NaN1NaN2\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: misc-looseEq", + "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" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{truetruetruefalsetruetruetruefalse:\"truetruetruefalsetruetruetruefalse\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: misc-divZero", + "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" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{\"Infinity-InfinityNaNNaN00.51-1\":\"Infinity-InfinityNaNNaN00.51-1\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: misc-bitwise", + "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" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{\"-21474836481429496729521\":\"-21474836481429496729521\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: misc-hexLiteral", + "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" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{\"311000370.551e-7\":\"311000370.551e-7\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: misc-bigint", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, input, output, model} from '@angular/core';\n@Directive({selector: '[d]', inputs: [`${1n}`]})\nexport class Dir {}\n" + }, + "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", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, input, output, model} 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." + ], + "diagnosticSpans": [[107, 112]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: misc-new", + "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" + }, + "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": { + "Dir": { + "inputs": "{x:\"x\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: misc-nonNull", + "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": { + "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": [] + }, + { + "name": "probe: misc-assign", + "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" + }, + "diagnostics": [ + "@Directive.inputs array can only contain strings or object literals Value could not be determined statically." + ], + "diagnosticSpans": [[114, 123]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: misc-classExpr", + "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" + }, + "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": { + "Dir": { + "inputs": "{a:\"a\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: misc-objDupKey", + "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" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{b:\"b\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: misc-objDescribeDup", + "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" + }, + "diagnostics": [ + "Failed to resolve @Directive.inputs to an array Value is of type '{ a: string; b: number }'." + ], + "diagnosticSpans": [[107, 127]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: misc-objIndexUndefinedKey", + "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" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{undefined:\"undefined\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: misc-arrayHoleDescribe", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, input, output, model} 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." + ], + "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": [[173, 179]] + }, + { + "name": "probe: scope-paramMember", + "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" + }, + "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-memberOpts", + "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" + }, + "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-genericHelper", + "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" + }, + "diagnostics": [ + "Symbol must be exported in order to be used as the type of an Input transform function" + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[107, 108]] + }, + { + "name": "probe: scope-objParamFn", + "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" + }, + "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-paramArrowNamed", + "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" + }, + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[108, 109]] + }, + { + "name": "probe: scope-memberOptsArrow", + "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" + }, + "diagnostics": [], + "classes": { + "D": { + "inputs": "{x:[2,\"x\",\"x\",(v)=>v.length]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: scope-this", + "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" + }, + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[119, 125]] + }, + { + "name": "probe: scope-arguments", + "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" + }, + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[111, 123]] + }, + { + "name": "probe: scope-defaultArrow", + "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" + }, + "diagnostics": [], + "classes": { + "D": { + "inputs": "{x:[2,\"x\",\"x\",(v)=>v.length]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: shorthand-constArrow", + "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" }, "diagnostics": [], "classes": { "D": { - "inputs": "{x:[2,\"x\",\"x\",ba]}", - "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: shorthand-constArrowNamedSame", + "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" + }, + "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": [[148, 149]] + }, + { + "name": "probe: shorthand-constFunctionExpression", + "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" + }, + "diagnostics": [], + "classes": { + "D": { + "inputs": "{x:[2,\"x\",\"x\",function(v){returnv.length;}]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: shorthand-letArrow", + "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" + }, + "diagnostics": [], + "classes": { + "D": { + "inputs": "{x:[2,\"x\",\"x\",(v)=>v.length]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: shorthand-constArrowTyped", + "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" + }, + "diagnostics": [], + "classes": { + "D": { + "inputs": "{x:[2,\"x\",\"x\",(v)=>v.length]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: shorthand-constArrowParenthesized", + "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" + }, + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[68, 93]] + }, + { + "name": "probe: shorthand-constArrowAs", + "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" + }, + "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": [[103, 104]] + }, + { + "name": "probe: shorthand-inConstObject", + "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" + }, + "diagnostics": [], + "classes": { + "D": { + "inputs": "{x:[2,\"x\",\"x\",(v)=>v.length]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: shorthand-constArrowUntyped", + "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" + }, + "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": [[68, 82]] + }, + { + "name": "probe: shorthand-objectDestructured", + "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" + }, + "diagnostics": [], + "classes": { + "D": { + "inputs": "{x:[2,\"x\",\"x\",(v)=>v.length]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: shorthand-exportedConstArrow", + "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" + }, + "diagnostics": [], + "classes": { + "D": { + "inputs": "{x:[2,\"x\",\"x\",(v)=>v.length]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: shorthand-varRedeclared", + "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" + }, + "diagnostics": [], + "classes": { + "D": { + "inputs": "{x:[2,\"x\",\"x\",(v)=>v.length]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: shorthand-spreadConstObject", + "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" + }, + "diagnostics": [], + "classes": { + "D": { + "inputs": "{x:[2,\"x\",\"x\",(v)=>v.length]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: shorthand-constArrowUnexportedType", + "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" + }, + "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": [[68, 91]] + }, + { + "name": "probe: shorthand-arrayDestructured", + "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" + }, + "diagnostics": [], + "classes": { + "D": { + "inputs": "{x:[2,\"x\",\"x\",(v)=>v.length]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: shorthand-objectDestructuredNamed", + "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" + }, + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[120, 121]] + }, + { + "name": "probe: shorthand-nestedDestructured", + "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" + }, + "diagnostics": [], + "classes": { + "D": { + "inputs": "{x:[2,\"x\",\"x\",(v)=>v.length]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [], + "diagnosticSpans": [] + }, + { + "name": "probe: shorthand-memberConstArrow", + "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" + }, + "diagnostics": [], + "classes": { + "D": { + "inputs": "{x:[2,\"x\",\"x\",(v)=>v.length]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, "dtsImports": [], - "diagnosticSpans": [] + "diagnosticSpans": [] + }, + { + "name": "probe: shorthand-memberConstArrowNamedSame", + "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" + }, + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[162, 171]] }, { - "name": "probe: scope-bodyArrowSafe", + "name": "probe: shorthand-memberConstArrowNamedOther", "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 } from '@angular/core';\nconst t = (v: string) => v.length;\n@Directive({ selector: '[d]' })\nexport class D { @Input({ transform: t }) x: any; }\n" + }, + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[154, 155]] + }, + { + "name": "probe: shorthand-memberOptionsConst", + "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" }, "diagnostics": [], "classes": { @@ -3551,528 +6387,629 @@ "diagnosticSpans": [] }, { - "name": "probe: initializerApi-inputCoreAlias", + "name": "probe: scope-spreadConstFunction", "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, 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": ["Input \"value\" is also declared as non-signal in @Directive."], + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], "classes": {}, "dtsImports": [], - "diagnosticSpans": [[125, 139]] + "diagnosticSpans": [[173, 174]] }, { - "name": "probe: initializerApi-inputRequiredCoreNamespace", + "name": "probe: scope-spreadFunction", "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, 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" }, - "diagnostics": ["Input \"value\" is also declared as non-signal in @Directive."], + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], "classes": {}, "dtsImports": [], - "diagnosticSpans": [[150, 180]] + "diagnosticSpans": [[123, 124]] }, { - "name": "probe: initializerApi-modelCoreOutputsMeta", + "name": "probe: scope-restFunction", "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, 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": [], - "classes": { - "D": { - "inputs": "{value:[1,\"value\"]}", - "outputs": "{valueChange:\"valueChange\",value:\"valueChange\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "classes": {}, + "dtsImports": [], + "diagnosticSpans": [[120, 124]] + }, + { + "name": "probe: scope-restAfterParamFunction", + "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" }, + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "classes": {}, "dtsImports": [], - "diagnosticSpans": [] + "diagnosticSpans": [[129, 134]] }, { - "name": "probe: initializerApi-modelCoreAlias", + "name": "probe: scope-spreadRestThroughFunction", "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, 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": ["Input \"value\" is also declared as non-signal in @Directive."], + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], "classes": {}, "dtsImports": [], - "diagnosticSpans": [[123, 135]] + "diagnosticSpans": [[123, 124]] }, { - "name": "probe: initializerApi-inputAsCast", + "name": "probe: scope-functionAfterSpread", "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, 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": ["Input \"value\" is also declared as non-signal in @Directive."], + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], "classes": {}, "dtsImports": [], - "diagnosticSpans": [[118, 143]] + "diagnosticSpans": [[123, 124]] }, { - "name": "probe: initializerApi-inputTypeOnlyImportCast", + "name": "probe: transform-global-atob", "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} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: atob}) x: any;\n}\n" }, "diagnostics": [], + "diagnosticSpans": [], "classes": { - "D": { - "inputs": "{value:\"value\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "Dir": { + "inputs": "{x:[2,\"x\",\"x\",atob]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, - "dtsImports": [], - "diagnosticSpans": [] + "dtsImports": [] }, { - "name": "probe: initializerApi-outputOtherModule", + "name": "probe: transform-global-btoa", "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} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: btoa}) x: any;\n}\n" }, "diagnostics": [], + "diagnosticSpans": [], "classes": { - "D": { - "outputs": "{changed:\"changed\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "Dir": { + "inputs": "{x:[2,\"x\",\"x\",btoa]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, - "dtsImports": [], - "diagnosticSpans": [] + "dtsImports": [] }, { - "name": "probe: initializerApi-outputFromObservable", + "name": "probe: transform-global-alert", "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} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: alert}) x: any;\n}\n" }, - "diagnostics": ["Output \"changed\" is unexpectedly declared in @Directive as well."], + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{x:[2,\"x\",\"x\",alert]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: transform-global-globalThis", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: globalThis}) x: any;\n}\n" + }, + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "diagnosticSpans": [[118, 128]], "classes": {}, - "dtsImports": [], - "diagnosticSpans": [[213, 265]] + "dtsImports": [] }, { - "name": "probe: initializerApi-outputFromObservableOtherModule", + "name": "probe: transform-global-undefined", "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} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: undefined}) x: any;\n}\n" + }, + "diagnostics": ["Input transform must be a function Value is of type 'undefined'."], + "diagnosticSpans": [[106, 128]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: transform-global-inputsAtob", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: [{name: 'x', transform: atob}]})\nexport class Dir {\n x: any;\n}\n" }, "diagnostics": [], + "diagnosticSpans": [], "classes": { - "D": { - "outputs": "{changed:\"changed\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "Dir": { + "inputs": "{x:[2,\"x\",\"x\",atob]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, - "dtsImports": [], - "diagnosticSpans": [] + "dtsImports": [] }, { - "name": "probe: initializerApi-outputFromObservableNamespace", + "name": "probe: transform-global-projectFunction", "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} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: ambientFn}) x: any;\n}\n", + "globals.d.ts": "declare function ambientFn(v: string): number;\ndeclare var ambientVar: string;\ndeclare function ambientOverload(v: string): number;\ndeclare function ambientOverload(v: number): number;\ndeclare function ambientGeneric(v: T): T;\ndeclare namespace AmbNs { function f(v: string): number; }\n" }, - "diagnostics": ["Output \"changed\" is unexpectedly declared in @Directive as well."], + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{x:[2,\"x\",\"x\",ambientFn]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: transform-global-projectNamespaceMember", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: AmbNs.f}) x: any;\n}\n", + "globals.d.ts": "declare function ambientFn(v: string): number;\ndeclare var ambientVar: string;\ndeclare function ambientOverload(v: string): number;\ndeclare function ambientOverload(v: number): number;\ndeclare function ambientGeneric(v: T): T;\ndeclare namespace AmbNs { function f(v: string): number; }\n" + }, + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "diagnosticSpans": [[118, 125]], "classes": {}, - "dtsImports": [], - "diagnosticSpans": [[196, 251]] + "dtsImports": [] }, { - "name": "probe: initializerApi-outputFromObservableOnCoreNamespace", + "name": "probe: transform-global-declareGlobalFunction", "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, Input} from '@angular/core';\ndeclare global { function gg(v: string): number; }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: gg}) x: any;\n}\n" }, "diagnostics": [], + "diagnosticSpans": [], "classes": { - "D": { - "outputs": "{changed:\"changed\"}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + "Dir": { + "inputs": "{x:[2,\"x\",\"x\",gg]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: transform-global-aliasWindow", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({alias: window as any}) x: any;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{x:\"x\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" + } + }, + "dtsImports": [] + }, + { + "name": "probe: transform-global-aliasUndeclared", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({alias: undeclaredName}) x: any;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{x:\"x\"}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" } }, + "dtsImports": [] + }, + { + "name": "probe: transform-global-Intl", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: Intl}) x: any;\n}\n" + }, + "diagnostics": ["Input transform must be a function Value is a reference to 'Intl'."], + "classes": {}, "dtsImports": [], - "diagnosticSpans": [] + "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: initializerApi-outputCoreAlias", + "name": "probe: transform-global-Reflect", "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} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: Reflect}) x: any;\n}\n" }, - "diagnostics": ["Output \"changed\" is unexpectedly declared in @Directive as well."], + "diagnostics": ["Input transform must be a function Value is a reference to 'Reflect'."], "classes": {}, "dtsImports": [], - "diagnosticSpans": [[129, 145]] + "skip": "ngtsc reports this at the transform's declaration in TypeScript's lib.es2015.reflect.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: initializerApi-outputCoreNamespace", + "name": "probe: transform-global-clashAtob", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n static ngAcceptInputType_x: string;\n @Input({transform: atob}) x: any;\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.dom.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-global-window", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: window}) x: any;\n}\n" + }, + "diagnostics": ["Input transform must be a function Value is a reference to 'window'."], + "classes": {}, + "dtsImports": [], + "skip": "a global declared outside this file (TypeScript's DOM lib), which oxc doesn't read: oxc assumes it's a function and accepts it, as it does an imported transform (only the `ngAcceptInputType_` clash is checked), where ngtsc reads the declaration and reports this" + }, + { + "name": "probe: transform-global-document", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: document}) x: any;\n}\n" + }, + "diagnostics": ["Input transform must be a function Value is a reference to 'document'."], + "classes": {}, + "dtsImports": [], + "skip": "a global declared outside this file (TypeScript's DOM lib), which oxc doesn't read: oxc assumes it's a function and accepts it, as it does an imported transform (only the `ngAcceptInputType_` clash is checked), where ngtsc reads the declaration and reports this" + }, + { + "name": "probe: transform-global-navigator", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: navigator}) x: any;\n}\n" + }, + "diagnostics": ["Input transform must be a function Value is a reference to 'navigator'."], + "classes": {}, + "dtsImports": [], + "skip": "a global declared outside this file (TypeScript's DOM lib), which oxc doesn't read: oxc assumes it's a function and accepts it, as it does an imported transform (only the `ngAcceptInputType_` clash is checked), where ngtsc reads the declaration and reports this" + }, + { + "name": "probe: transform-global-localStorage", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: localStorage}) x: any;\n}\n" + }, + "diagnostics": ["Input transform must be a function Value is a reference to 'localStorage'."], + "classes": {}, + "dtsImports": [], + "skip": "a global declared outside this file (TypeScript's DOM lib), which oxc doesn't read: oxc assumes it's a function and accepts it, as it does an imported transform (only the `ngAcceptInputType_` clash is checked), where ngtsc reads the declaration and reports this" + }, + { + "name": "probe: transform-global-console", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: console}) x: any;\n}\n" + }, + "diagnostics": ["Input transform must be a function Value is a reference to 'console'."], + "classes": {}, + "dtsImports": [], + "skip": "a global declared outside this file (TypeScript's DOM lib), which oxc doesn't read: oxc assumes it's a function and accepts it, as it does an imported transform (only the `ngAcceptInputType_` clash is checked), where ngtsc reads the declaration and reports this" + }, + { + "name": "probe: transform-global-self", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: self}) x: any;\n}\n" + }, + "diagnostics": ["Input transform must be a function Value is a reference to 'self'."], + "classes": {}, + "dtsImports": [], + "skip": "a global declared outside this file (TypeScript's DOM lib), which oxc doesn't read: oxc assumes it's a function and accepts it, as it does an imported transform (only the `ngAcceptInputType_` clash is checked), where ngtsc reads the declaration and reports this" + }, + { + "name": "probe: transform-global-CSS", "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, Input} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: CSS}) x: any;\n}\n" }, - "diagnostics": ["Output \"changed\" is unexpectedly declared in @Directive as well."], + "diagnostics": ["Input transform must be a function Value is a reference to 'CSS'."], "classes": {}, "dtsImports": [], - "diagnosticSpans": [[153, 177]] + "skip": "a global declared outside this file (TypeScript's DOM lib), which oxc doesn't read: oxc assumes it's a function and accepts it, as it does an imported transform (only the `ngAcceptInputType_` clash is checked), where ngtsc reads the declaration and reports this" }, { - "name": "probe: initializerApi-outputLocalFunction", + "name": "probe: transform-global-WebAssembly", "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;" - } + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: WebAssembly}) x: any;\n}\n" }, + "diagnostics": ["Input transform must be a function Value is a reference to 'WebAssembly'."], + "classes": {}, "dtsImports": [], - "diagnosticSpans": [] + "skip": "a global declared outside this file (TypeScript's DOM lib), which oxc doesn't read: oxc assumes it's a function and accepts it, as it does an imported transform (only the `ngAcceptInputType_` clash is checked), where ngtsc reads the declaration and reports this" }, { - "name": "probe: scope-shadowedByParam", + "name": "probe: transform-global-structuredClone", "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, Input} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: structuredClone}) x: any;\n}\n" }, + "diagnostics": [ + "Input transform function cannot be generic Value is a reference to 'structuredClone'." + ], + "classes": {}, "dtsImports": [], - "diagnosticSpans": [] + "skip": "a global declared outside this file (TypeScript's DOM lib), which oxc doesn't read: oxc assumes it's a function and accepts it, as it does an imported transform (only the `ngAcceptInputType_` clash is checked), where ngtsc reads the declaration and reports this" }, { - "name": "probe: scope-shadowedByConst", + "name": "probe: transform-global-queueMicrotask", "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;" - } + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: queueMicrotask}) x: any;\n}\n" }, + "diagnostics": [ + "Unable to import type VoidFunction. The symbol is not exported from /Users/brooklyn/workspace/github/oxc-angular-compiler/node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts." + ], + "classes": {}, "dtsImports": [], - "diagnosticSpans": [] + "skip": "a global declared outside this file (TypeScript's DOM lib), which oxc doesn't read: oxc assumes it's a function and accepts it, as it does an imported transform (only the `ngAcceptInputType_` clash is checked), where ngtsc reads the declaration and reports this" }, { - "name": "probe: scope-shadowedByFunction", + "name": "probe: transform-global-setTimeout", "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, Input} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: setTimeout}) x: any;\n}\n" }, + "diagnostics": [ + "Unable to import type TimerHandler. The symbol is not exported from /Users/brooklyn/workspace/github/oxc-angular-compiler/node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts." + ], + "classes": {}, "dtsImports": [], - "diagnosticSpans": [] + "skip": "a global declared outside this file (TypeScript's DOM lib), which oxc doesn't read: oxc assumes it's a function and accepts it, as it does an imported transform (only the `ngAcceptInputType_` clash is checked), where ngtsc reads the declaration and reports this" }, { - "name": "probe: scope-shadowedByLoopAndCatch", + "name": "probe: transform-global-fetch", "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, Input} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: fetch}) x: any;\n}\n" }, + "diagnostics": [ + "Unable to import type RequestInfo. The symbol is not exported from /Users/brooklyn/workspace/github/oxc-angular-compiler/node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts." + ], + "classes": {}, "dtsImports": [], - "diagnosticSpans": [] + "skip": "a global declared outside this file (TypeScript's DOM lib), which oxc doesn't read: oxc assumes it's a function and accepts it, as it does an imported transform (only the `ngAcceptInputType_` clash is checked), where ngtsc reads the declaration and reports this" }, { - "name": "probe: scope-shadowedInNestedArrow", + "name": "probe: transform-global-projectVar", "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;" - } + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: ambientVar}) x: any;\n}\n", + "globals.d.ts": "declare function ambientFn(v: string): number;\ndeclare var ambientVar: string;\ndeclare function ambientOverload(v: string): number;\ndeclare function ambientOverload(v: number): number;\ndeclare function ambientGeneric(v: T): T;\ndeclare namespace AmbNs { function f(v: string): number; }\n" }, + "diagnostics": ["Input transform must be a function Value is a reference to 'ambientVar'."], + "classes": {}, "dtsImports": [], - "diagnosticSpans": [] + "skip": "a global declared outside this file (a project `.d.ts`), which oxc doesn't read: oxc assumes it's a function and accepts it, as it does an imported transform (only the `ngAcceptInputType_` clash is checked), where ngtsc reads the declaration and reports this" }, { - "name": "probe: scope-shadowedByClass", + "name": "probe: transform-global-projectOverload", "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;" - } + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: ambientOverload}) x: any;\n}\n", + "globals.d.ts": "declare function ambientFn(v: string): number;\ndeclare var ambientVar: string;\ndeclare function ambientOverload(v: string): number;\ndeclare function ambientOverload(v: number): number;\ndeclare function ambientGeneric(v: T): T;\ndeclare namespace AmbNs { function f(v: string): number; }\n" }, + "diagnostics": [ + "Input transform function cannot have multiple signatures Value is a reference to 'ambientOverload'." + ], + "classes": {}, "dtsImports": [], - "diagnosticSpans": [] + "skip": "a global declared outside this file (a project `.d.ts`), which oxc doesn't read: oxc assumes it's a function and accepts it, as it does an imported transform (only the `ngAcceptInputType_` clash is checked), where ngtsc reads the declaration and reports this" }, { - "name": "probe: scope-ownArguments", + "name": "probe: transform-global-projectGeneric", "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;" - } + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: ambientGeneric}) x: any;\n}\n", + "globals.d.ts": "declare function ambientFn(v: string): number;\ndeclare var ambientVar: string;\ndeclare function ambientOverload(v: string): number;\ndeclare function ambientOverload(v: number): number;\ndeclare function ambientGeneric(v: T): T;\ndeclare namespace AmbNs { function f(v: string): number; }\n" }, + "diagnostics": [ + "Input transform function cannot be generic Value is a reference to 'ambientGeneric'." + ], + "classes": {}, "dtsImports": [], - "diagnosticSpans": [] + "skip": "a global declared outside this file (a project `.d.ts`), which oxc doesn't read: oxc assumes it's a function and accepts it, as it does an imported transform (only the `ngAcceptInputType_` clash is checked), where ngtsc reads the declaration and reports this" }, { - "name": "probe: scope-ownThis", + "name": "probe: transform-global-inputsWindow", "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;" - } + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: [{name: 'x', transform: window}]})\nexport class Dir {\n x: any;\n}\n" }, + "diagnostics": ["Input transform must be a function Value is a reference to 'window'."], + "classes": {}, "dtsImports": [], - "diagnosticSpans": [] + "skip": "a global declared outside this file (TypeScript's DOM lib), which oxc doesn't read: oxc assumes it's a function and accepts it, as it does an imported transform (only the `ngAcceptInputType_` clash is checked), where ngtsc reads the declaration and reports this" }, { - "name": "probe: scope-hoistedVar", + "name": "probe: transform-global-declareGlobalVar", "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;" - } + "test.ts": "import {Directive, Input} from '@angular/core';\ndeclare global { var gv: string; }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: gv}) x: any;\n}\n" }, + "diagnostics": ["Input transform must be a function Value is of type 'undefined'."], + "classes": {}, "dtsImports": [], - "diagnosticSpans": [] + "skip": "a global declared outside this file (this file's `declare global`, whose names oxc doesn't track), which oxc doesn't read: oxc assumes it's a function and accepts it, as it does an imported transform (only the `ngAcceptInputType_` clash is checked), where ngtsc reads the declaration and reports this" }, { - "name": "probe: scope-shadowedByClassName", + "name": "probe: transform-global-namespaceMember", "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;" - } + "test.ts": "import {Directive, Input} from '@angular/core';\nnamespace U { export function f(v: string) { return 1; } }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: U.f}) x: any;\n}\n" }, - "dtsImports": [], - "diagnosticSpans": [] + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "diagnosticSpans": [[177, 180]], + "classes": {}, + "dtsImports": [] }, { - "name": "probe: scope-shadowedByDestructuredParam", + "name": "probe: transform-global-declareModule", "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" + "test.ts": "import {Directive, Input} from '@angular/core';\ndeclare module M { }\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: M}) x: any;\n}\n" }, - "diagnostics": [], - "classes": { - "D": { - "inputs": "{x:[2,\"x\",\"x\",({value})=>value]}", - "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;" - } - }, - "dtsImports": [], - "diagnosticSpans": [] + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "diagnosticSpans": [[139, 140]], + "classes": {}, + "dtsImports": [] }, { - "name": "probe: scope-spreadConstArgs", + "name": "probe: transform-global-undeclared", "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;" - } + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: undeclaredName}) x: any;\n}\n" }, + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "classes": {}, "dtsImports": [], - "diagnosticSpans": [] + "skip": "a name declared nowhere, which TypeScript reports: oxc can't tell it from a global declared outside the file, so it assumes it's a function and accepts it, where ngtsc reports this" }, { - "name": "probe: scope-restParam", + "name": "probe: transform-global-inputsUndeclared", "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;" - } + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]', inputs: [{name: 'x', transform: undeclaredName}]})\nexport class Dir {\n x: any;\n}\n" }, + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "classes": {}, "dtsImports": [], - "diagnosticSpans": [] + "skip": "a name declared nowhere, which TypeScript reports: oxc can't tell it from a global declared outside the file, so it assumes it's a function and accepts it, where ngtsc reports this" }, { - "name": "probe: scope-restAfterParam", + "name": "probe: transform-global-member-window_atob", "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;" - } + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: window.atob}) x: any;\n}\n" }, - "dtsImports": [], - "diagnosticSpans": [] + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "diagnosticSpans": [[118, 129]], + "classes": {}, + "dtsImports": [] }, { - "name": "probe: scope-spreadArrayLiteral", + "name": "probe: transform-global-member-document_createElement", "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;" - } + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: document.createElement}) x: any;\n}\n" }, - "dtsImports": [], - "diagnosticSpans": [] + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "diagnosticSpans": [[118, 140]], + "classes": {}, + "dtsImports": [] }, { - "name": "probe: scope-spreadAfterArg", + "name": "probe: transform-global-member-globalThis_atob", "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;" - } + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: globalThis.atob}) x: any;\n}\n" }, - "dtsImports": [], - "diagnosticSpans": [] + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "diagnosticSpans": [[118, 133]], + "classes": {}, + "dtsImports": [] }, { - "name": "probe: scope-spreadRestThrough", + "name": "probe: transform-global-member-self_atob", "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;" - } + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: self.atob}) x: any;\n}\n" }, - "dtsImports": [], - "diagnosticSpans": [] + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "diagnosticSpans": [[118, 127]], + "classes": {}, + "dtsImports": [] }, { - "name": "probe: scope-restLocalFunction", + "name": "probe: transform-global-member-console_log", "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;" - } + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: console.log}) x: any;\n}\n" }, - "dtsImports": [], - "diagnosticSpans": [] + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "diagnosticSpans": [[118, 129]], + "classes": {}, + "dtsImports": [] }, { - "name": "probe: scope-spreadBeforeArgs", + "name": "probe: transform-global-member-undeclaredName_foo", "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;" - } + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: undeclaredName.foo}) x: any;\n}\n" }, - "dtsImports": [], - "diagnosticSpans": [] + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "diagnosticSpans": [[118, 136]], + "classes": {}, + "dtsImports": [] }, { - "name": "probe: scope-restSpreadImport", + "name": "probe: transform-global-member-localStorage_getItem", "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;" - } + "test.ts": "import {Directive, Input} from '@angular/core';\n@Directive({selector: '[d]'})\nexport class Dir {\n @Input({transform: localStorage.getItem}) x: any;\n}\n" }, - "dtsImports": [], - "diagnosticSpans": [] + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "diagnosticSpans": [[118, 138]], + "classes": {}, + "dtsImports": [] }, { "name": "probe: shortCircuit-metaOr", @@ -5751,6 +8688,310 @@ } }, "dtsImports": [] + }, + { + "name": "probe: r6-ns-fn-transform-plain", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, ContentChild, ViewChild} from '@angular/core';\nnamespace NS { export function fn(v: string) { return 1; } }\n@Directive({selector: '[d]', inputs: [{name: 'a', transform: NS.fn}]})\nexport class Dir {\n a: any;\n b: any;\n}\n" + }, + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "diagnosticSpans": [[195, 200]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: r6-ns-fn-transform-member", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, ContentChild, ViewChild} from '@angular/core';\nnamespace NS { export function fn(v: string) { return 1; } }\n@Directive({selector: '[d]', })\nexport class Dir {\n @Input({transform: NS.fn}) a: any;\n}\n" + }, + "diagnostics": [ + "Input transform must be a function Value could not be determined statically." + ], + "diagnosticSpans": [[206, 211]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: r6-ns-generic-fn-typeof", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, ContentChild, ViewChild} from '@angular/core';\nnamespace NS { export function fn(v: T) { return 1; } }\ndeclare const T: typeof NS.fn;\n@Directive({selector: '[d]', inputs: [{name: 'a', transform: T}]})\nexport class Dir {\n a: any;\n b: any;\n}\n" + }, + "diagnostics": ["Input transform function cannot be generic Value is a reference to 'fn'."], + "diagnosticSpans": [[88, 129]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: r6-ns-untyped-fn-typeof", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, ContentChild, ViewChild} from '@angular/core';\nnamespace NS { export function fn(v) { return 1; } }\ndeclare const T: typeof NS.fn;\n@Directive({selector: '[d]', inputs: [{name: 'a', transform: T}]})\nexport class Dir {\n a: any;\n b: any;\n}\n" + }, + "diagnostics": [ + "Input transform function first parameter must have a type Value is a reference to 'fn'." + ], + "diagnosticSpans": [[88, 123]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: r6-nsval-member-transform", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, ContentChild, ViewChild} from '@angular/core';\nnamespace U { export function f(v: string) { return 1; } }\n@Directive({selector: '[d]', })\nexport class Dir {\n @Input({transform: U}) x: any;\n}\n" + }, + "diagnostics": ["Input transform must be a function Value is a reference to 'U'."], + "diagnosticSpans": [[73, 131]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: r6-nsval-meta-transform", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, ContentChild, ViewChild} from '@angular/core';\nnamespace U { export function f(v: string) { return 1; } }\n@Directive({selector: '[d]', inputs: [{name: 'x', transform: U}]})\nexport class Dir {\n x: any;\n}\n" + }, + "diagnostics": ["Input transform must be a function Value is a reference to 'U'."], + "diagnosticSpans": [[73, 131]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: r6-nsval-typeof-transform", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, ContentChild, ViewChild} from '@angular/core';\nnamespace U { export function f(v: string) { return 1; } }\ndeclare const X: typeof U;\n@Directive({selector: '[d]', inputs: [{name: 'x', transform: X}]})\nexport class Dir {\n x: any;\n}\n" + }, + "diagnostics": ["Input transform must be a function Value is a reference to 'U'."], + "diagnosticSpans": [[73, 131]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: r6-nsval-exported-transform", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, ContentChild, ViewChild} from '@angular/core';\nexport namespace U { export function f(v: string) { return 1; } }\n@Directive({selector: '[d]', })\nexport class Dir {\n @Input({transform: U}) x: any;\n}\n" + }, + "diagnostics": ["Input transform must be a function Value is a reference to 'U'."], + "diagnosticSpans": [[73, 138]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: r6-nsval-merged-transform", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, ContentChild, ViewChild} from '@angular/core';\nnamespace U { export type T = string; }\nnamespace U { export const a = 1; }\n@Directive({selector: '[d]', })\nexport class Dir {\n @Input({transform: U}) x: any;\n}\n" + }, + "diagnostics": ["Input transform must be a function Value is a reference to 'U'."], + "diagnosticSpans": [[113, 148]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: r6-t494-overload", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, ContentChild, ViewChild} from '@angular/core';\nnamespace NS { export function fn(v: string): number; export function fn(v: any) { return 1; } }\ndeclare const T: typeof NS.fn;\n@Directive({selector: '[d]', inputs: [{name: 'a', transform: T}]})\nexport class Dir {\n a: any;\n b: any;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{a:[2,\"a\",\"a\",fn]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;", + "dts:ngAcceptInputType_a": "staticngAcceptInputType_a:string;" + } + }, + "dtsImports": [], + "skip": "ngtsc emits `fn` for `transform: T` with `declare const T: typeof NS.fn` (a function declared in a namespace), an identifier that isn't in scope, so its output throws a ReferenceError when the module loads; oxc keeps `T`" + }, + { + "name": "probe: r6-t494-static", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, ContentChild, ViewChild} from '@angular/core';\nnamespace NS { export class C { static t(v: string) { return 1; } } }\ndeclare const X: typeof NS.C;\n@Directive({selector: '[d]', inputs: [{name: 'a', transform: X.t}]})\nexport class Dir {\n a: any;\n b: any;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{a:[2,\"a\",\"a\",t]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;", + "dts:ngAcceptInputType_a": "staticngAcceptInputType_a:string;" + } + }, + "dtsImports": [], + "skip": "ngtsc emits `t` for `transform: X.t` (a static method of a class declared in a namespace), an identifier that isn't in scope, so its output throws a ReferenceError when the module loads; oxc keeps `X.t`" + }, + { + "name": "probe: r6-t494-static-generic", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, ContentChild, ViewChild} from '@angular/core';\nnamespace NS { export class C { static t(v: T) { return 1; } } }\ndeclare const X: typeof NS.C;\n@Directive({selector: '[d]', inputs: [{name: 'a', transform: X.t}]})\nexport class Dir {\n a: any;\n b: any;\n}\n" + }, + "diagnostics": ["Input transform function cannot be generic Value is a reference to 't'."], + "diagnosticSpans": [[105, 136]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: r6-t494-local-type", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, ContentChild, ViewChild} from '@angular/core';\nnamespace NS { type T = string; export function fn(v: T) { return 1; } }\ndeclare const F: typeof NS.fn;\n@Directive({selector: '[d]', inputs: [{name: 'a', transform: F}]})\nexport class Dir {\n a: any;\n b: any;\n}\n" + }, + "diagnostics": [ + "Symbol must be exported in order to be used as the type of an Input transform function" + ], + "diagnosticSpans": [[127, 128]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: r6-t494-exported-type", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, ContentChild, ViewChild} from '@angular/core';\nnamespace NS { export type T = string; export function fn(v: T) { return 1; } }\ndeclare const F: typeof NS.fn;\n@Directive({selector: '[d]', inputs: [{name: 'a', transform: F}]})\nexport class Dir {\n a: any;\n b: any;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{a:[2,\"a\",\"a\",fn]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;", + "dts:ngAcceptInputType_a": "staticngAcceptInputType_a:T;" + } + }, + "dtsImports": [], + "skip": "ngtsc emits `fn` for `transform: T` with `declare const T: typeof NS.fn` (a function declared in a namespace), an identifier that isn't in scope, so its output throws a ReferenceError when the module loads; oxc keeps `T`" + }, + { + "name": "probe: r6-t494-namespace-member-clash", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, ContentChild, ViewChild} from '@angular/core';\nnamespace U { export function f(v: string) { return 1; } }\n@Directive({selector: '[d]', inputs: [{name: 'a', transform: U}]})\nexport class Dir {\n a: any;\n static ngAcceptInputType_a: any;\n}\n" + }, + "diagnostics": ["Input transform must be a function Value is a reference to 'U'."], + "diagnosticSpans": [[73, 131]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: r6-t494-alias-generic", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, ContentChild, ViewChild} from '@angular/core';\nnamespace U { export function f(v: T) { return 1; } }\nimport f = U.f;\n@Directive({selector: '[d]', })\nexport class Dir {\n @Input({transform: f}) x: any;\n}\n" + }, + "diagnostics": ["Input transform function cannot be generic Value is a reference to 'f'."], + "diagnosticSpans": [[87, 127]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: r6-t494-nested-namespace-transform", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, ContentChild, ViewChild} from '@angular/core';\nnamespace U { export namespace V { export const a = 1; } }\ndeclare const X: typeof U.V;\n@Directive({selector: '[d]', inputs: [{name: 'a', transform: X}]})\nexport class Dir {\n a: any;\n b: any;\n}\n" + }, + "diagnostics": ["Input transform must be a function Value is a reference to 'V'."], + "diagnosticSpans": [[87, 129]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: r6-t494-ambient-type", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, ContentChild, ViewChild} from '@angular/core';\ndeclare namespace NS { type T = string; function fn(v: T): number; }\ndeclare const F: typeof NS.fn;\n@Directive({selector: '[d]', inputs: [{name: 'a', transform: F}]})\nexport class Dir {\n a: any;\n b: any;\n}\n" + }, + "diagnostics": [ + "Symbol must be exported in order to be used as the type of an Input transform function" + ], + "diagnosticSpans": [[128, 129]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: r6-t494-ambient-export-type", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, ContentChild, ViewChild} from '@angular/core';\ndeclare namespace NS { export type T = string; function fn(v: T): number; }\ndeclare const F: typeof NS.fn;\n@Directive({selector: '[d]', inputs: [{name: 'a', transform: F}]})\nexport class Dir {\n a: any;\n b: any;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{a:[2,\"a\",\"a\",fn]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;", + "dts:ngAcceptInputType_a": "staticngAcceptInputType_a:T;" + } + }, + "dtsImports": [], + "skip": "ngtsc emits `fn` for `transform: T` with `declare const T: typeof NS.fn` (a function declared in a namespace), an identifier that isn't in scope, so its output throws a ReferenceError when the module loads; oxc keeps `T`" + }, + { + "name": "probe: r6-t494-merged-type", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, ContentChild, ViewChild} from '@angular/core';\nnamespace NS { export type T = string; }\nnamespace NS { export function fn(v: T) { return 1; } }\ndeclare const F: typeof NS.fn;\n@Directive({selector: '[d]', inputs: [{name: 'a', transform: F}]})\nexport class Dir {\n a: any;\n b: any;\n}\n" + }, + "diagnostics": [], + "diagnosticSpans": [], + "classes": { + "Dir": { + "inputs": "{a:[2,\"a\",\"a\",fn]}", + "dts:ɵdir": "staticɵdir:i0.ɵɵDirectiveDeclaration;", + "dts:ngAcceptInputType_a": "staticngAcceptInputType_a:T;" + } + }, + "dtsImports": [], + "skip": "ngtsc emits `fn` for `transform: T` with `declare const T: typeof NS.fn` (a function declared in a namespace), an identifier that isn't in scope, so its output throws a ReferenceError when the module loads; oxc keeps `T`" + }, + { + "name": "probe: r6-t494-outer-type", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, ContentChild, ViewChild} from '@angular/core';\ntype T = string;\nnamespace NS { export function fn(v: T) { return 1; } }\ndeclare const F: typeof NS.fn;\n@Directive({selector: '[d]', inputs: [{name: 'a', transform: F}]})\nexport class Dir {\n a: any;\n b: any;\n}\n" + }, + "diagnostics": [ + "Symbol must be exported in order to be used as the type of an Input transform function" + ], + "diagnosticSpans": [[127, 128]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: r6-t494-local-class-type", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, ContentChild, ViewChild} from '@angular/core';\nnamespace NS { class K {} export function fn(v: K) { return 1; } }\ndeclare const F: typeof NS.fn;\n@Directive({selector: '[d]', inputs: [{name: 'a', transform: F}]})\nexport class Dir {\n a: any;\n b: any;\n}\n" + }, + "diagnostics": [ + "Symbol must be exported in order to be used as the type of an Input transform function" + ], + "diagnosticSpans": [[121, 122]], + "classes": {}, + "dtsImports": [] + }, + { + "name": "probe: r6-t494-arrow-local-type", + "origin": "probe", + "files": { + "test.ts": "import {Directive, Input, ContentChild, ViewChild} from '@angular/core';\nnamespace NS { interface I { a: 1 } export const INPUTS = [{name: 'a', transform: (v: I) => 1}]; }\ndeclare const X: typeof NS.INPUTS;\n@Directive({selector: '[d]', inputs: X})\nexport class Dir {\n a: any;\n b: any;\n}\n" + }, + "diagnostics": [ + "Symbol must be exported in order to be used as the type of an Input transform function" + ], + "diagnosticSpans": [[159, 160]], + "classes": {}, + "dtsImports": [] } ] }