Skip to content

Commit cf657cd

Browse files
committed
feat: rename activate to immediate
1 parent d07e736 commit cf657cd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ export class Snaproll {
257257
this.store = createStore(options)
258258
}
259259

260-
private idle() {
260+
public idle() {
261261
const store = this.store
262262

263263
if (store.state !== TypeState.Active || subscriptionActive(store.subscriptions)) {
@@ -329,15 +329,15 @@ export class Snaproll {
329329

330330
public subscribe(
331331
value: SnaprollSubscription,
332-
options?: { activate?: boolean },
332+
options?: { immediate?: boolean },
333333
): SnaprollSubscriptionControls {
334334
// eslint-disable-next-line typescript/no-this-alias
335335
const self = this
336336
const state = self.store
337337

338338
if (subscriptionFind(value, state.subscriptions) === undefined) {
339339
const reference = state.subscriptions
340-
const active = options?.activate !== false
340+
const active = options?.immediate !== false
341341
state.subscriptions = [...reference, { active, value }]
342342

343343
if (state.state === TypeState.Idle) {

0 commit comments

Comments
 (0)