File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 11/**
2- * Creates a function that calls the given callback once immediately.
2+ * Creates a function that calls the given callback immediately once .
33 *
44 * Multiple calls during the same tick are ignored.
55 *
66 * @param callback - The callback to call.
7- * @returns A function that calls the callback once immediately.
7+ * @returns A function that calls the callback immediately once .
88 */
9- export function createOnceImmediate < T > ( callback : ( ) => T ) : ( ) => void {
9+ export function immediateOnce < T > ( callback : ( ) => T ) : ( ) => void {
1010 let timeout : NodeJS . Immediate | undefined ;
1111
1212 return ( ) => {
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import {
1212 checkIsProfileConfigured ,
1313} from "./configure-aws.ts" ;
1414import { createEmitter } from "./emitter.ts" ;
15- import { createOnceImmediate } from "./once- immediate.ts" ;
15+ import { immediateOnce } from "./immediate-once .ts" ;
1616import type { UnwrapPromise } from "./promises.ts" ;
1717import { checkSetupStatus } from "./setup.ts" ;
1818import type { TimeTracker } from "./time-tracker.ts" ;
@@ -63,7 +63,7 @@ export async function createSetupStatusTracker(
6363 }
6464 } ;
6565
66- const checkStatus = createOnceImmediate ( async ( ) => {
66+ const checkStatus = immediateOnce ( async ( ) => {
6767 await checkStatusNow ( ) ;
6868 } ) ;
6969
@@ -140,7 +140,7 @@ function createFileStatusTracker(
140140
141141 const emitter = createEmitter < SetupStatus > ( outputChannel ) ;
142142
143- const updateStatus = createOnceImmediate ( async ( ) => {
143+ const updateStatus = immediateOnce ( async ( ) => {
144144 const newStatus = await Promise . resolve ( check ( ) ) ;
145145 if ( status !== newStatus ) {
146146 status = newStatus ;
You can’t perform that action at this time.
0 commit comments