Skip to content

Commit

Permalink
Fix TS compile errors
Browse files Browse the repository at this point in the history
  • Loading branch information
alexdima committed Mar 15, 2018
1 parent bde4147 commit 6283645
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

for (let i = 0, len = str.length; i < len; i++) {
Expand Down
2 changes: 1 addition & 1 deletion src/vs/editor/common/model/textModelTokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function getDefaultMetadata(topLevelLanguageId: LanguageId): number {
) >>> 0;
}

const EMPTY_LINE_TOKENS = new Uint32Array(0);
const EMPTY_LINE_TOKENS = (new Uint32Array(0)).buffer;

class ModelLineTokens {
_state: IState;
Expand Down
2 changes: 1 addition & 1 deletion src/vs/editor/contrib/snippet/snippetParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ export class SnippetParser {
if (marker instanceof Placeholder) {
placeholderCount += 1;
if (marker.isFinalTabstop) {
placeholderDefaultValues.set(0);
placeholderDefaultValues.set(0, undefined);
} else if (!placeholderDefaultValues.has(marker.index) && marker.children.length > 0) {
placeholderDefaultValues.set(marker.index, marker.children);
} else {
Expand Down

0 comments on commit 6283645

Please sign in to comment.