types/domurl: add missing default export, also fix bad tests

This commit is contained in:
William Boman
2019-03-16 12:31:00 +01:00
parent e51e5044b8
commit d1fa05328f
2 changed files with 13 additions and 8 deletions

View File

@@ -1,13 +1,15 @@
interface UModel extends QueryString {
import Url = require("domurl");
interface UModel {
a: any;
b: string;
}
interface U2Model extends QueryString {
interface U2Model {
a: any;
}
interface U3Model extends QueryString {
interface U3Model {
foo: string;
}

View File

@@ -3,14 +3,15 @@
// Definitions by: Mikhus <ttps://github.com/Mikhus>
// Definitions: https://github.com/Mikhus/DefinitelyTyped
declare class QueryString {
constructor(qs?: string);
toString: () => string;
// <reference types="node" />
declare namespace domurl {
type QueryString<T> = T;
}
declare class Url<T> {
constructor(url?: string);
query: T;
query: domurl.QueryString<T>;
protocol: string;
user: string;
pass: string;
@@ -26,5 +27,7 @@ declare class Url<T> {
paths: (paths?: [string]) => [string];
isEmptyQuery: () => boolean;
queryLength: () => number;
clearQuery: () => Url<T>;
clearQuery: () => Url<{}>;
}
export = Url;