File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed
templates/api-v5/shared/ts/src/types Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -235,6 +235,11 @@ async function createChaynsApp({
235235 // copy tsconfig.json
236236 if ( chooseTypescript === YesOrNo . Yes ) {
237237 await copyFile ( getTemplatePath ( `../templates/api-v5/shared/ts/tsconfig.json` ) , path . join ( destination , 'tsconfig.json' ) ) ;
238+
239+ if ( ! fs . existsSync ( path . join ( destination , '/src/types' ) ) ) {
240+ fs . mkdirSync ( path . join ( destination , '/src/types' ) ) ;
241+ }
242+ await copyFile ( getTemplatePath ( `../templates/api-v5/shared/ts/src/types/global.d.ts` ) , path . join ( destination , '/src/types/global.d.ts' ) ) ;
238243 }
239244
240245 const fileDestination = path . join ( destination , 'toolkit.config.js' ) ;
Original file line number Diff line number Diff line change 1+ declare module '*.png' {
2+ const value : string ;
3+ export = value ;
4+ }
5+
6+ declare module '*.png?url' {
7+ const value : string ;
8+ export = value ;
9+ }
10+
11+ declare module '*.svg?url' {
12+ const value : string ;
13+ export = value ;
14+ }
15+
16+ interface ImportMetaEnv {
17+ [ key : string ] : string
18+ }
19+
20+ interface ImportMeta {
21+ readonly env : ImportMetaEnv
22+ }
You can’t perform that action at this time.
0 commit comments