Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Namespace 'ts' has no exported member 'TypeMapper' #35

Closed
samchon opened this issue Sep 1, 2023 · 3 comments
Closed

[BUG] Namespace 'ts' has no exported member 'TypeMapper' #35

samchon opened this issue Sep 1, 2023 · 3 comments

Comments

@samchon
Copy link

samchon commented Sep 1, 2023

The type ts.TypeMapper is @internal tagged type.

Therefore, when install ts-runtime-checks in the user side, it becomes a compiler error like bleow:

node_modules/ts-runtime-checks/dist/gen/validators/genValidator.d.ts:6:16 - error TS2694: Namespace 'ts' has no exported member 'TypeMapper'.
samchon added a commit to samchon/typescript-runtime-type-benchmarks that referenced this issue Sep 1, 2023
There had been major updates of both two libraries. Also, added a special dependency `@types/ts-expose-internals` for a while to avoid domestic bug of `ts-runtime-checks`.

  - GoogleFeud/ts-runtime-checks#35
@GoogleFeud
Copy link
Owner

GoogleFeud commented Sep 1, 2023

This library uses @types/ts-expose-internals in order to use internal types, you can fix this in two ways:

  • Add "@types/ts-expose-internals": "npm:ts-expose-internals@^5.1.5" to your dev dependencies
  • Set the skipLibCheck option in the tsconfig.json file to true

Hope this helps!

@samchon
Copy link
Author

samchon commented Sep 1, 2023

I mean that this bug occured when installing and using ts-runtime-checks.

It should be fixed for users.

@GoogleFeud
Copy link
Owner

The transformer has to use these internal properties/methods in order to function so there isn't much that can be done except using @ts-ignore instead of the package.

Setting skipLibCheck to true is almost always a good idea, anyways.

moltar pushed a commit to moltar/typescript-runtime-type-benchmarks that referenced this issue Sep 1, 2023
There had been major updates of both two libraries. Also, added a special dependency `@types/ts-expose-internals` for a while to avoid domestic bug of `ts-runtime-checks`.

  - GoogleFeud/ts-runtime-checks#35
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

No branches or pull requests

2 participants