#declaration file scoped for subdirectories?

2 messages · Page 1 of 1 (latest)

mortal trout
#

I was following an SO post about typing process.env, and the example uses

declare global {
  namespace NodeJS {
    interface ProcessEnv {

I was wondering if there is a simple way to scope this not globally but only to the directory tree where the declaration file lives

uncut shore
#

iirc typescript doesn't have per directory declarations

imo best bet is having multiple ts configs