GoogleFeud / ts-runtime-checks

A typescript transformer that automatically generates validation code from your types.
https://googlefeud.github.io/ts-runtime-checks/
MIT License
312 stars 7 forks source link

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

Closed samchon closed 1 year ago

samchon commented 1 year ago

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'.
GoogleFeud commented 1 year ago

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

Hope this helps!

samchon commented 1 year ago

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

It should be fixed for users.

GoogleFeud commented 1 year ago

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.