gustavopch / tsc-files

A tiny tool to run `tsc` on specific files without ignoring tsconfig.json
MIT License
233 stars 49 forks source link

Does not pay attention to global declarations #50

Closed adenisovgit closed 1 year ago

adenisovgit commented 1 year ago

main.d.ts in the ./src completely ignored by tsc-files

declare type QueryType = { [key: string]: string | number | boolean };
declare module '*.scss' {
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
  const content: any;
  export default content;
}

pre-commit report:

✖ tsc-files --noEmit:
src/components/grid/simpleGrid/grid.tsx(3,20): error TS2307: Cannot find module './styles.scss' or its corresponding type declarations.
src/components/hashLinkAnchor/Anchor.tsx(3,20): error TS2307: Cannot find module './styles.scss' or its corresponding type declarations.
src/services/asyncApiFetch.ts(13,42): error TS2304: Cannot find name 'QueryType'.
src/views/customizer/settings/banner/BannerSettings/components/BannerWithImageSettings.tsx(5,20): error TS2307: Cannot find module '../../styles.scss' or its corresponding type declarations.
src/views/products/Products.tsx(23,20): error TS2307: Cannot find module './styles.scss' or its corresponding type declarations.
src/views/products/Products.tsx(37,10): error TS2304: Cannot find name 'QueryType'.
husky - pre-commit hook exited with code 1 (error)
gustavopch commented 1 year ago

Duplicate of https://github.com/gustavopch/tsc-files/issues/20.