Skip to content

Commit d4aa947

Browse files
committed
rename
1 parent a0e8454 commit d4aa947

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
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 () => {

src/utils/setup-status.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
checkIsProfileConfigured,
1313
} from "./configure-aws.ts";
1414
import { createEmitter } from "./emitter.ts";
15-
import { createOnceImmediate } from "./once-immediate.ts";
15+
import { immediateOnce } from "./immediate-once.ts";
1616
import type { UnwrapPromise } from "./promises.ts";
1717
import { checkSetupStatus } from "./setup.ts";
1818
import 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;

0 commit comments

Comments
 (0)