deepkit-framework
                                
                                 deepkit-framework copied to clipboard
                                
                                    deepkit-framework copied to clipboard
                            
                            
                            
                        On Windows, `type-compiler` code injected into Typescript is partially invalid
The @deepkit/type-compiler installation mutations Typescript's tsc.js and typescript.js files (perhaps other as well?).
On Windows (when installing with pnpm), part of the injected code looks like this:
try {
    typeTransformer = require('@deepkit/type-compiler');
} catch (error) {
    typeTransformer = require('..\..\..\..\@[email protected][email protected]\node_modules\@deepkit\type-compiler\dist\cjs');
}
Corresponding to the source: https://github.com/deepkit/deepkit-framework/blob/c1d6c415199804d966ce17ceb235a050de011da3/packages/type-compiler/install-transformer.ts#L23-L27
The \ path delimiters are not escaped in the path-string in the catch block, resulting in an invalid path.
This can be resolved by either escaping those characters (making them \\) or by using POSIX path delimiters (/), which are what Node expects anyway, even on Windows.
This issue would make deepkit impossible to use with tsc in cases where that try-block require doesn't work, though I'm not sure what scenarios could cause that to happen.