Being a beginner, I am unable to comprehend the significance of some terms, despite going through documentation.
In my .tsconfig file I have
emitDecoratorMetadata
sourceMap
esModuleInterop
-> Allow default imports from modules with no default export. This does not affect code emit, just typechecking.
Can someone please make the above definition as humanly comprehensible as possible? Does this mean we can just import and not export?
For example, the definition for emitDecoratorMetadata
in one of the answers says
emit or not design-type metadata for decorated declarations in source
What does decorated declarations in source mean? Also, if someone could explain sourceMap in slightly more human terms, that would be so helpful.
Update: @Antonis Wrote an amazing answer still the last part looks vague. I created a separate post here:
Understanding esModuleInterop in tsconfig file Resources I went through:
esModuleInterop
with that ofallowSyntheticDefaultImports
. The latter is what allows default imports from modules having no default export, affecting only type checking. The former does affect code emit, synthesizing a default export, and implying the latter. – Aluan HaddadThe former does affect code emit, synthesizing a default export, and implying the latter.
less technical and please answer in details in answer section – anny123