Is there a way to ensure that a function in TypeScript only accepts JS File objects?
I need help on how I can define this type specifically.
Update: Here's a peek at my tsconfig.json file:
{
"compilerOptions": {
"outDir": "./ts-dist/",
"sourceMap": true,
"noImplicitAny": true,
"module": "commonjs",
"target": "es6",
"jsx": "react",
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"lib": [
"dom",
"es2017"
]
},
"include": [
"./src/**/*", "./test/**/*"
],
"exclude": [
"node_modules", "dist"
]
}