提交 62836451 编写于 作者: A Alex Dima

Fix TS compile errors

上级 bde41475
...@@ -35,7 +35,7 @@ export class LineStarts { ...@@ -35,7 +35,7 @@ export class LineStarts {
) { } ) { }
} }
export function createLineStartsFast(str: string, readonly: boolean = true): Uint32Array | number[] { export function createLineStartsFast(str: string, readonly: boolean = true): Uint32Array | Uint16Array | number[] {
let r: number[] = [0], rLength = 1; let r: number[] = [0], rLength = 1;
for (let i = 0, len = str.length; i < len; i++) { for (let i = 0, len = str.length; i < len; i++) {
......
...@@ -25,7 +25,7 @@ function getDefaultMetadata(topLevelLanguageId: LanguageId): number { ...@@ -25,7 +25,7 @@ function getDefaultMetadata(topLevelLanguageId: LanguageId): number {
) >>> 0; ) >>> 0;
} }
const EMPTY_LINE_TOKENS = new Uint32Array(0); const EMPTY_LINE_TOKENS = (new Uint32Array(0)).buffer;
class ModelLineTokens { class ModelLineTokens {
_state: IState; _state: IState;
......
...@@ -568,7 +568,7 @@ export class SnippetParser { ...@@ -568,7 +568,7 @@ export class SnippetParser {
if (marker instanceof Placeholder) { if (marker instanceof Placeholder) {
placeholderCount += 1; placeholderCount += 1;
if (marker.isFinalTabstop) { if (marker.isFinalTabstop) {
placeholderDefaultValues.set(0); placeholderDefaultValues.set(0, undefined);
} else if (!placeholderDefaultValues.has(marker.index) && marker.children.length > 0) { } else if (!placeholderDefaultValues.has(marker.index) && marker.children.length > 0) {
placeholderDefaultValues.set(marker.index, marker.children); placeholderDefaultValues.set(marker.index, marker.children);
} else { } else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册