Let's say you're developing a package "A" that have @types/some-module package in devDependencies. For some reason you're exporting the type from @types/some-module
import {SomeType} from 'some-module';
export default class APackageClass {
constructor(private config: SomeType) {
}
}
Right now Typescript consumers of package "A" are unable to guess what SomeType is, since devDependencies of package "A" are NOT installed.
In that particular case you NEED to place @types/* package with regular "dependencies". For other cases "devDependencies" are good enough.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…