feat(tsd-test-setup): add & setup dtslint#11879
feat(tsd-test-setup): add & setup dtslint#11879sushantdhiman merged 5 commits intosequelize:masterfrom
Conversation
|
@papb Here we go. dtslint allows us to write assertions for typescript declaration files like so: // User.ts
class User extends Model {
name!: string;
age!: number;
}// some-test.ts
// $ExpectType User
User.create({name: 'Marty'});
// $ExpectError
User.create({firstName: 'Marty'});What do you think? If we're fine with it we also should add some hints how to use it in CONTRIBUTING.md. Do we have any rules how to handle type script typings in the contribution guidelines? Couldn't find any. |
|
|
Codecov Report
@@ Coverage Diff @@
## master #11879 +/- ##
=======================================
Coverage 96.24% 96.24%
=======================================
Files 95 95
Lines 9215 9215
=======================================
Hits 8869 8869
Misses 346 346Continue to review full report at Codecov.
|
|
/cc @papb / @SimonSchick |
|
I think, there is nothing I can do to fix this? |
Pull Request check-list
Please make sure to review and check all of these items:
npm run testornpm run test-DIALECTpass with this change (including linting)?Description of change
This PR adds and prepares
dtslintin order to have better testing suite for testing typescript declarations. See #11829 for details.solves #11829