Skip to content

fix(concatjs): resolve error with TypeScript 4.7#3420

Merged
alexeagle merged 1 commit intobazel-contrib:stablefrom
crisbeto:ts-4.7-error
Apr 22, 2022
Merged

fix(concatjs): resolve error with TypeScript 4.7#3420
alexeagle merged 1 commit intobazel-contrib:stablefrom
crisbeto:ts-4.7-error

Conversation

@crisbeto
Copy link
Contributor

In TypeScript 4.7 the first argument of resolveTypeReferenceDirectives can be a FileReference[], in addition to a string[]. These changes resolve a runtime error that was happening as result.

In TypeScript 4.7 the first argument of `resolveTypeReferenceDirectives` can be a `FileReference[]`, in addition to a `string[]`. These changes resolve a runtime error that was happening as result.
@crisbeto
Copy link
Contributor Author

I'm not sure why CircleCI timed out here, but I don't have permissions to restart it.

Copy link
Collaborator

@alexeagle alexeagle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!
Feels like we should somehow give the concatjs package back to Angular/Google teams since it's nearly deprecated externally...

@alexeagle alexeagle merged commit 1074231 into bazel-contrib:stable Apr 22, 2022
@devversion
Copy link
Contributor

@alexeagle Yes. This year, I have plans to move the ts library portion at least into the Angular dev-infra repo, w/ some
changes there. Not super concrete yet, but I agree it would make sense to not bother RNJ with that

crisbeto added a commit to crisbeto/angular that referenced this pull request Apr 29, 2022
Adds support for TypeScript 4.7. Changes include:
* Bumping the TS version as well as some Bazel dependencies to include bazel-contrib/rules_nodejs#3420.
* Adding a backwards-compatibility layer for calls to `updateTypeParameterDeclaration`.
* Making `LView` generic in order to make it easier to type the context based on the usage. Currently the context can be 4 different types which coupled with stricter type checking would required a lot of extra casting all over `core`.
* Fixing a bunch of miscellaneous type errors.
* Removing assertions of `ReferenceEntry.isDefinition` in a few of the language service tests. The field isn't returned by TS anymore and we weren't using it for anything.
* Resolving in error in the language service that was caused by TS attempting to parse HTML files when we try to open them. Previous TS was silently setting them as `ScriptKind.Unknown` and ignoring the errors, but now it throws. I've worked around it by setting them as `ScriptKind.JSX`.
dylhunn pushed a commit to angular/angular that referenced this pull request Apr 29, 2022
Adds support for TypeScript 4.7. Changes include:
* Bumping the TS version as well as some Bazel dependencies to include bazel-contrib/rules_nodejs#3420.
* Adding a backwards-compatibility layer for calls to `updateTypeParameterDeclaration`.
* Making `LView` generic in order to make it easier to type the context based on the usage. Currently the context can be 4 different types which coupled with stricter type checking would required a lot of extra casting all over `core`.
* Fixing a bunch of miscellaneous type errors.
* Removing assertions of `ReferenceEntry.isDefinition` in a few of the language service tests. The field isn't returned by TS anymore and we weren't using it for anything.
* Resolving in error in the language service that was caused by TS attempting to parse HTML files when we try to open them. Previous TS was silently setting them as `ScriptKind.Unknown` and ignoring the errors, but now it throws. I've worked around it by setting them as `ScriptKind.JSX`.

PR Close #45749
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants