mirror of
https://github.com/microsoft/vscode-extension-samples.git
synced 2026-06-13 07:10:26 +08:00
- support for multi workspace folders
- mock fiddle for offline testing - redesigned to support files closing - support for deleted files
This commit is contained in:
9
source-control-sample/src/util.ts
Normal file
9
source-control-sample/src/util.ts
Normal file
@ -0,0 +1,9 @@
|
||||
export function firstIndex<T>(array: T[], fn: (t: T) => boolean): number {
|
||||
for (let i = 0; i < array.length; i++) {
|
||||
if (fn(array[i])) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
Reference in New Issue
Block a user