Add typing for emmet node

This commit is contained in:
Ramya Achutha Rao
2017-06-26 13:57:26 -07:00
parent 96524872b3
commit fc6c69311d
12 changed files with 153 additions and 70 deletions

View File

@@ -7,7 +7,7 @@ import * as vscode from 'vscode';
import { getNodesInBetween, getNode } from './util';
import parse from '@emmetio/html-matcher';
import parseStylesheet from '@emmetio/css-parser';
import Node from '@emmetio/node';
import { Node, Stylesheet } from 'EmmetNode';
import { DocumentStreamReader } from './bufferStream';
import { isStyleSheet } from 'vscode-emmet-helper';
@@ -102,7 +102,7 @@ function getRangesToUnCommentHTML(node: Node, document: vscode.TextDocument): vs
return rangesToUnComment;
}
function toggleCommentStylesheet(document: vscode.TextDocument, selection: vscode.Selection, rootNode: Node): [vscode.Range[], vscode.Range] {
function toggleCommentStylesheet(document: vscode.TextDocument, selection: vscode.Selection, rootNode: Stylesheet): [vscode.Range[], vscode.Range] {
const selectionStart = selection.isReversed ? selection.active : selection.anchor;
const selectionEnd = selection.isReversed ? selection.anchor : selection.active;