https://github.com/typescriptlibs/amd
TypeScript AMD Loader
https://github.com/typescriptlibs/amd
Last synced: about 1 year ago
JSON representation
TypeScript AMD Loader
- Host: GitHub
- URL: https://github.com/typescriptlibs/amd
- Owner: typescriptlibs
- License: mit
- Created: 2023-02-26T05:44:01.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-04-20T09:10:08.000Z (about 2 years ago)
- Last Synced: 2025-03-11T01:08:13.062Z (about 1 year ago)
- Language: TypeScript
- Homepage: https://typescriptlibs.org/amd/
- Size: 68.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Security: SECURITY.md
- Authors: AUTHORS.md
Awesome Lists containing this project
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.
[](https://github.com/typescriptlibs/amd/actions/workflows/codeql.yml)
[](https://github.com/typescriptlibs/amd/actions/workflows/node.js.yml)
[](https://www.npmjs.com/package/@typescriptlibs/amd)
[](https://github.com/typescriptlibs/amd/blob/main/LICENSE.md)
Example
-------
``` TypeScript
// MyBundle.ts
export function hello () {
alert( 'Hello, world!' );
}
```
``` HTML
window.addEventListener( 'load', () => require('MyBundle').hello() );
```