Change to represent get index

This commit is contained in:
Denis Augsburger
2018-02-27 10:48:05 +01:00
parent 6b53e1fbde
commit d70bcc668a
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -103,7 +103,7 @@ export interface RuleOptions {
export declare class SheetsRegistry {
constructor();
registry: ReadonlyArray<StyleSheet<any>>;
index(): number;
readonly index: number;
add(sheet: StyleSheet<any>): void;
reset(): void;
remove(sheet: StyleSheet<any>): void;
+2 -2
View File
@@ -88,8 +88,8 @@ sheetsRegistry.add(secondStyleSheet);
sheetsRegistry.registry.length; // $ExpectType number
sheetsRegistry.remove(secondStyleSheet);
sheetsRegistry.index(); // $ExpectType number
sheetsRegistry.index; // $ExpectType () => number
sheetsRegistry.index; // $ExpectType number
sheetsRegistry.index = 5; // $ExpectError
sheetsRegistry.toString(); // $ExpectType string
// With css options
sheetsRegistry.toString({indent: 5}); // $ExpectType string