I have a Typescript module that generates a d.ts file. In it, there are parts that use the readonly keyword like the following:
readonly type:string
When I use that d.ts file in another module, the compiler throws an error saying:
error TS1005: '=' expected.
I'm using gulp-typescript 5.0.1 and typescript 3.5.3.
Some other posts on Stackoverflow suggest increasing the versions of gulp-typescript and typescript but I'm using newer versions.
gulp-typescript compiler throws errors on readonly modifier
Is there a way to force Typescript to not write out readonly keywords in d.ts files such as targeting a lower version output for compatibility?
Is there a way to check what version of Typescript is being used for compiling? I removed older versions of Typescript from the global npm directory but I want to check if it's reading an older module somewhere.