Skip to content

Commit

Permalink
Merge pull request #267 from 10up/feature/setup-repository-for-typesc…
Browse files Browse the repository at this point in the history
…ript

Introduce TypeScript to Repository
  • Loading branch information
fabiankaegy authored Sep 26, 2023
2 parents d459a02 + a9b1976 commit eec43fa
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"description": "10up Components built for the WordPress Block Editor.",
"main": "./dist/index.js",
"source": "index.js",
"types": "./dist/index.d.ts",
"scripts": {
"lint": "10up-toolkit lint-js",
"test": "10up-toolkit test-unit-jest",
Expand Down
43 changes: 43 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"allowSyntheticDefaultImports": true,
"jsx": "preserve",
"target": "esnext",
"module": "esnext",
"lib": [
"dom",
"esnext"
],
"declaration": true,
"declarationMap": true,
"composite": true,
"emitDeclarationOnly": true,
"isolatedModules": true,
/* Strict Type-Checking Options */
"strict": true,
/* Additional Checks */
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
/* Module Resolution Options */
"moduleResolution": "node",
/* This needs to be false so our types are possible to consume without setting this */
"esModuleInterop": false,
"resolveJsonModule": true,
"typeRoots": [
"./node_modules/@types"
],
"types": []
},
"exclude": [
"cypress/**",
"example/**",
"node_modules/**",
"dist/**",
"webpack.config.js",
"cypress.config.js",
]
}

0 comments on commit eec43fa

Please sign in to comment.