mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-01-14 01:25:43 -05:00
Fixes Objects.values types
This commit is contained in:
@@ -138,7 +138,7 @@ export class Annotations {
|
||||
|
||||
// Try to get the width of the string, if there is a cap
|
||||
let width = 4; // Start with a padding
|
||||
for (const token of Objects.values<Strings.ITokenOptions | undefined>(options.tokenOptions)) {
|
||||
for (const token of Objects.values(options.tokenOptions!)) {
|
||||
if (token === undefined) continue;
|
||||
|
||||
// If any token is uncapped, kick out and set no max
|
||||
|
||||
@@ -11,7 +11,7 @@ export class ResetSuppressedWarningsCommand extends Command {
|
||||
}
|
||||
|
||||
async execute() {
|
||||
for (const key of Objects.values<string>(SuppressedKeys)) {
|
||||
for (const key of Objects.values(SuppressedKeys)) {
|
||||
await this.context.globalState.update(key, false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,9 @@ export namespace Objects {
|
||||
return _isEqual(first, second);
|
||||
}
|
||||
|
||||
export function* entries(o: any): IterableIterator<[string, any]> {
|
||||
export function entries<T>(o: { [key: string]: T }): IterableIterator<[string, T]>;
|
||||
export function entries<T>(o: { [key: number]: T }): IterableIterator<[string, T]>;
|
||||
export function* entries<T>(o: any): IterableIterator<[string, T]> {
|
||||
for (const key in o) {
|
||||
yield [key, o[key]];
|
||||
}
|
||||
@@ -56,6 +58,8 @@ export namespace Objects {
|
||||
}
|
||||
}
|
||||
|
||||
export function values<T>(o: { [key: string]: T }): IterableIterator<T>;
|
||||
export function values<T>(o: { [key: number]: T }): IterableIterator<T>;
|
||||
export function* values<T>(o: any): IterableIterator<T> {
|
||||
for (const key in o) {
|
||||
yield o[key];
|
||||
|
||||
Reference in New Issue
Block a user