/*
 * Copyright (c) 2017 NumberFour AG.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *   NumberFour AG - Initial API and implementation
 */

export external public const builtinModules: string[];

@Final
export external public class ~__RequireFn {
    (string): any;
    
    public static get cache(): Object+;
    public static resolve(request: string, options: ~Object with {
        paths: string[]
    }=): string;
}

export external public function createRequireFromPath(filename: string): type{__RequireFn};

export external public class ~Module {
    public get id(): string;
    public get path(): string;
    public get exports(): Object;
    public get parent(): Module;
    public get filename(): string;
    public get loaded(): boolean;
    public get children(): Module[];
    public get paths(): string[];
}
