add typings to generated versions file
This commit is contained in:
Родитель
b1d62590b5
Коммит
13942b01f6
|
@ -28,4 +28,5 @@ node_modules/
|
|||
# dotenv
|
||||
.env.local
|
||||
|
||||
javascript/schema/versions.js
|
||||
javascript/schema/versions.js
|
||||
javascript/schema/versions.d.ts
|
|
@ -7,3 +7,11 @@ writeFileSync(
|
|||
'./versions.js',
|
||||
`export const versions = ${JSON.stringify(versions)}`,
|
||||
)
|
||||
writeFileSync(
|
||||
'./versions.d.ts',
|
||||
`export declare const versions: {
|
||||
${Object.keys(versions)
|
||||
.map(v => `${v}: string`)
|
||||
.join('\n\t\t')}
|
||||
}`,
|
||||
)
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
*/
|
||||
import { v4 } from 'uuid'
|
||||
|
||||
/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */
|
||||
/* @ts-ignore */
|
||||
import { versions } from '../versions.js'
|
||||
import type { CodebookSchema } from './codebook/CodebookSchema.js'
|
||||
import type { DataPackageSchema } from './datapackage/DataPackageSchema.js'
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
"lib": ["ESNext", "DOM", "DOM.Iterable", "ES2020.BigInt"],
|
||||
"skipLibCheck": true,
|
||||
"skipDefaultLibCheck": true,
|
||||
"allowSyntheticDefaultImports": true
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"resolveJsonModule": false
|
||||
},
|
||||
"include": ["src"]
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче