Skip to content

Commit b6669c9

Browse files
committed
revert wrong inline parameter
1 parent 1a59eb3 commit b6669c9

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/compiler/scanner.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -626,13 +626,13 @@ namespace ts {
626626
* @returns If "reduce" is true, the accumulated value. If "reduce" is false, the first truthy
627627
* return value of the callback.
628628
*/
629-
function iterateCommentRanges<T, U>(reduce: boolean, text: string, pos: number, trailing: boolean, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T, memo: U | undefined) => U, state: T, initial?: U, inline?: boolean): U | undefined {
629+
function iterateCommentRanges<T, U>(reduce: boolean, text: string, pos: number, trailing: boolean, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T, memo: U | undefined) => U, state: T, initial?: U): U | undefined {
630630
let pendingPos!: number;
631631
let pendingEnd!: number;
632632
let pendingKind!: CommentKind;
633633
let pendingHasTrailingNewLine!: boolean;
634634
let hasPendingCommentRange = false;
635-
let collecting = inline || trailing || pos === 0;
635+
let collecting = trailing || pos === 0;
636636
let accumulator = initial;
637637
scan: while (pos >= 0 && pos < text.length) {
638638
const ch = text.charCodeAt(pos);
@@ -725,9 +725,9 @@ namespace ts {
725725
}
726726

727727
export function forEachLeadingCommentRange<U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean) => U): U | undefined;
728-
export function forEachLeadingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state: T, inline?: boolean): U | undefined;
729-
export function forEachLeadingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state?: T, inline?: boolean): U | undefined {
730-
return iterateCommentRanges(/*reduce*/ false, text, pos, /*trailing*/ false, cb, state, /* initial */ undefined, inline);
728+
export function forEachLeadingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state: T): U | undefined;
729+
export function forEachLeadingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state?: T): U | undefined {
730+
return iterateCommentRanges(/*reduce*/ false, text, pos, /*trailing*/ false, cb, state, /* initial */ undefined);
731731
}
732732

733733
export function forEachTrailingCommentRange<U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean) => U): U | undefined;

src/services/utilities.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1656,6 +1656,6 @@ namespace ts {
16561656
pos += 2;
16571657
}
16581658
addSyntheticLeadingComment(targetNode, explicitKind || kind, sourceFile.text.slice(pos, end), explicitHtnl !== undefined ? explicitHtnl : htnl);
1659-
}, undefined, inline)
1659+
})
16601660
}
16611661
}

0 commit comments

Comments
 (0)