-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add basic typescript support with snowpack plugin
- Loading branch information
Showing
7 changed files
with
108 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,5 +38,6 @@ module.exports = { | |
}, | ||
}, | ||
], | ||
"@snowpack/plugin-typescript", | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"$schema": "http://json.schemastore.org/tsconfig", | ||
"compilerOptions": { | ||
"allowJs": true, | ||
"alwaysStrict": true, | ||
"allowSyntheticDefaultImports": true, | ||
// "composite": true, | ||
// "declaration": true, | ||
// "declarationMap": true, | ||
// "emitDeclarationOnly": true, | ||
"experimentalDecorators": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"importsNotUsedAsValues": "error", | ||
// "incremental": true, | ||
"module": "ESNext", | ||
"moduleResolution": "node", | ||
"noEmit": true, | ||
"noEmitOnError": false, | ||
"noFallthroughCasesInSwitch": true, | ||
"noImplicitAny": true, | ||
"noImplicitReturns": true, | ||
"noImplicitThis": true, | ||
"pretty": true, | ||
"resolveJsonModule": true, | ||
"skipLibCheck": true, | ||
"strict": true, | ||
"target": "ESNext", | ||
"types": [], | ||
"useDefineForClassFields": true | ||
}, | ||
"include": ["src", "types"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/* Use this file to declare any custom file extensions for importing */ | ||
/* Use this folder to also add/extend a package d.ts file, if needed. */ | ||
|
||
declare module "*.module.css" { | ||
const classes: { [key: string]: string }; | ||
export default classes; | ||
} | ||
declare module "*.module.scss" { | ||
const classes: { [key: string]: string }; | ||
export default classes; | ||
} | ||
declare module "*.module.sass" { | ||
const classes: { [key: string]: string }; | ||
export default classes; | ||
} | ||
declare module "*.module.less" { | ||
const classes: { [key: string]: string }; | ||
export default classes; | ||
} | ||
declare module "*.module.styl" { | ||
const classes: { [key: string]: string }; | ||
export default classes; | ||
} | ||
|
||
declare module "*.css"; | ||
declare module "*.scss"; | ||
declare module "*.sass"; | ||
declare module "*.less"; | ||
declare module "*.styl"; | ||
|
||
declare module "*.svg" { | ||
const ref: string; | ||
export default ref; | ||
} | ||
declare module "*.bmp" { | ||
const ref: string; | ||
export default ref; | ||
} | ||
declare module "*.gif" { | ||
const ref: string; | ||
export default ref; | ||
} | ||
declare module "*.jpg" { | ||
const ref: string; | ||
export default ref; | ||
} | ||
declare module "*.jpeg" { | ||
const ref: string; | ||
export default ref; | ||
} | ||
declare module "*.png" { | ||
const ref: string; | ||
export default ref; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters