Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0b264db

Browse files
Improve signature for 'format.setOption' in fourslash.
1 parent 7e50839 commit 0b264db

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tests/cases/fourslash/fourslash.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ declare namespace FourSlashInterface {
9797
InsertSpaceAfterTypeAssertion: boolean;
9898
PlaceOpenBraceOnNewLineForFunctions: boolean;
9999
PlaceOpenBraceOnNewLineForControlBlocks: boolean;
100-
[s: string]: boolean | number | string | undefined;
101100
}
102101
interface Range {
103102
fileName: string;
@@ -375,7 +374,7 @@ declare namespace FourSlashInterface {
375374
setFormatOptions(options: FormatCodeOptions): any;
376375
selection(startMarker: string, endMarker: string): void;
377376
onType(posMarker: string, key: string): void;
378-
setOption(name: keyof FormatCodeOptions, value: number | string | boolean): void;
377+
setOption<K extends keyof FormatCodeOptions>(name: K, value: FormatCodeOptions[K]): void;
379378
}
380379
class cancellation {
381380
resetCancelled(): void;

0 commit comments

Comments
 (0)