UNPKG

554 BTypeScriptView Raw
1/// <reference types="node" />
2
3export interface Hook {
4 (m: { extensions: string } | NodeModule): any;
5 install(m?: { extension: string; [key: string]: any }): void;
6}
7
8export type RegisterFn = (hook: Hook) => void;
9
10export interface ExtensionDescriptor {
11 module: string;
12 register: RegisterFn;
13}
14
15export type Extension = string | ExtensionDescriptor | Array<string | ExtensionDescriptor>;
16export interface Extensions {
17 [extension: string]: Extension | null;
18}
19
20export const extensions: Extensions;
21export const jsVariants: Extensions;