DenoDDeno
Powered by
Sergey K.S
Deno•2y ago•
2 replies
Sergey K.

Use Deno as a type checker for a front-end project?

Hey. I have a need to increase the speed of typechecking my frontend project.
I'm not sure, but it seems Deno can do this faster than a regular node.js tsc?
In any case, I haven’t been able to run typecheck yet. Now I got
error: Expected a JavaScript or TypeScript module, but identified a Unknown module. Importing these types of modules is currently not supported.
error: Expected a JavaScript or TypeScript module, but identified a Unknown module. Importing these types of modules is currently not supported.
when I use css modules something like this:
import styles from './Component.module.scss';
import styles from './Component.module.scss';

Is there a way to explain to Deno what "scss" is and what type it is? I tried adding something like
declare module '*.scss' { const asset: Record<string, string>; export default asset; }
declare module '*.scss' { const asset: Record<string, string>; export default asset; }
in different ways, including directly in the component file, but the result remained unchanged.
Or does all this make no sense, is it impossible to do, or will the speed of typecheck be comparable to a regular tsc?
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Clean Integration of a Multi-file Deno Project as a Dependency in another Deno Project
ShehriyarSShehriyar / help
13mo ago
Front end dev needed for 6 months.
karimabudulahKkarimabudulah / help
3y ago
`deno run` as a library
palmikPpalmik / help
3y ago
Use deno serve for tcp
mpcrefMmpcref / help
10mo ago