/*
 * 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 class ~NodeURL {
    public href?: string;
    public protocol?: string;
    public host?: string;
    public hostname?: string;
    public port?: string;
    public path?: string;
    public pathname?: string;
    public search?: string;
    public hash?: string;
    public auth?: string;
    public slashes?: boolean;
    public query?: Object+;

    public username?: string;
    public password?: string;
}

export external public function parse(urlStr: string, parseQueryString: boolean=, slashesDenoteHost: boolean=): NodeURL;
export external public function format(urlObj: NodeURL): string;
export external public function resolve(from: string, to: string): string;

export external public function fileURLToPath(url: NodeURL|string): string;
