-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
feat(tsd-test-setup): add & setup dtslint #11879
feat(tsd-test-setup): add & setup dtslint #11879
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 346 Continue 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 test
ornpm run test-DIALECT
pass with this change (including linting)?Description of change
This PR adds and prepares
dtslint
in order to have better testing suite for testing typescript declarations. See #11829 for details.solves #11829