Closed omar-codesenberg closed 6 years ago
Support for importing json files via es6 import is currently not available.
The following will convert to trying to load an html file instead of properly loading a json file
import * as data from '../config/config.json';
Weird, declaration should just be passed as they are. I will take a look into it.
As for importing json files, it is not possible to import them with neither script
or link
tag, so I have not implemented support for it. I will add a configurable loader option.
The original issue (about declarations breaking the build) has been fixed, merged and released under 0.5.5 version. The other thing you ask for (importing json files) will be created in a separate task.
After version 0.4.7-rc, placing type declarations inside a ts file breaks the compiler.
i.e. (this is inside of a ts file)
declare var Widget: any;