grunt-ts icon indicating copy to clipboard operation
grunt-ts copied to clipboard

Support checking typescript code implements a declaration file

Open iislucas opened this issue 10 years ago • 3 comments

Would be great for grunt-ts to have a way to check a declaration file has the same structure as a generated .d.ts file to make sure that the declaration file is indeed a declaration for the implementation.

See discussion here: https://github.com/Microsoft/TypeScript/issues/205#issuecomment-50395901

iislucas avatar Jul 28 '14 20:07 iislucas

Rewording as per my understanding:

check an existing declaration file has the same structure as a generated .d.ts file to make sure it hasn't changed.

Wouldn't a git diff do that for you if you add the generated.d.ts to source control?

basarat avatar Jul 29 '14 01:07 basarat

Not for me, I like to add comments and explanations to the .d.ts file that are interface specific, not implementation specific. (and sometimes have a more abstract interface in the .d.ts file; but I could perhaps live without that)

iislucas avatar Jul 29 '14 17:07 iislucas

I like to add comments and explanations to the .d.ts file that are interface specific, not implementation specific.

Got it :+1:

basarat avatar Jul 30 '14 00:07 basarat