I have a Angular component, And I add a type to the Input property with namespace as follow code.
@Input() size: AMap.Size
AMap is a namespace and the class Size with in. The IDE and typescript compiler work well.But, It's not work in browser。 And throw an error of
Uncaught ReferenceError: AMap is not defined
I found the compiled code
Why the type will compile into the code?
The AMap types as follow
declare namespace AMap {
export class Size {}
}
thanks

AMapnamespace, is yours? I mean, belongs to your project, or comes from an external librarysrc/types/amap/index.d.ts, And the config oftsconfig.jsonis ``` "typeRoots": [ "node_modules/@types", "src/types" ] ```