microsoft / dtslint

A utility built on TSLint for linting TypeScript declaration (.d.ts) files.
MIT License
925 stars 86 forks source link

How to use the raw type assertion capabilities in a native TS library? #63

Open pelotom opened 7 years ago

pelotom commented 7 years ago

Hi, this library looks useful to me, but I'm writing a native typescript library and I want to check that the inferred return types for various function calls are what I expect them to be. Is there a way to run this checker without the assumption that I'm checking a .d.ts file? I previously tried typings-checker, but I ran into a problem that the maintainer was at a loss to fix.

ghost commented 7 years ago

Hi, check out https://github.com/andy-ms/dtslint-ts-user . The issue you linked to will probably still happen though, since it looks like a bug in TypeScript itself. Let me know if you get a good repro for it.