I got a util file which should not be exported as d.ts file as it is for internal use only. The file looks like this
// util.ts
/** @internal */
export const fun = function (...) {
...
};
/** @internal */
export const arrowFun = (...) => {
...
}
The issue is that with declaration: true I still get the util.d.ts file even if it looks like this
// util.d.ts
export {};
The tsconfig.json is
{
"compilerOptions": {
"target": "es2021",
"module": "commonjs",
"outDir": "dist",
"strict": true,
"allowSyntheticDefaultImports": true,
"declaration": true,
"stripInternal": true
},
"include": [
"src/index.ts"
],
"exclude": [
"src/util.ts"
]
}
Is there a way how not to generate the file at all?
Please do not answer with .gitignore or .npmrc stuff. I want to keep this clear and easy to read without having people to search around why the file is not exported