@typescriptlibs/amd
v1.3.1
Published
TypeScript AMD loader
Downloads
60
Readme
AMD: TypeScript AMD Loader
This package provides the necessary functions to load and run a TypeScript AMD
bundle as created by the outFile
option of a tsconfig.json
.
It does not support loading of external files. Each external dependency must also be created as a TypeScript AMD bundle instead.
Example
// MyBundle.ts
export function hello () {
alert( 'Hello, world!' );
}
<!-- my-app.html -->
<html lang="en">
<head>
<script src="amd.js"></script>
<script src="my-ts-amd-bundle.js" async></script>
<script>
window.addEventListener( 'load', () => require('MyBundle').hello() );
</script>
</head>
<body>
</body>
</html>