Skip to content

Commit

Permalink
QZ-721 Enable noUncheckedIndexedAccess tsc flag (#112)
Browse files Browse the repository at this point in the history
* QZ-721 Enable noUncheckedIndexedAccess tsc flag

* Add TypeScript types

Co-authored-by: GitHub Action <[email protected]>
  • Loading branch information
itjhai-qz and actions-user authored Feb 24, 2022
1 parent 52aea2b commit f8a4024
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 12 deletions.
8 changes: 4 additions & 4 deletions dist/Button/Button.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/ResponsiveImage/ResponsiveImage.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/ResponsiveImage/ResponsiveImage.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@
"sass-loader": "^10.1.0",
"style-loader": "^2.0.0",
"stylelint": "^13.6.1",
"typescript": "^4.0.3"
"typescript": "^4.5.5"
}
}
2 changes: 1 addition & 1 deletion src/components/ResponsiveImage/ResponsiveImage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export default function ResponsiveImage( props: {
* For fixed-dimension images, pass the same value for the minimum
* and maximum values, e.g. `[ 100, 100 ]`.
*/
widthRange: Array<number>;
widthRange: [number, number];
} ) {
const {
alt,
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"outDir": "dist",
"resolveJsonModule": true,
"sourceMap": true,
"strictNullChecks": true
"strictNullChecks": true,
"noUncheckedIndexedAccess": true
},
"include": [
"src/components/**/*"
Expand Down

0 comments on commit f8a4024

Please sign in to comment.