diff --git a/package.json b/package.json index 3d097141f2..e2bf732336 100644 --- a/package.json +++ b/package.json @@ -4,11 +4,13 @@ "type": "module", "files": [ "**/*.js", - "**/*.d.ts" + "**/*.d.ts", + "**/*.mjs", + "**/*.d.mts" ], "description": "FunctionalScript is a purely functional subset of JavaScript", "scripts": { - "prepack": "tsc --NoEmit false", + "prepack": "tsc --noEmit false --emitDeclarationOnly && tsc --noEmit false --declaration false", "test": "tsc && node ./fjs/module.ts t", "cov": "node --test --experimental-test-coverage --test-coverage-include=**/module.f.ts --test-coverage-include=**/module.f.mjs", "start": "node ./fjs/module.ts", diff --git a/tsconfig.json b/tsconfig.json index 57c938b3d9..1534b6fbd0 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -42,8 +42,8 @@ // "noResolve": true, /* Disallow `import`s, `require`s or ``s from expanding the number of files TypeScript should add to a project. */ /* JavaScript Support */ - // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */ - // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */ + "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`. */ /* Emit */