-
Notifications
You must be signed in to change notification settings - Fork 7
refactor: stricter return types, tsconfig cleanup #272
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,6 @@ | ||
| { | ||
| "compilerOptions": { | ||
| "declaration": true, | ||
| "downlevelIteration": true, | ||
| "esModuleInterop": true, | ||
| "isolatedDeclarations": true, | ||
| "lib": ["DOM", "ES2020"], | ||
|
|
@@ -10,13 +9,12 @@ | |
| "noEmit": true, | ||
| "outDir": "dist", | ||
| "resolveJsonModule": true, | ||
| "strict": true, | ||
| "target": "ES2020", | ||
|
|
||
| // Allows us to not have to typeguard in catches. | ||
| // https://bobbyhadz.com/blog/typescript-object-is-of-type-unknown | ||
| "useUnknownInCatchVariables": false, | ||
|
|
||
| "strict": true | ||
| "verbatimModuleSyntax": true | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. haven't seen this one before, what's it do?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we should probably enable it everywhere we can. it ensures that type imports use
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh cool |
||
| }, | ||
| "exclude": ["dist/", "./src/fixtures/", "**/*.test.ts"], | ||
| "include": ["./src/**/*"] | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not just type this to
string?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i kinda like when return types explicitly mention a value that's likely to show up, in case a downstream function wants to act on that value accordingly. no strong preferences on this though