ecmarkup: Provides its own types (#14150)

This commit is contained in:
Andy
2017-01-20 16:33:34 -08:00
committed by Mohamed Hegazy
parent 138e095da4
commit 8b6b40ad35
4 changed files with 6 additions and 75 deletions

View File

@@ -1,21 +0,0 @@
/// <reference types="ecmarkup" />
import * as emu from "ecmarkup";
emu.build("string", (path: string) => Promise.resolve("string"), {
contributors: "string",
copyright: true,
date: new Date(),
location: "string",
oldToc: true,
toc: true,
shortname: "string",
stage: "string",
status: "proposal",
title: "string",
version: "string",
verbose: true
}).then((spec: emu.Spec) => {
const output = spec.toHTML();
const biblio = spec.exportBiblio();
});

32
ecmarkup/index.d.ts vendored
View File

@@ -1,32 +0,0 @@
// Type definitions for emarkup v3.3.2
// Project: http://github.com/bterlson/ecmarkup
// Definitions by: Ron Buckton <https://github.com/rbuckton>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export interface Spec {
spec: this;
location: string;
opts: Options;
rootPath: string;
rootDir: string;
namespace: string;
toHTML(): string;
exportBiblio(): any;
}
export interface Options {
status?: "proposal" | "draft" | "standard";
version?: string;
title?: string;
shortname?: string;
stage?: string | null;
copyright?: boolean;
date?: Date;
location?: string;
contributors?: string;
toc?: boolean;
oldToc?: boolean;
verbose?: boolean;
}
export function build(path: string, fetch: (path: string) => PromiseLike<string>, opts?: Options): PromiseLike<Spec | undefined>;

View File

@@ -1,22 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"ecmarkup-tests.ts"
]
}

View File

@@ -281,6 +281,12 @@
"typingsPackageName": "vue-router",
"sourceRepoURL": "https://github.com/vuejs/vue-router",
"asOfVersion": "2.0.0"
},
{
"libraryName": "ecmarkup",
"typingsPackageName": "ecmarkup",
"sourceRepoURL": "https://github.com/bterlson/ecmarkup",
"asOfVersion": "3.4.0"
}
]
}