@typescriptlibs/amd
TypeScript icon, indicating that this package has built-in type declarations

1.3.1 • Public • Published

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.

CodeQL Node.js npm license

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>

Dependencies (0)

    Dev Dependencies (4)

    Package Sidebar

    Install

    npm i @typescriptlibs/amd

    Weekly Downloads

    69

    Version

    1.3.1

    License

    MIT

    Unpacked Size

    14.9 kB

    Total Files

    12

    Last publish

    Collaborators

    • typescriptlibs