view weather_server/typescript/amd/globals.d.ts @ 14:dd77a7ee02c1

Create tiny AMD loader and set up tsc for it.
author Paul Fisher <paul@pfish.zone>
date Wed, 09 Oct 2019 23:14:16 -0400
parents
children
line wrap: on
line source

type FactoryFunction = (...deps: unknown[]) => void;

interface Module {
    deps: string[];
    factory: FactoryFunction;
    exports: {};
}

interface Window {
    define(name: string, deps: string[], factory: FactoryFunction): void;
    require(dep: string): {};
}