Add typings for emmet #59803

This commit is contained in:
Ramya Achutha Rao 2018-10-03 12:55:55 -07:00
parent ffda5ba4f4
commit 26365c8957
5 changed files with 65 additions and 12 deletions

View file

@ -0,0 +1,13 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
declare module '@emmetio/css-parser' {
import { BufferStream, Stylesheet } from 'EmmetNode';
function parseStylesheet(stream: BufferStream): Stylesheet;
export default parseStylesheet;
}

View file

@ -0,0 +1,13 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
declare module '@emmetio/html-matcher' {
import { BufferStream, HtmlNode } from 'EmmetNode';
function parse(stream: BufferStream): HtmlNode;
export default parse;
}

View file

@ -0,0 +1,13 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
declare module '@emmetio/math-expression' {
import { BufferStream } from 'EmmetNode';
function index(stream: BufferStream, backward: boolean): number;
export default index;
}

View file

@ -0,0 +1,23 @@
// Type definitions for image-size
// Project: https://github.com/image-size/image-size
// Definitions by: Elisée MAURER <https://github.com/elisee>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types='@types/node'/>
declare module 'image-size' {
interface ImageInfo {
width: number;
height: number;
type: string;
}
function sizeOf(path: string): ImageInfo;
function sizeOf(path: string, callback: (err: Error, dimensions: ImageInfo) => void): void;
function sizeOf(buffer: Buffer): ImageInfo;
namespace sizeOf { }
export = sizeOf;
}

View file

@ -1,16 +1,7 @@
{
"extends": "../shared.tsconfig.json",
"compilerOptions": {
"target": "es2017",
"module": "commonjs",
"lib": [
"es6",
"es2015.promise"
],
"outDir": "./out",
"noImplicitReturns": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"strictNullChecks": true
"outDir": "./out"
},
"exclude": [
"node_modules",
@ -19,4 +10,4 @@
"include": [
"src/**/*"
]
}
}