deepkit / deepkit-framework

A new full-featured and high-performance TypeScript framework
https://deepkit.io/
MIT License
3.24k stars 123 forks source link

[type-compiler] exclude declare statements #601

Open marcj opened 4 months ago

marcj commented 4 months ago

e.g. https://github.com/epicweb-dev/epic-stack/blob/e70fee5a087954b1818234443ebc49a87b5ca7d0/app/utils/env.server.ts#L60


type ENV = ReturnType<typeof getEnv>

declare global {
    var ENV: ENV
    interface Window {
        ENV: ENV
    }
}

should be avoided as we don't need them at all at runtime