You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Builtin Intl doesn't register as a built-in type properly.
Reproduction
Run
newIntl.Locale();
Then you can see the log like this though the type BCP47LanguageTag is string.
DEBUG Analyzer.find_type('BCP47LanguageTag#0')
at crates/stc_ts_file_analyzer/src/analyzer/scope/mod.rs:1831
in Scope::find_type with name: BCP47LanguageTag#0
in find_local_type
in find_type with name: BCP47LanguageTag#0
in Expander.expand_ref
in Expander.expand_type
in expand
in normalize with ty: BCP47LanguageTag;
in normalize with ty: BCP47LanguageTag;
in normalize with ty: (BCP47LanguageTag | Locale);
in assign with lhs: "(BCP47LanguageTag | Locale);", rhs: "void;"
in check_call_args
in select_and_invoke
in call_property
in extract_call_new_expr_member
in Stmt with line_col: "(1:1-1:19)"
DEBUG Analyzer.find_type('BCP47LanguageTag#0')
at crates/stc_ts_file_analyzer/src/analyzer/scope/mod.rs:1831
in Scope::find_type with name: BCP47LanguageTag#0
in Scope::find_type with name: BCP47LanguageTag#0
in find_local_type
in find_type with name: BCP47LanguageTag#0
in Expander.expand_ref
in Expander.expand_type
in expand
in normalize with ty: BCP47LanguageTag;
in normalize with ty: BCP47LanguageTag;
in normalize with ty: (BCP47LanguageTag | Locale);
in assign with lhs: "(BCP47LanguageTag | Locale);", rhs: "void;"
in check_call_args
in select_and_invoke
in call_property
in extract_call_new_expr_member
in Stmt with line_col: "(1:1-1:19)"
DEBUG Scope.find_type: failed to find type 'BCP47LanguageTag#0'
at crates/stc_ts_file_analyzer/src/analyzer/scope/mod.rs:1205
in find_local_type
in find_type with name: BCP47LanguageTag#0
in Expander.expand_ref
in Expander.expand_type
in expand
in normalize with ty: BCP47LanguageTag;
in normalize with ty: BCP47LanguageTag;
in normalize with ty: (BCP47LanguageTag | Locale);
in assign with lhs: "(BCP47LanguageTag | Locale);", rhs: "void;"
in check_call_args
in select_and_invoke
in call_property
in extract_call_new_expr_member
in Stmt with line_col: "(1:1-1:19)"
ERROR (1) Failed to find type: BCP47LanguageTag#0
at crates/stc_ts_file_analyzer/src/analyzer/scope/mod.rs:2174
in Expander.expand_ref
in Expander.expand_type
in expand
in normalize with ty: BCP47LanguageTag;
in normalize with ty: BCP47LanguageTag;
in normalize with ty: (BCP47LanguageTag | Locale);
in assign with lhs: "(BCP47LanguageTag | Locale);", rhs: "void;"
in check_call_args
in select_and_invoke
in call_property
in extract_call_new_expr_member
in Stmt with line_col: "(1:1-1:19)"
DEBUG [expander (time = 737.708µs)]: BCP47LanguageTag; => any;
at crates/stc_ts_file_analyzer/src/analyzer/scope/mod.rs:2631
in expand
in normalize with ty: BCP47LanguageTag;
in normalize with ty: BCP47LanguageTag;
in normalize with ty: (BCP47LanguageTag | Locale);
in assign with lhs: "(BCP47LanguageTag | Locale);", rhs: "void;"
in check_call_args
in select_and_invoke
in call_property
in extract_call_new_expr_member
in Stmt with line_col: "(1:1-1:19)"
DEBUG [expander] expand: BCP47LanguageTag; => any;
at crates/stc_ts_file_analyzer/src/analyzer/scope/mod.rs:738
in expand
in normalize with ty: BCP47LanguageTag;
in normalize with ty: BCP47LanguageTag;
in normalize with ty: (BCP47LanguageTag | Locale);
in assign with lhs: "(BCP47LanguageTag | Locale);", rhs: "void;"
in check_call_args
in select_and_invoke
in call_property
in extract_call_new_expr_member
in Stmt with line_col: "(1:1-1:19)"
Builtin Intl doesn't register as a built-in type properly.
Reproduction
Run
Then you can see the log like this though the type
BCP47LanguageTag
is string.stc/crates/stc_ts_builtin_types/lib/es2020.intl.d.ts
Line 79 in 08289e7
I guess it is due to the fact that builtin Intl is the only builtin type declared in
namespace
.stc/crates/stc_ts_builtin_types/lib/es2020.intl.d.ts
Line 2 in 08289e7
The text was updated successfully, but these errors were encountered: