diff --git a/packages/rxjs/.eslintrc.json b/packages/rxjs/.eslintrc.json index dad7653410..520d66e741 100644 --- a/packages/rxjs/.eslintrc.json +++ b/packages/rxjs/.eslintrc.json @@ -3,10 +3,15 @@ "eslint:recommended", "plugin:@typescript-eslint/recommended" ], + "parserOptions": { + "project": ["./tsconfig.json"] + }, "rules": { "@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/no-unused-vars": "off", "@typescript-eslint/no-unsafe-declaration-merging": "off", + "@typescript-eslint/consistent-type-imports": "warn", + "@typescript-eslint/consistent-type-exports": "warn", "no-prototype-builtins": "off" }, "env": { diff --git a/packages/rxjs/spec-dtslint/Observable-spec.ts b/packages/rxjs/spec-dtslint/Observable-spec.ts index 88fda76aae..faed07742b 100644 --- a/packages/rxjs/spec-dtslint/Observable-spec.ts +++ b/packages/rxjs/spec-dtslint/Observable-spec.ts @@ -1,4 +1,5 @@ -import { Observable, of, OperatorFunction, map, filter } from 'rxjs'; +import type { OperatorFunction } from 'rxjs'; +import { Observable, of, map, filter } from 'rxjs'; function a(input: I, output: O): OperatorFunction; function a(output: O): OperatorFunction; diff --git a/packages/rxjs/spec-dtslint/observables/bindCallback-spec.ts b/packages/rxjs/spec-dtslint/observables/bindCallback-spec.ts index ae0b444148..6f4cdf8836 100644 --- a/packages/rxjs/spec-dtslint/observables/bindCallback-spec.ts +++ b/packages/rxjs/spec-dtslint/observables/bindCallback-spec.ts @@ -1,5 +1,6 @@ import { bindCallback } from 'rxjs'; -import { a, b, c, d, e, f, g, A, B, C, D, E, F, G } from '../helpers'; +import type { A, B, C, D, E, F, G } from '../helpers'; +import { a, b, c, d, e, f, g } from '../helpers'; describe('callbackFunc', () => { const f0 = (cb: () => void) => { diff --git a/packages/rxjs/spec-dtslint/observables/combineLatest-spec.ts b/packages/rxjs/spec-dtslint/observables/combineLatest-spec.ts index e47bccfb7b..023e85e463 100644 --- a/packages/rxjs/spec-dtslint/observables/combineLatest-spec.ts +++ b/packages/rxjs/spec-dtslint/observables/combineLatest-spec.ts @@ -1,5 +1,6 @@ import { combineLatest } from 'rxjs'; -import { a$, b$, c$, d$, e$, f$, g$, A, B, C, D, E, F } from '../helpers'; +import type { B, C, D, E, F } from '../helpers'; +import { a$, b$, c$, d$, e$, f$, g$, A } from '../helpers'; it('should accept 1 param', () => { const o = combineLatest([a$]); // $ExpectType Observable<[A]> diff --git a/packages/rxjs/spec-dtslint/observables/fromEvent-spec.ts b/packages/rxjs/spec-dtslint/observables/fromEvent-spec.ts index 8ef58e387c..d144590c33 100644 --- a/packages/rxjs/spec-dtslint/observables/fromEvent-spec.ts +++ b/packages/rxjs/spec-dtslint/observables/fromEvent-spec.ts @@ -1,11 +1,11 @@ import { fromEvent } from 'rxjs'; -import { +import type { HasEventTargetAddRemove, NodeStyleEventEmitter, NodeCompatibleEventEmitter, JQueryStyleEventEmitter } from '../../src/internal/observable/fromEvent'; -import { B } from '../helpers'; +import type { B } from '../helpers'; declare const eventTargetSource: EventTarget; diff --git a/packages/rxjs/spec-dtslint/operators/catchError-spec.ts b/packages/rxjs/spec-dtslint/operators/catchError-spec.ts index ae98f25dee..0e41b853ee 100644 --- a/packages/rxjs/spec-dtslint/operators/catchError-spec.ts +++ b/packages/rxjs/spec-dtslint/operators/catchError-spec.ts @@ -1,4 +1,5 @@ -import { of, Observable, EMPTY } from 'rxjs'; +import type { Observable} from 'rxjs'; +import { of, EMPTY } from 'rxjs'; import { catchError } from 'rxjs/operators'; it('should infer correctly', () => { diff --git a/packages/rxjs/spec-dtslint/operators/count-spec.ts b/packages/rxjs/spec-dtslint/operators/count-spec.ts index e7add258ae..55cc704aed 100644 --- a/packages/rxjs/spec-dtslint/operators/count-spec.ts +++ b/packages/rxjs/spec-dtslint/operators/count-spec.ts @@ -1,4 +1,5 @@ -import { of, Observable } from 'rxjs'; +import type { Observable } from 'rxjs'; +import { of } from 'rxjs'; import { count } from 'rxjs/operators'; it('should always infer number', () => { diff --git a/packages/rxjs/spec-dtslint/operators/distinct-spec.ts b/packages/rxjs/spec-dtslint/operators/distinct-spec.ts index f6034aac17..63aca946d2 100644 --- a/packages/rxjs/spec-dtslint/operators/distinct-spec.ts +++ b/packages/rxjs/spec-dtslint/operators/distinct-spec.ts @@ -1,7 +1,7 @@ import { of } from 'rxjs'; import { asInteropObservable } from '../../spec/helpers/interop-helper'; import { distinct } from 'rxjs/operators'; -import { ReadableStreamLike } from '../../src/internal/types'; +import type { ReadableStreamLike } from '../../src/internal/types'; it('should infer correctly', () => { const o = of(1, 2, 3).pipe(distinct()); // $ExpectType Observable diff --git a/packages/rxjs/spec-dtslint/operators/endWith-spec.ts b/packages/rxjs/spec-dtslint/operators/endWith-spec.ts index ae1acdbdf0..d7a8e35d9f 100644 --- a/packages/rxjs/spec-dtslint/operators/endWith-spec.ts +++ b/packages/rxjs/spec-dtslint/operators/endWith-spec.ts @@ -1,6 +1,7 @@ import { of } from 'rxjs'; import { endWith } from 'rxjs/operators'; -import { A, B, a, b, c, d, e, f, g, h } from '../helpers'; +import type { A, B} from '../helpers'; +import { a, b, c, d, e, f, g, h } from '../helpers'; it('should infer type for N values', () => { const r0 = of(a).pipe(endWith()); // $ExpectType Observable diff --git a/packages/rxjs/spec-dtslint/operators/every-spec.ts b/packages/rxjs/spec-dtslint/operators/every-spec.ts index 9e0c6685db..87c2e556af 100644 --- a/packages/rxjs/spec-dtslint/operators/every-spec.ts +++ b/packages/rxjs/spec-dtslint/operators/every-spec.ts @@ -1,4 +1,5 @@ -import { of, Observable } from 'rxjs'; +import type { Observable } from 'rxjs'; +import { of } from 'rxjs'; import { every } from 'rxjs/operators'; it('should infer correctly', () => { diff --git a/packages/rxjs/spec-dtslint/operators/filter-spec.ts b/packages/rxjs/spec-dtslint/operators/filter-spec.ts index b22d574c9e..03a96ea69a 100644 --- a/packages/rxjs/spec-dtslint/operators/filter-spec.ts +++ b/packages/rxjs/spec-dtslint/operators/filter-spec.ts @@ -1,4 +1,5 @@ -import { Observable, of } from 'rxjs'; +import type { Observable} from 'rxjs'; +import { of } from 'rxjs'; import { filter, map } from 'rxjs/operators'; it('should support a predicate', () => { diff --git a/packages/rxjs/spec-dtslint/operators/findIndex-spec.ts b/packages/rxjs/spec-dtslint/operators/findIndex-spec.ts index 0d782de6b9..ce13648f78 100644 --- a/packages/rxjs/spec-dtslint/operators/findIndex-spec.ts +++ b/packages/rxjs/spec-dtslint/operators/findIndex-spec.ts @@ -1,4 +1,5 @@ -import { of, Observable } from 'rxjs'; +import type { Observable } from 'rxjs'; +import { of } from 'rxjs'; import { findIndex } from 'rxjs/operators'; it('should infer correctly', () => { diff --git a/packages/rxjs/spec-dtslint/operators/groupBy-spec.ts b/packages/rxjs/spec-dtslint/operators/groupBy-spec.ts index 0f5163ab1d..04f251de31 100644 --- a/packages/rxjs/spec-dtslint/operators/groupBy-spec.ts +++ b/packages/rxjs/spec-dtslint/operators/groupBy-spec.ts @@ -1,4 +1,5 @@ -import { of, Subject, GroupedObservable } from 'rxjs'; +import type { GroupedObservable } from 'rxjs'; +import { of, Subject } from 'rxjs'; import { groupBy, mergeMap } from 'rxjs/operators'; it('should infer correctly', () => { diff --git a/packages/rxjs/spec-dtslint/operators/single-spec.ts b/packages/rxjs/spec-dtslint/operators/single-spec.ts index c564d68f40..1ac4c78051 100644 --- a/packages/rxjs/spec-dtslint/operators/single-spec.ts +++ b/packages/rxjs/spec-dtslint/operators/single-spec.ts @@ -1,4 +1,5 @@ -import { of, Observable } from 'rxjs'; +import type { Observable } from 'rxjs'; +import { of } from 'rxjs'; import { single } from 'rxjs/operators'; it('should infer correctly', () => { diff --git a/packages/rxjs/spec-dtslint/operators/startWith-spec.ts b/packages/rxjs/spec-dtslint/operators/startWith-spec.ts index 79ffb950ee..75e00b9443 100644 --- a/packages/rxjs/spec-dtslint/operators/startWith-spec.ts +++ b/packages/rxjs/spec-dtslint/operators/startWith-spec.ts @@ -1,5 +1,6 @@ import { of, startWith } from 'rxjs'; -import { A, B, a, b, c, d, e, f, g, h } from '../helpers'; +import type { A, B} from '../helpers'; +import { a, b, c, d, e, f, g, h } from '../helpers'; it('should infer correctly with N values', () => { const r0 = of(a).pipe(startWith()); // $ExpectType Observable diff --git a/packages/rxjs/spec-dtslint/types-spec.ts b/packages/rxjs/spec-dtslint/types-spec.ts index 9dec8366ed..945126375a 100644 --- a/packages/rxjs/spec-dtslint/types-spec.ts +++ b/packages/rxjs/spec-dtslint/types-spec.ts @@ -1,4 +1,4 @@ -import { +import type { Observable, ObservedValueOf, ObservedValueUnionFromArray, @@ -7,7 +7,7 @@ import { Head, Tail } from 'rxjs'; -import { A, B, C } from './helpers'; +import type { A, B, C } from './helpers'; describe('ObservedValueOf', () => { it('should infer from an observable', () => { diff --git a/packages/rxjs/spec-dtslint/util/pipe-spec.ts b/packages/rxjs/spec-dtslint/util/pipe-spec.ts index 87e8220b06..f300931764 100644 --- a/packages/rxjs/spec-dtslint/util/pipe-spec.ts +++ b/packages/rxjs/spec-dtslint/util/pipe-spec.ts @@ -1,4 +1,5 @@ -import { pipe, UnaryFunction, of, Observable } from 'rxjs'; +import type { UnaryFunction, Observable } from 'rxjs'; +import { pipe, of } from 'rxjs'; /** * Used to keep the tests uncluttered. diff --git a/packages/rxjs/spec/Scheduler-spec.ts b/packages/rxjs/spec/Scheduler-spec.ts index 0d0c1819fb..7c89cae8bc 100644 --- a/packages/rxjs/spec/Scheduler-spec.ts +++ b/packages/rxjs/spec/Scheduler-spec.ts @@ -1,6 +1,6 @@ import { expect } from 'chai'; import { queueScheduler as queue } from 'rxjs'; -import { QueueScheduler } from 'rxjs/internal/scheduler/QueueScheduler'; +import type { QueueScheduler } from 'rxjs/internal/scheduler/QueueScheduler'; /** @test {Scheduler} */ describe('Scheduler.queue', () => { diff --git a/packages/rxjs/spec/Subject-spec.ts b/packages/rxjs/spec/Subject-spec.ts index 38c08869db..795f25b176 100644 --- a/packages/rxjs/spec/Subject-spec.ts +++ b/packages/rxjs/spec/Subject-spec.ts @@ -1,5 +1,6 @@ import { expect } from 'chai'; -import { Subject, Observable, AsyncSubject, Observer, of, config, Subscription, Subscriber, noop, operate } from 'rxjs'; +import type { Subscription} from 'rxjs'; +import { Subject, Observable, AsyncSubject, of, config, Subscriber, noop, operate } from 'rxjs'; import { delay } from 'rxjs/operators'; import { TestScheduler } from 'rxjs/testing'; import { observableMatcher } from './helpers/observableMatcher'; diff --git a/packages/rxjs/spec/Subscriber-spec.ts b/packages/rxjs/spec/Subscriber-spec.ts index 2ba8d9a465..84220e7411 100644 --- a/packages/rxjs/spec/Subscriber-spec.ts +++ b/packages/rxjs/spec/Subscriber-spec.ts @@ -1,5 +1,6 @@ import { expect } from 'chai'; -import { Subscriber, Observable, of, Observer, config, operate } from 'rxjs'; +import type { Observer} from 'rxjs'; +import { Subscriber, Observable, of, config, operate } from 'rxjs'; import * as sinon from 'sinon'; import { asInteropSubscriber } from './helpers/interop-helper'; import { getRegisteredFinalizers } from './helpers/subscription'; diff --git a/packages/rxjs/spec/helpers/interop-helper.ts b/packages/rxjs/spec/helpers/interop-helper.ts index 1537843769..a00fc03ea4 100644 --- a/packages/rxjs/spec/helpers/interop-helper.ts +++ b/packages/rxjs/spec/helpers/interop-helper.ts @@ -1,4 +1,5 @@ -import { Observable, Subject, Subscriber, Subscription } from 'rxjs'; +import type { Observable, Subject, Subscription } from 'rxjs'; +import { Subscriber } from 'rxjs'; /** * Returns an observable that will be deemed by this package's implementation diff --git a/packages/rxjs/spec/helpers/marble-testing.ts b/packages/rxjs/spec/helpers/marble-testing.ts index 16ff3f3e49..6090faefc7 100644 --- a/packages/rxjs/spec/helpers/marble-testing.ts +++ b/packages/rxjs/spec/helpers/marble-testing.ts @@ -1,8 +1,8 @@ -import { Observable } from 'rxjs'; -import { SubscriptionLog } from '../../src/internal/testing/subscription-logging'; -import { ColdObservable } from '../../src/internal/testing/ColdObservable'; -import { HotObservable } from '../../src/internal/testing/HotObservable'; -import { observableToBeFn, subscriptionLogsToBeFn } from '../../src/internal/testing/TestScheduler'; +import type { Observable } from 'rxjs'; +import type { SubscriptionLog } from '../../src/internal/testing/subscription-logging'; +import type { ColdObservable } from '../../src/internal/testing/ColdObservable'; +import type { HotObservable } from '../../src/internal/testing/HotObservable'; +import type { observableToBeFn, subscriptionLogsToBeFn } from '../../src/internal/testing/TestScheduler'; declare const global: any; diff --git a/packages/rxjs/spec/helpers/subscription.ts b/packages/rxjs/spec/helpers/subscription.ts index 60abf24a0d..bdce60c944 100644 --- a/packages/rxjs/spec/helpers/subscription.ts +++ b/packages/rxjs/spec/helpers/subscription.ts @@ -1,5 +1,5 @@ /** @prettier */ -import { TeardownLogic } from 'rxjs'; +import type { TeardownLogic } from 'rxjs'; export function getRegisteredFinalizers(subscription: any): Exclude[] { if ('_finalizers' in subscription) { diff --git a/packages/rxjs/spec/helpers/test-helper.ts b/packages/rxjs/spec/helpers/test-helper.ts index 3abd7769ed..68423a741e 100644 --- a/packages/rxjs/spec/helpers/test-helper.ts +++ b/packages/rxjs/spec/helpers/test-helper.ts @@ -1,4 +1,5 @@ -import { of, asyncScheduler, Observable, scheduled, ObservableInput } from 'rxjs'; +import type { Observable, ObservableInput } from 'rxjs'; +import { of, asyncScheduler, scheduled } from 'rxjs'; import { iterator } from 'rxjs/internal/symbol/iterator'; if (process && process.on) { diff --git a/packages/rxjs/spec/observables/dom/ajax-spec.ts b/packages/rxjs/spec/observables/dom/ajax-spec.ts index 02bb91ece5..05eebe240f 100644 --- a/packages/rxjs/spec/observables/dom/ajax-spec.ts +++ b/packages/rxjs/spec/observables/dom/ajax-spec.ts @@ -1,7 +1,8 @@ /** @prettier */ import { expect } from 'chai'; import * as sinon from 'sinon'; -import { ajax, AjaxConfig, AjaxResponse, AjaxError, AjaxTimeoutError } from 'rxjs/ajax'; +import type { AjaxConfig, AjaxResponse} from 'rxjs/ajax'; +import { ajax, AjaxError, AjaxTimeoutError } from 'rxjs/ajax'; import { TestScheduler } from 'rxjs/testing'; import { noop } from 'rxjs'; import * as nodeFormData from 'form-data'; diff --git a/packages/rxjs/spec/observables/from-spec.ts b/packages/rxjs/spec/observables/from-spec.ts index a05422541d..decb925f58 100644 --- a/packages/rxjs/spec/observables/from-spec.ts +++ b/packages/rxjs/spec/observables/from-spec.ts @@ -1,7 +1,8 @@ /** @prettier */ import { expect } from 'chai'; import { TestScheduler } from 'rxjs/testing'; -import { of, from, Observer, Subject, noop, Subscription } from 'rxjs'; +import type { Observer, Subscription } from 'rxjs'; +import { of, from, Subject, noop } from 'rxjs'; import { first, concatMap, delay, take, tap } from 'rxjs/operators'; import { ReadableStream } from 'web-streams-polyfill'; import { observableMatcher } from '../helpers/observableMatcher'; diff --git a/packages/rxjs/spec/observables/partition-spec.ts b/packages/rxjs/spec/observables/partition-spec.ts index 4811733e23..80beeca784 100644 --- a/packages/rxjs/spec/observables/partition-spec.ts +++ b/packages/rxjs/spec/observables/partition-spec.ts @@ -1,6 +1,7 @@ /** @prettier */ import { expect } from 'chai'; -import { Observable, partition, of } from 'rxjs'; +import type { Observable} from 'rxjs'; +import { partition, of } from 'rxjs'; import { mergeMap } from 'rxjs/operators'; import { TestScheduler } from 'rxjs/testing'; import { observableMatcher } from '../helpers/observableMatcher'; diff --git a/packages/rxjs/spec/operators/dematerialize-spec.ts b/packages/rxjs/spec/operators/dematerialize-spec.ts index ee0785ab52..bef7cd1eca 100644 --- a/packages/rxjs/spec/operators/dematerialize-spec.ts +++ b/packages/rxjs/spec/operators/dematerialize-spec.ts @@ -1,5 +1,6 @@ import { expect } from 'chai'; -import { of, ObservableNotification, Observable } from 'rxjs'; +import type { ObservableNotification} from 'rxjs'; +import { of, Observable } from 'rxjs'; import { COMPLETE_NOTIFICATION, errorNotification, nextNotification } from 'rxjs/internal/Observable'; import { dematerialize, map, mergeMap, materialize, take } from 'rxjs/operators'; import { TestScheduler } from 'rxjs/testing'; diff --git a/packages/rxjs/spec/operators/every-spec.ts b/packages/rxjs/spec/operators/every-spec.ts index e6526214e4..f747d80184 100644 --- a/packages/rxjs/spec/operators/every-spec.ts +++ b/packages/rxjs/spec/operators/every-spec.ts @@ -1,7 +1,8 @@ import { expect } from 'chai'; import { every, mergeMap } from 'rxjs/operators'; import { TestScheduler } from 'rxjs/testing'; -import { of, Observable, Observer } from 'rxjs'; +import type { Observer } from 'rxjs'; +import { of, Observable } from 'rxjs'; import { observableMatcher } from '../helpers/observableMatcher'; /** @test {every} */ diff --git a/packages/rxjs/spec/operators/expand-spec.ts b/packages/rxjs/spec/operators/expand-spec.ts index fa5b8bd6ce..ccc5d3beaa 100644 --- a/packages/rxjs/spec/operators/expand-spec.ts +++ b/packages/rxjs/spec/operators/expand-spec.ts @@ -1,7 +1,8 @@ import { expect } from 'chai'; import { expand, mergeMap, map, take, toArray } from 'rxjs/operators'; import { TestScheduler } from 'rxjs/testing'; -import { EMPTY, Observable, of, Observer, asapScheduler, asyncScheduler, InteropObservable } from 'rxjs'; +import type { Observer, InteropObservable } from 'rxjs'; +import { EMPTY, Observable, of, asapScheduler, asyncScheduler } from 'rxjs'; import { observableMatcher } from '../helpers/observableMatcher'; /** @test {expand} */ diff --git a/packages/rxjs/spec/operators/groupBy-spec.ts b/packages/rxjs/spec/operators/groupBy-spec.ts index d82ac5426a..c5894c78ea 100644 --- a/packages/rxjs/spec/operators/groupBy-spec.ts +++ b/packages/rxjs/spec/operators/groupBy-spec.ts @@ -1,7 +1,8 @@ import { expect } from 'chai'; import { groupBy, delay, tap, map, take, mergeMap, materialize, skip, ignoreElements } from 'rxjs/operators'; import { TestScheduler } from 'rxjs/testing'; -import { ReplaySubject, of, Observable, Subject, NextNotification, ErrorNotification } from 'rxjs'; +import type { NextNotification, ErrorNotification } from 'rxjs'; +import { ReplaySubject, of, Observable, Subject } from 'rxjs'; import { createNotification } from 'rxjs/internal/Observable'; import { observableMatcher } from '../helpers/observableMatcher'; diff --git a/packages/rxjs/spec/operators/last-spec.ts b/packages/rxjs/spec/operators/last-spec.ts index d9acce1818..2620e4bfee 100644 --- a/packages/rxjs/spec/operators/last-spec.ts +++ b/packages/rxjs/spec/operators/last-spec.ts @@ -1,6 +1,7 @@ import { TestScheduler } from 'rxjs/testing'; import { last, mergeMap } from 'rxjs/operators'; -import { EmptyError, of, from, Observable } from 'rxjs'; +import type { Observable } from 'rxjs'; +import { EmptyError, of, from } from 'rxjs'; import { observableMatcher } from '../helpers/observableMatcher'; /** @test {last} */ diff --git a/packages/rxjs/spec/operators/map-spec.ts b/packages/rxjs/spec/operators/map-spec.ts index aff4e874cc..2783dab074 100644 --- a/packages/rxjs/spec/operators/map-spec.ts +++ b/packages/rxjs/spec/operators/map-spec.ts @@ -1,7 +1,8 @@ import { expect } from 'chai'; import { map, tap, mergeMap, take } from 'rxjs/operators'; import { TestScheduler } from 'rxjs/testing'; -import { of, Observable, identity, Observer } from 'rxjs'; +import type { Observer } from 'rxjs'; +import { of, Observable, identity } from 'rxjs'; import { observableMatcher } from '../helpers/observableMatcher'; // function shortcuts diff --git a/packages/rxjs/spec/operators/retry-spec.ts b/packages/rxjs/spec/operators/retry-spec.ts index 01b0daa233..3a15f7b9eb 100644 --- a/packages/rxjs/spec/operators/retry-spec.ts +++ b/packages/rxjs/spec/operators/retry-spec.ts @@ -1,6 +1,7 @@ import { expect } from 'chai'; import { retry, map, take, mergeMap, concatWith, share } from 'rxjs/operators'; -import { Observable, Observer, defer, range, of, throwError, Subject, timer, EMPTY } from 'rxjs'; +import type { Observer} from 'rxjs'; +import { Observable, defer, range, of, throwError, Subject, timer, EMPTY } from 'rxjs'; import { TestScheduler } from 'rxjs/testing'; import { observableMatcher } from '../helpers/observableMatcher'; diff --git a/packages/rxjs/spec/operators/tap-spec.ts b/packages/rxjs/spec/operators/tap-spec.ts index 9b65168f6f..05c1ca4bf0 100644 --- a/packages/rxjs/spec/operators/tap-spec.ts +++ b/packages/rxjs/spec/operators/tap-spec.ts @@ -1,6 +1,7 @@ import { expect } from 'chai'; import { tap, mergeMap, take } from 'rxjs/operators'; -import { Subject, of, throwError, Observer, EMPTY, Observable, noop } from 'rxjs'; +import type { Observer} from 'rxjs'; +import { Subject, of, throwError, EMPTY, Observable, noop } from 'rxjs'; import { TestScheduler } from 'rxjs/testing'; import { observableMatcher } from '../helpers/observableMatcher'; diff --git a/packages/rxjs/spec/operators/window-spec.ts b/packages/rxjs/spec/operators/window-spec.ts index 929977e04c..fb67cc7bac 100644 --- a/packages/rxjs/spec/operators/window-spec.ts +++ b/packages/rxjs/spec/operators/window-spec.ts @@ -1,6 +1,7 @@ import { window, mergeMap, take } from 'rxjs/operators'; import { TestScheduler } from 'rxjs/testing'; -import { EMPTY, of, Observable, interval } from 'rxjs'; +import type { Observable} from 'rxjs'; +import { EMPTY, of, interval } from 'rxjs'; import { observableMatcher } from '../helpers/observableMatcher'; import { expect } from 'chai'; diff --git a/packages/rxjs/spec/operators/windowTime-spec.ts b/packages/rxjs/spec/operators/windowTime-spec.ts index 52be678fd6..56af0b3c30 100644 --- a/packages/rxjs/spec/operators/windowTime-spec.ts +++ b/packages/rxjs/spec/operators/windowTime-spec.ts @@ -1,6 +1,7 @@ import { windowTime, mergeMap } from 'rxjs/operators'; import { TestScheduler } from 'rxjs/testing'; -import { of, Observable } from 'rxjs'; +import type { Observable } from 'rxjs'; +import { of } from 'rxjs'; import { observableMatcher } from '../helpers/observableMatcher'; /** @test {windowTime} */ diff --git a/packages/rxjs/spec/operators/windowToggle-spec.ts b/packages/rxjs/spec/operators/windowToggle-spec.ts index cbcb6c339b..83f1d87c9e 100644 --- a/packages/rxjs/spec/operators/windowToggle-spec.ts +++ b/packages/rxjs/spec/operators/windowToggle-spec.ts @@ -1,5 +1,6 @@ import { expect } from 'chai'; -import { Observable, NEVER, of, EMPTY } from 'rxjs'; +import type { Observable} from 'rxjs'; +import { NEVER, of, EMPTY } from 'rxjs'; import { windowToggle, tap, mergeMap } from 'rxjs/operators'; import { TestScheduler } from 'rxjs/testing'; import { observableMatcher } from '../helpers/observableMatcher'; diff --git a/packages/rxjs/spec/operators/windowWhen-spec.ts b/packages/rxjs/spec/operators/windowWhen-spec.ts index 75cd43dbfe..5793bd5748 100644 --- a/packages/rxjs/spec/operators/windowWhen-spec.ts +++ b/packages/rxjs/spec/operators/windowWhen-spec.ts @@ -1,5 +1,6 @@ import { windowWhen, mergeMap } from 'rxjs/operators'; -import { Observable, of } from 'rxjs'; +import type { Observable} from 'rxjs'; +import { of } from 'rxjs'; import { TestScheduler } from 'rxjs/testing'; import { observableMatcher } from '../helpers/observableMatcher'; diff --git a/packages/rxjs/spec/schedulers/AnimationFrameScheduler-spec.ts b/packages/rxjs/spec/schedulers/AnimationFrameScheduler-spec.ts index 53b3377659..58e5f1ac51 100644 --- a/packages/rxjs/spec/schedulers/AnimationFrameScheduler-spec.ts +++ b/packages/rxjs/spec/schedulers/AnimationFrameScheduler-spec.ts @@ -1,7 +1,8 @@ /** @prettier */ import { expect } from 'chai'; import * as sinon from 'sinon'; -import { animationFrameScheduler, Subscription, merge } from 'rxjs'; +import type { Subscription} from 'rxjs'; +import { animationFrameScheduler, merge } from 'rxjs'; import { delay } from 'rxjs/operators'; import { TestScheduler } from 'rxjs/testing'; import { observableMatcher } from '../helpers/observableMatcher'; diff --git a/packages/rxjs/spec/schedulers/AsapScheduler-spec.ts b/packages/rxjs/spec/schedulers/AsapScheduler-spec.ts index bedbef2494..71d3a424f1 100644 --- a/packages/rxjs/spec/schedulers/AsapScheduler-spec.ts +++ b/packages/rxjs/spec/schedulers/AsapScheduler-spec.ts @@ -1,7 +1,8 @@ /** @prettier */ import { expect } from 'chai'; import * as sinon from 'sinon'; -import { asapScheduler, Subscription, SchedulerAction, merge } from 'rxjs'; +import type { Subscription, SchedulerAction} from 'rxjs'; +import { asapScheduler, merge } from 'rxjs'; import { delay } from 'rxjs/operators'; import { TestScheduler } from 'rxjs/testing'; import { observableMatcher } from '../helpers/observableMatcher'; diff --git a/packages/rxjs/spec/schedulers/QueueScheduler-spec.ts b/packages/rxjs/spec/schedulers/QueueScheduler-spec.ts index 6f5bd64273..0278677bae 100644 --- a/packages/rxjs/spec/schedulers/QueueScheduler-spec.ts +++ b/packages/rxjs/spec/schedulers/QueueScheduler-spec.ts @@ -1,7 +1,8 @@ /** @prettier */ import { expect } from 'chai'; import * as sinon from 'sinon'; -import { queueScheduler, Subscription, merge } from 'rxjs'; +import type { Subscription} from 'rxjs'; +import { queueScheduler, merge } from 'rxjs'; import { delay } from 'rxjs/operators'; import { TestScheduler } from 'rxjs/testing'; import { observableMatcher } from '../helpers/observableMatcher'; diff --git a/packages/rxjs/spec/schedulers/VirtualTimeScheduler-spec.ts b/packages/rxjs/spec/schedulers/VirtualTimeScheduler-spec.ts index 2b48000417..e5a2f17641 100644 --- a/packages/rxjs/spec/schedulers/VirtualTimeScheduler-spec.ts +++ b/packages/rxjs/spec/schedulers/VirtualTimeScheduler-spec.ts @@ -1,6 +1,7 @@ /** @prettier */ import { expect } from 'chai'; -import { SchedulerAction, VirtualAction, VirtualTimeScheduler } from 'rxjs'; +import type { SchedulerAction} from 'rxjs'; +import { VirtualAction, VirtualTimeScheduler } from 'rxjs'; /** @test {VirtualTimeScheduler} */ describe('VirtualTimeScheduler', () => { diff --git a/packages/rxjs/spec/subjects/AsyncSubject-spec.ts b/packages/rxjs/spec/subjects/AsyncSubject-spec.ts index 62b0c73cb4..59a89f4b68 100644 --- a/packages/rxjs/spec/subjects/AsyncSubject-spec.ts +++ b/packages/rxjs/spec/subjects/AsyncSubject-spec.ts @@ -1,5 +1,6 @@ import { expect } from 'chai'; -import { AsyncSubject, Observer } from 'rxjs'; +import type { Observer } from 'rxjs'; +import { AsyncSubject } from 'rxjs'; class TestObserver implements Observer { results: (number | string)[] = []; diff --git a/packages/rxjs/src/ajax/index.ts b/packages/rxjs/src/ajax/index.ts index a78e530522..e41bcfa3a2 100644 --- a/packages/rxjs/src/ajax/index.ts +++ b/packages/rxjs/src/ajax/index.ts @@ -1,4 +1,4 @@ export { ajax } from '../internal/ajax/ajax.js'; export { AjaxError, AjaxTimeoutError } from '../internal/ajax/errors.js'; export { AjaxResponse } from '../internal/ajax/AjaxResponse.js'; -export { AjaxRequest, AjaxConfig, AjaxDirection } from '../internal/ajax/types.js'; +export type { AjaxRequest, AjaxConfig, AjaxDirection } from '../internal/ajax/types.js'; diff --git a/packages/rxjs/src/index.ts b/packages/rxjs/src/index.ts index 047c2360a0..93912e59fb 100644 --- a/packages/rxjs/src/index.ts +++ b/packages/rxjs/src/index.ts @@ -13,22 +13,12 @@ /* eslint-enable @typescript-eslint/triple-slash-reference */ /* Core */ -export { - Observable, - from, - config, - GlobalConfig, - Subscription, - Subscriber, - SubscriberOverrides, - operate, - UnsubscriptionError, - isObservable, -} from './internal/Observable.js'; +export type { GlobalConfig, SubscriberOverrides } from './internal/Observable.js'; +export { Observable, from, config, Subscription, Subscriber, operate, UnsubscriptionError, isObservable } from './internal/Observable.js'; /* Observables */ -export { GroupedObservable } from './internal/operators/groupBy.js'; -export { Operator } from './internal/Operator.js'; +export type { GroupedObservable } from './internal/operators/groupBy.js'; +export type { Operator } from './internal/Operator.js'; export { animationFrames } from './internal/observable/dom/animationFrames.js'; /* Subjects */ @@ -109,7 +99,8 @@ export { concatAll } from './internal/operators/concatAll.js'; export { concatMap } from './internal/operators/concatMap.js'; export { concatMapTo } from './internal/operators/concatMapTo.js'; export { concatWith } from './internal/operators/concatWith.js'; -export { connect, ConnectConfig } from './internal/operators/connect.js'; +export type { ConnectConfig } from './internal/operators/connect.js'; +export { connect } from './internal/operators/connect.js'; export { count } from './internal/operators/count.js'; export { debounce } from './internal/operators/debounce.js'; export { debounceTime } from './internal/operators/debounceTime.js'; @@ -131,7 +122,8 @@ export { finalize } from './internal/operators/finalize.js'; export { find } from './internal/operators/find.js'; export { findIndex } from './internal/operators/findIndex.js'; export { first } from './internal/operators/first.js'; -export { groupBy, BasicGroupByOptions, GroupByOptionsWithElement } from './internal/operators/groupBy.js'; +export type { BasicGroupByOptions, GroupByOptionsWithElement } from './internal/operators/groupBy.js'; +export { groupBy } from './internal/operators/groupBy.js'; export { ignoreElements } from './internal/operators/ignoreElements.js'; export { isEmpty } from './internal/operators/isEmpty.js'; export { last } from './internal/operators/last.js'; @@ -150,16 +142,20 @@ export { onErrorResumeNextWith } from './internal/operators/onErrorResumeNextWit export { pairwise } from './internal/operators/pairwise.js'; export { raceWith } from './internal/operators/raceWith.js'; export { reduce } from './internal/operators/reduce.js'; -export { repeat, RepeatConfig } from './internal/operators/repeat.js'; +export type { RepeatConfig } from './internal/operators/repeat.js'; +export { repeat } from './internal/operators/repeat.js'; export { repeatWhen } from './internal/operators/repeatWhen.js'; -export { retry, RetryConfig } from './internal/operators/retry.js'; +export type { RetryConfig } from './internal/operators/retry.js'; +export { retry } from './internal/operators/retry.js'; export { retryWhen } from './internal/operators/retryWhen.js'; export { sample } from './internal/operators/sample.js'; export { sampleTime } from './internal/operators/sampleTime.js'; export { scan } from './internal/operators/scan.js'; export { sequenceEqual } from './internal/operators/sequenceEqual.js'; -export { share, ShareConfig } from './internal/operators/share.js'; -export { shareReplay, ShareReplayConfig } from './internal/operators/shareReplay.js'; +export type { ShareConfig } from './internal/operators/share.js'; +export { share } from './internal/operators/share.js'; +export type { ShareReplayConfig } from './internal/operators/shareReplay.js'; +export { shareReplay } from './internal/operators/shareReplay.js'; export { single } from './internal/operators/single.js'; export { skip } from './internal/operators/skip.js'; export { skipLast } from './internal/operators/skipLast.js'; @@ -175,12 +171,15 @@ export { take } from './internal/operators/take.js'; export { takeLast } from './internal/operators/takeLast.js'; export { takeUntil } from './internal/operators/takeUntil.js'; export { takeWhile } from './internal/operators/takeWhile.js'; -export { tap, TapObserver } from './internal/operators/tap.js'; -export { throttle, ThrottleConfig } from './internal/operators/throttle.js'; +export type { TapObserver } from './internal/operators/tap.js'; +export { tap } from './internal/operators/tap.js'; +export type { ThrottleConfig } from './internal/operators/throttle.js'; +export { throttle } from './internal/operators/throttle.js'; export { throttleTime } from './internal/operators/throttleTime.js'; export { throwIfEmpty } from './internal/operators/throwIfEmpty.js'; export { timeInterval } from './internal/operators/timeInterval.js'; -export { timeout, TimeoutConfig, TimeoutInfo } from './internal/operators/timeout.js'; +export type { TimeoutConfig, TimeoutInfo } from './internal/operators/timeout.js'; +export { timeout } from './internal/operators/timeout.js'; export { timeoutWith } from './internal/operators/timeoutWith.js'; export { timestamp } from './internal/operators/timestamp.js'; export { toArray } from './internal/operators/toArray.js'; diff --git a/packages/rxjs/src/internal/AsyncSubject.ts b/packages/rxjs/src/internal/AsyncSubject.ts index ec4eb5e85f..84677b214d 100644 --- a/packages/rxjs/src/internal/AsyncSubject.ts +++ b/packages/rxjs/src/internal/AsyncSubject.ts @@ -1,5 +1,5 @@ import { Subject } from './Subject.js'; -import { Subscriber } from './Observable.js'; +import type { Subscriber } from './Observable.js'; /** * A variant of Subject that only emits a value when it completes. It will emit diff --git a/packages/rxjs/src/internal/BehaviorSubject.ts b/packages/rxjs/src/internal/BehaviorSubject.ts index 4d71b731d3..6014fa5464 100644 --- a/packages/rxjs/src/internal/BehaviorSubject.ts +++ b/packages/rxjs/src/internal/BehaviorSubject.ts @@ -1,5 +1,5 @@ import { Subject } from './Subject.js'; -import { Subscriber, Subscription } from './Observable.js'; +import type { Subscriber, Subscription } from './Observable.js'; /** * A variant of Subject that requires an initial value and emits its current diff --git a/packages/rxjs/src/internal/Notification.ts b/packages/rxjs/src/internal/Notification.ts index 4c72d22dcd..f3799e1a29 100644 --- a/packages/rxjs/src/internal/Notification.ts +++ b/packages/rxjs/src/internal/Notification.ts @@ -1,4 +1,4 @@ -import { PartialObserver, ObservableNotification } from './types.js'; +import type { PartialObserver, ObservableNotification } from './types.js'; /** * Executes the appropriate handler on a passed `observer` given the `kind` of notification. diff --git a/packages/rxjs/src/internal/Observable.ts b/packages/rxjs/src/internal/Observable.ts index 27a20ba758..b7cb6dddde 100644 --- a/packages/rxjs/src/internal/Observable.ts +++ b/packages/rxjs/src/internal/Observable.ts @@ -1,4 +1,4 @@ -import { +import type { TeardownLogic, UnaryFunction, Subscribable, diff --git a/packages/rxjs/src/internal/Operator.ts b/packages/rxjs/src/internal/Operator.ts index c58e118979..b87f862808 100644 --- a/packages/rxjs/src/internal/Operator.ts +++ b/packages/rxjs/src/internal/Operator.ts @@ -1,5 +1,5 @@ -import { Subscriber } from './Observable.js'; -import { TeardownLogic } from './types.js'; +import type { Subscriber } from './Observable.js'; +import type { TeardownLogic } from './types.js'; /*** * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. diff --git a/packages/rxjs/src/internal/ReplaySubject.ts b/packages/rxjs/src/internal/ReplaySubject.ts index e1ed5dc293..ae41584854 100644 --- a/packages/rxjs/src/internal/ReplaySubject.ts +++ b/packages/rxjs/src/internal/ReplaySubject.ts @@ -1,6 +1,6 @@ import { Subject } from './Subject.js'; -import { TimestampProvider } from './types.js'; -import { Subscriber, Subscription } from './Observable.js'; +import type { TimestampProvider } from './types.js'; +import type { Subscriber, Subscription } from './Observable.js'; import { dateTimestampProvider } from './scheduler/dateTimestampProvider.js'; /** diff --git a/packages/rxjs/src/internal/Scheduler.ts b/packages/rxjs/src/internal/Scheduler.ts index fcf6918851..2767ac626f 100644 --- a/packages/rxjs/src/internal/Scheduler.ts +++ b/packages/rxjs/src/internal/Scheduler.ts @@ -1,6 +1,6 @@ -import { Action } from './scheduler/Action.js'; -import { Subscription } from './Observable.js'; -import { SchedulerLike, SchedulerAction } from './types.js'; +import type { Action } from './scheduler/Action.js'; +import type { Subscription } from './Observable.js'; +import type { SchedulerLike, SchedulerAction } from './types.js'; import { dateTimestampProvider } from './scheduler/dateTimestampProvider.js'; /** diff --git a/packages/rxjs/src/internal/Subject.ts b/packages/rxjs/src/internal/Subject.ts index 885981e0bc..a1863b695a 100644 --- a/packages/rxjs/src/internal/Subject.ts +++ b/packages/rxjs/src/internal/Subject.ts @@ -1,5 +1,6 @@ -import { Observable, Subscriber, Subscription } from './Observable.js'; -import { Observer, SubscriptionLike } from './types.js'; +import type { Subscriber} from './Observable.js'; +import { Observable, Subscription } from './Observable.js'; +import type { Observer, SubscriptionLike } from './types.js'; /** * A Subject is a special type of Observable that allows values to be diff --git a/packages/rxjs/src/internal/ajax/AjaxResponse.ts b/packages/rxjs/src/internal/ajax/AjaxResponse.ts index 1531409898..08554068cb 100644 --- a/packages/rxjs/src/internal/ajax/AjaxResponse.ts +++ b/packages/rxjs/src/internal/ajax/AjaxResponse.ts @@ -1,4 +1,4 @@ -import { AjaxRequest, AjaxResponseType } from './types.js'; +import type { AjaxRequest, AjaxResponseType } from './types.js'; /** * A normalized response from an AJAX request. To get the data from the response, diff --git a/packages/rxjs/src/internal/ajax/ajax.ts b/packages/rxjs/src/internal/ajax/ajax.ts index 5b63b95ae2..f416c349ed 100644 --- a/packages/rxjs/src/internal/ajax/ajax.ts +++ b/packages/rxjs/src/internal/ajax/ajax.ts @@ -1,6 +1,6 @@ import { map } from '../operators/map.js'; import { Observable } from '../Observable.js'; -import { AjaxConfig, AjaxRequest, AjaxDirection, ProgressEventType } from './types.js'; +import type { AjaxConfig, AjaxRequest, AjaxDirection, ProgressEventType } from './types.js'; import { AjaxResponse } from './AjaxResponse.js'; import { AjaxTimeoutError, AjaxError } from './errors.js'; diff --git a/packages/rxjs/src/internal/ajax/errors.ts b/packages/rxjs/src/internal/ajax/errors.ts index 3e33a6267b..da7809a2dc 100644 --- a/packages/rxjs/src/internal/ajax/errors.ts +++ b/packages/rxjs/src/internal/ajax/errors.ts @@ -1,4 +1,4 @@ -import { AjaxRequest } from './types.js'; +import type { AjaxRequest } from './types.js'; /** * Thrown when an error occurs during an AJAX request. diff --git a/packages/rxjs/src/internal/ajax/types.ts b/packages/rxjs/src/internal/ajax/types.ts index cc98be863a..2886a04a46 100644 --- a/packages/rxjs/src/internal/ajax/types.ts +++ b/packages/rxjs/src/internal/ajax/types.ts @@ -1,4 +1,4 @@ -import { PartialObserver } from '../types.js'; +import type { PartialObserver } from '../types.js'; /** * Valid Ajax direction types. Prefixes the event `type` in the diff --git a/packages/rxjs/src/internal/firstValueFrom.ts b/packages/rxjs/src/internal/firstValueFrom.ts index 47c12eee1d..bbef65ffb6 100644 --- a/packages/rxjs/src/internal/firstValueFrom.ts +++ b/packages/rxjs/src/internal/firstValueFrom.ts @@ -1,4 +1,5 @@ -import { Observable, Subscriber } from './Observable.js'; +import type { Observable} from './Observable.js'; +import { Subscriber } from './Observable.js'; import { EmptyError } from './util/EmptyError.js'; export interface FirstValueFromConfig { diff --git a/packages/rxjs/src/internal/lastValueFrom.ts b/packages/rxjs/src/internal/lastValueFrom.ts index d768d0e083..901cfa7c10 100644 --- a/packages/rxjs/src/internal/lastValueFrom.ts +++ b/packages/rxjs/src/internal/lastValueFrom.ts @@ -1,4 +1,4 @@ -import { Observable } from './Observable.js'; +import type { Observable } from './Observable.js'; import { EmptyError } from './util/EmptyError.js'; export interface LastValueFromConfig { diff --git a/packages/rxjs/src/internal/observable/bindCallback.ts b/packages/rxjs/src/internal/observable/bindCallback.ts index ae47058555..52e63cc0cb 100644 --- a/packages/rxjs/src/internal/observable/bindCallback.ts +++ b/packages/rxjs/src/internal/observable/bindCallback.ts @@ -1,6 +1,6 @@ /* @prettier */ -import { SchedulerLike } from '../types.js'; -import { Observable } from '../Observable.js'; +import type { SchedulerLike } from '../types.js'; +import type { Observable } from '../Observable.js'; import { bindCallbackInternals } from './bindCallbackInternals.js'; export function bindCallback( diff --git a/packages/rxjs/src/internal/observable/bindCallbackInternals.ts b/packages/rxjs/src/internal/observable/bindCallbackInternals.ts index 1d02077dc0..20be64704a 100644 --- a/packages/rxjs/src/internal/observable/bindCallbackInternals.ts +++ b/packages/rxjs/src/internal/observable/bindCallbackInternals.ts @@ -1,4 +1,4 @@ -import { SchedulerLike } from '../types.js'; +import type { SchedulerLike } from '../types.js'; import { isScheduler } from '../util/isScheduler.js'; import { Observable } from '../Observable.js'; import { subscribeOn } from '../operators/subscribeOn.js'; diff --git a/packages/rxjs/src/internal/observable/bindNodeCallback.ts b/packages/rxjs/src/internal/observable/bindNodeCallback.ts index 8a83824f08..192cdf1eb8 100644 --- a/packages/rxjs/src/internal/observable/bindNodeCallback.ts +++ b/packages/rxjs/src/internal/observable/bindNodeCallback.ts @@ -1,6 +1,6 @@ /* @prettier */ -import { Observable } from '../Observable.js'; -import { SchedulerLike } from '../types.js'; +import type { Observable } from '../Observable.js'; +import type { SchedulerLike } from '../types.js'; import { bindCallbackInternals } from './bindCallbackInternals.js'; export function bindNodeCallback( diff --git a/packages/rxjs/src/internal/observable/combineLatest.ts b/packages/rxjs/src/internal/observable/combineLatest.ts index def916b822..93c8403ac8 100644 --- a/packages/rxjs/src/internal/observable/combineLatest.ts +++ b/packages/rxjs/src/internal/observable/combineLatest.ts @@ -1,9 +1,10 @@ -import { Observable, Subscriber, operate, from } from '../Observable.js'; -import { ObservableInput, ObservedValueOf, ObservableInputTuple } from '../types.js'; +import type { Subscriber} from '../Observable.js'; +import { Observable, operate, from } from '../Observable.js'; +import type { ObservableInput, ObservedValueOf, ObservableInputTuple } from '../types.js'; import { arrayOrObject } from '../util/argsArgArrayOrObject.js'; import { identity } from '../util/identity.js'; import { createObject } from '../util/createObject.js'; -import { AnyCatcher } from '../AnyCatcher.js'; +import type { AnyCatcher } from '../AnyCatcher.js'; import { EMPTY } from './empty.js'; // combineLatest(any) diff --git a/packages/rxjs/src/internal/observable/concat.ts b/packages/rxjs/src/internal/observable/concat.ts index dd30266c36..54f018ff75 100644 --- a/packages/rxjs/src/internal/observable/concat.ts +++ b/packages/rxjs/src/internal/observable/concat.ts @@ -1,5 +1,6 @@ -import { Observable, from } from '../Observable.js'; -import { ObservableInputTuple, SchedulerLike } from '../types.js'; +import type { Observable} from '../Observable.js'; +import { from } from '../Observable.js'; +import type { ObservableInputTuple, SchedulerLike } from '../types.js'; import { concatAll } from '../operators/concatAll.js'; import { popScheduler } from '../util/args.js'; import { scheduled } from '../scheduled/scheduled.js'; diff --git a/packages/rxjs/src/internal/observable/connectable.ts b/packages/rxjs/src/internal/observable/connectable.ts index 2e175ad5e2..0debea3ee4 100644 --- a/packages/rxjs/src/internal/observable/connectable.ts +++ b/packages/rxjs/src/internal/observable/connectable.ts @@ -1,6 +1,7 @@ -import { Connectable, ObservableInput, SubjectLike } from '../types.js'; +import type { Connectable, ObservableInput, SubjectLike } from '../types.js'; import { Subject } from '../Subject.js'; -import { Subscription, Observable } from '../Observable.js'; +import type { Subscription} from '../Observable.js'; +import { Observable } from '../Observable.js'; import { defer } from './defer.js'; export interface ConnectableConfig { diff --git a/packages/rxjs/src/internal/observable/defer.ts b/packages/rxjs/src/internal/observable/defer.ts index 0120e203a2..974dc7c7d3 100644 --- a/packages/rxjs/src/internal/observable/defer.ts +++ b/packages/rxjs/src/internal/observable/defer.ts @@ -1,5 +1,5 @@ import { Observable, from } from '../Observable.js'; -import { ObservedValueOf, ObservableInput } from '../types.js'; +import type { ObservedValueOf, ObservableInput } from '../types.js'; /** * Creates an Observable that, on subscribe, calls an Observable factory to diff --git a/packages/rxjs/src/internal/observable/dom/WebSocketSubject.ts b/packages/rxjs/src/internal/observable/dom/WebSocketSubject.ts index 187c04c63b..09f3990bf4 100644 --- a/packages/rxjs/src/internal/observable/dom/WebSocketSubject.ts +++ b/packages/rxjs/src/internal/observable/dom/WebSocketSubject.ts @@ -1,5 +1,6 @@ -import { Subscriber, Observable, Subscription, operate } from '../../Observable.js'; -import { NextObserver } from '../../types.js'; +import type { Subscriber, Subscription} from '../../Observable.js'; +import { Observable, operate } from '../../Observable.js'; +import type { NextObserver } from '../../types.js'; /** * WebSocketSubjectConfig is a plain Object that allows us to make our diff --git a/packages/rxjs/src/internal/observable/dom/animationFrames.ts b/packages/rxjs/src/internal/observable/dom/animationFrames.ts index afd0ddeee4..d69980b788 100644 --- a/packages/rxjs/src/internal/observable/dom/animationFrames.ts +++ b/packages/rxjs/src/internal/observable/dom/animationFrames.ts @@ -1,5 +1,5 @@ import { Observable } from '../../Observable.js'; -import { TimestampProvider } from '../../types.js'; +import type { TimestampProvider } from '../../types.js'; import { performanceTimestampProvider } from '../../scheduler/performanceTimestampProvider.js'; import { animationFrameProvider } from '../../scheduler/animationFrameProvider.js'; diff --git a/packages/rxjs/src/internal/observable/dom/fetch.ts b/packages/rxjs/src/internal/observable/dom/fetch.ts index cedb2cf019..8a33a02b82 100644 --- a/packages/rxjs/src/internal/observable/dom/fetch.ts +++ b/packages/rxjs/src/internal/observable/dom/fetch.ts @@ -1,5 +1,5 @@ import { operate, Observable, from } from '../../Observable.js'; -import { ObservableInput } from '../../types.js'; +import type { ObservableInput } from '../../types.js'; export function fromFetch( input: string | Request, diff --git a/packages/rxjs/src/internal/observable/dom/webSocket.ts b/packages/rxjs/src/internal/observable/dom/webSocket.ts index 02bd79fedb..a4c10773b8 100644 --- a/packages/rxjs/src/internal/observable/dom/webSocket.ts +++ b/packages/rxjs/src/internal/observable/dom/webSocket.ts @@ -1,4 +1,5 @@ -import { WebSocketSubject, WebSocketSubjectConfig } from './WebSocketSubject.js'; +import type { WebSocketSubjectConfig } from './WebSocketSubject.js'; +import { WebSocketSubject } from './WebSocketSubject.js'; /** * Wrapper around the w3c-compatible WebSocket object provided by the browser. diff --git a/packages/rxjs/src/internal/observable/forkJoin.ts b/packages/rxjs/src/internal/observable/forkJoin.ts index 140c35e61b..71b5493e5a 100644 --- a/packages/rxjs/src/internal/observable/forkJoin.ts +++ b/packages/rxjs/src/internal/observable/forkJoin.ts @@ -1,10 +1,10 @@ import { Observable, from, operate } from '../Observable.js'; -import { ObservedValueOf, ObservableInputTuple, ObservableInput } from '../types.js'; +import type { ObservedValueOf, ObservableInputTuple, ObservableInput } from '../types.js'; import { argsArgArrayOrObject } from '../util/argsArgArrayOrObject.js'; import { popResultSelector } from '../util/args.js'; import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs.js'; import { createObject } from '../util/createObject.js'; -import { AnyCatcher } from '../AnyCatcher.js'; +import type { AnyCatcher } from '../AnyCatcher.js'; import { EmptyError } from '../util/EmptyError.js'; // forkJoin(any) diff --git a/packages/rxjs/src/internal/observable/fromEvent.ts b/packages/rxjs/src/internal/observable/fromEvent.ts index 016734fb03..ce9f0e0eda 100644 --- a/packages/rxjs/src/internal/observable/fromEvent.ts +++ b/packages/rxjs/src/internal/observable/fromEvent.ts @@ -1,4 +1,5 @@ -import { Observable, Subscriber, isArrayLike, isFunction } from '../Observable.js'; +import type { Subscriber} from '../Observable.js'; +import { Observable, isArrayLike, isFunction } from '../Observable.js'; import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs.js'; // These constants are used to create handler registry functions using array mapping below. diff --git a/packages/rxjs/src/internal/observable/fromEventPattern.ts b/packages/rxjs/src/internal/observable/fromEventPattern.ts index b56848a05a..e2ecd7dfa0 100644 --- a/packages/rxjs/src/internal/observable/fromEventPattern.ts +++ b/packages/rxjs/src/internal/observable/fromEventPattern.ts @@ -1,5 +1,5 @@ import { Observable, isFunction } from '../Observable.js'; -import { NodeEventHandler } from './fromEvent.js'; +import type { NodeEventHandler } from './fromEvent.js'; import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs.js'; export function fromEventPattern( diff --git a/packages/rxjs/src/internal/observable/fromSubscribable.ts b/packages/rxjs/src/internal/observable/fromSubscribable.ts index 3a382eccd1..d3337d716a 100644 --- a/packages/rxjs/src/internal/observable/fromSubscribable.ts +++ b/packages/rxjs/src/internal/observable/fromSubscribable.ts @@ -1,5 +1,6 @@ -import { Observable, Subscriber } from '../Observable.js'; -import { Subscribable } from '../types.js'; +import type { Subscriber } from '../Observable.js'; +import { Observable } from '../Observable.js'; +import type { Subscribable } from '../types.js'; /** * Used to convert a subscribable to an observable. diff --git a/packages/rxjs/src/internal/observable/generate.ts b/packages/rxjs/src/internal/observable/generate.ts index 1018d8e510..4d0ba0da0b 100644 --- a/packages/rxjs/src/internal/observable/generate.ts +++ b/packages/rxjs/src/internal/observable/generate.ts @@ -1,6 +1,6 @@ -import { Observable } from '../Observable.js'; +import type { Observable } from '../Observable.js'; import { identity } from '../util/identity.js'; -import { ObservableInput, SchedulerLike } from '../types.js'; +import type { ObservableInput, SchedulerLike } from '../types.js'; import { isScheduler } from '../util/isScheduler.js'; import { defer } from './defer.js'; import { scheduleIterable } from '../scheduled/scheduleIterable.js'; diff --git a/packages/rxjs/src/internal/observable/iif.ts b/packages/rxjs/src/internal/observable/iif.ts index 4a476bfdd9..7b2e298aec 100644 --- a/packages/rxjs/src/internal/observable/iif.ts +++ b/packages/rxjs/src/internal/observable/iif.ts @@ -1,6 +1,6 @@ -import { Observable } from '../Observable.js'; +import type { Observable } from '../Observable.js'; import { defer } from './defer.js'; -import { ObservableInput } from '../types.js'; +import type { ObservableInput } from '../types.js'; /** * Checks a boolean at subscription time, and chooses between one of two observable sources diff --git a/packages/rxjs/src/internal/observable/interval.ts b/packages/rxjs/src/internal/observable/interval.ts index aaa846f987..f28fe3731a 100644 --- a/packages/rxjs/src/internal/observable/interval.ts +++ b/packages/rxjs/src/internal/observable/interval.ts @@ -1,6 +1,6 @@ -import { Observable } from '../Observable.js'; +import type { Observable } from '../Observable.js'; import { asyncScheduler } from '../scheduler/async.js'; -import { SchedulerLike } from '../types.js'; +import type { SchedulerLike } from '../types.js'; import { timer } from './timer.js'; /** diff --git a/packages/rxjs/src/internal/observable/merge.ts b/packages/rxjs/src/internal/observable/merge.ts index e7ea01cf0c..527feb52d4 100644 --- a/packages/rxjs/src/internal/observable/merge.ts +++ b/packages/rxjs/src/internal/observable/merge.ts @@ -1,5 +1,6 @@ -import { Observable, from } from '../Observable.js'; -import { ObservableInput, ObservableInputTuple, SchedulerLike } from '../types.js'; +import type { Observable} from '../Observable.js'; +import { from } from '../Observable.js'; +import type { ObservableInput, ObservableInputTuple, SchedulerLike } from '../types.js'; import { mergeAll } from '../operators/mergeAll.js'; import { EMPTY } from './empty.js'; import { popNumber, popScheduler } from '../util/args.js'; diff --git a/packages/rxjs/src/internal/observable/of.ts b/packages/rxjs/src/internal/observable/of.ts index 8126750902..821b0ac976 100644 --- a/packages/rxjs/src/internal/observable/of.ts +++ b/packages/rxjs/src/internal/observable/of.ts @@ -1,5 +1,6 @@ -import { ValueFromArray } from '../types.js'; -import { Observable, fromArrayLike } from '../Observable.js'; +import type { ValueFromArray } from '../types.js'; +import type { Observable} from '../Observable.js'; +import { fromArrayLike } from '../Observable.js'; // Devs are more likely to pass null or undefined than they are a scheduler // without accompanying values. To make things easier for (naughty) devs who diff --git a/packages/rxjs/src/internal/observable/onErrorResumeNext.ts b/packages/rxjs/src/internal/observable/onErrorResumeNext.ts index 25cf06d3b1..a2f00d2e01 100644 --- a/packages/rxjs/src/internal/observable/onErrorResumeNext.ts +++ b/packages/rxjs/src/internal/observable/onErrorResumeNext.ts @@ -1,5 +1,5 @@ import { Observable, operate, from } from '../Observable.js'; -import { ObservableInputTuple } from '../types.js'; +import type { ObservableInputTuple } from '../types.js'; import { argsOrArgArray } from '../util/argsOrArgArray.js'; import { noop } from '../util/noop.js'; diff --git a/packages/rxjs/src/internal/observable/partition.ts b/packages/rxjs/src/internal/observable/partition.ts index 9c5ffcfbdc..05e01754a1 100644 --- a/packages/rxjs/src/internal/observable/partition.ts +++ b/packages/rxjs/src/internal/observable/partition.ts @@ -1,7 +1,8 @@ import { not } from '../util/not.js'; import { filter } from '../operators/filter.js'; -import { ObservableInput } from '../types.js'; -import { Observable, from } from '../Observable.js'; +import type { ObservableInput } from '../types.js'; +import type { Observable} from '../Observable.js'; +import { from } from '../Observable.js'; /** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ export function partition( diff --git a/packages/rxjs/src/internal/observable/race.ts b/packages/rxjs/src/internal/observable/race.ts index 136404cd48..7c073786ea 100644 --- a/packages/rxjs/src/internal/observable/race.ts +++ b/packages/rxjs/src/internal/observable/race.ts @@ -1,5 +1,6 @@ -import { Observable, from, Subscription, Subscriber, operate } from '../Observable.js'; -import { ObservableInput, ObservableInputTuple } from '../types.js'; +import type { Subscription, Subscriber} from '../Observable.js'; +import { Observable, from, operate } from '../Observable.js'; +import type { ObservableInput, ObservableInputTuple } from '../types.js'; import { argsOrArgArray } from '../util/argsOrArgArray.js'; export function race(inputs: [...ObservableInputTuple]): Observable; diff --git a/packages/rxjs/src/internal/observable/range.ts b/packages/rxjs/src/internal/observable/range.ts index 7560bac153..e3fea50c0e 100644 --- a/packages/rxjs/src/internal/observable/range.ts +++ b/packages/rxjs/src/internal/observable/range.ts @@ -1,4 +1,4 @@ -import { SchedulerLike } from '../types.js'; +import type { SchedulerLike } from '../types.js'; import { Observable } from '../Observable.js'; import { EMPTY } from './empty.js'; diff --git a/packages/rxjs/src/internal/observable/timer.ts b/packages/rxjs/src/internal/observable/timer.ts index 12413b3623..5d66c494aa 100644 --- a/packages/rxjs/src/internal/observable/timer.ts +++ b/packages/rxjs/src/internal/observable/timer.ts @@ -1,5 +1,5 @@ import { Observable } from '../Observable.js'; -import { SchedulerLike } from '../types.js'; +import type { SchedulerLike } from '../types.js'; import { asyncScheduler } from '../scheduler/async.js'; import { isScheduler } from '../util/isScheduler.js'; import { isValidDate } from '../util/isDate.js'; diff --git a/packages/rxjs/src/internal/observable/using.ts b/packages/rxjs/src/internal/observable/using.ts index 882153621b..e88bde75d1 100644 --- a/packages/rxjs/src/internal/observable/using.ts +++ b/packages/rxjs/src/internal/observable/using.ts @@ -1,5 +1,5 @@ import { Observable, from } from '../Observable.js'; -import { Unsubscribable, ObservableInput, ObservedValueOf } from '../types.js'; +import type { Unsubscribable, ObservableInput, ObservedValueOf } from '../types.js'; import { EMPTY } from './empty.js'; /** diff --git a/packages/rxjs/src/internal/observable/zip.ts b/packages/rxjs/src/internal/observable/zip.ts index 48c05f9c00..fc559f7085 100644 --- a/packages/rxjs/src/internal/observable/zip.ts +++ b/packages/rxjs/src/internal/observable/zip.ts @@ -1,5 +1,5 @@ import { Observable, from, operate } from '../Observable.js'; -import { ObservableInputTuple } from '../types.js'; +import type { ObservableInputTuple } from '../types.js'; import { argsOrArgArray } from '../util/argsOrArgArray.js'; import { EMPTY } from './empty.js'; import { popResultSelector } from '../util/args.js'; diff --git a/packages/rxjs/src/internal/operators/audit.ts b/packages/rxjs/src/internal/operators/audit.ts index 79474ed8bf..a0b661f7b1 100644 --- a/packages/rxjs/src/internal/operators/audit.ts +++ b/packages/rxjs/src/internal/operators/audit.ts @@ -1,5 +1,6 @@ -import { Subscriber, operate, Observable, from } from '../Observable.js'; -import { MonoTypeOperatorFunction, ObservableInput } from '../types.js'; +import type { Subscriber} from '../Observable.js'; +import { operate, Observable, from } from '../Observable.js'; +import type { MonoTypeOperatorFunction, ObservableInput } from '../types.js'; /** * Ignores source values for a duration determined by another Observable, then diff --git a/packages/rxjs/src/internal/operators/auditTime.ts b/packages/rxjs/src/internal/operators/auditTime.ts index 80b096b5ce..5fcd87689c 100644 --- a/packages/rxjs/src/internal/operators/auditTime.ts +++ b/packages/rxjs/src/internal/operators/auditTime.ts @@ -1,7 +1,7 @@ import { asyncScheduler } from '../scheduler/async.js'; import { audit } from './audit.js'; import { timer } from '../observable/timer.js'; -import { MonoTypeOperatorFunction, SchedulerLike } from '../types.js'; +import type { MonoTypeOperatorFunction, SchedulerLike } from '../types.js'; /** * Ignores source values for `duration` milliseconds, then emits the most recent diff --git a/packages/rxjs/src/internal/operators/buffer.ts b/packages/rxjs/src/internal/operators/buffer.ts index 11d2bc6b6d..041b1f22b2 100644 --- a/packages/rxjs/src/internal/operators/buffer.ts +++ b/packages/rxjs/src/internal/operators/buffer.ts @@ -1,4 +1,4 @@ -import { OperatorFunction, ObservableInput } from '../types.js'; +import type { OperatorFunction, ObservableInput } from '../types.js'; import { Observable, operate, from } from '../Observable.js'; import { noop } from '../util/noop.js'; diff --git a/packages/rxjs/src/internal/operators/bufferCount.ts b/packages/rxjs/src/internal/operators/bufferCount.ts index 70127f2d51..7defa6a056 100644 --- a/packages/rxjs/src/internal/operators/bufferCount.ts +++ b/packages/rxjs/src/internal/operators/bufferCount.ts @@ -1,4 +1,4 @@ -import { OperatorFunction } from '../types.js'; +import type { OperatorFunction } from '../types.js'; import { Observable, operate } from '../Observable.js'; import { arrRemove } from '../util/arrRemove.js'; diff --git a/packages/rxjs/src/internal/operators/bufferTime.ts b/packages/rxjs/src/internal/operators/bufferTime.ts index 4bf268d35e..a920d87a93 100644 --- a/packages/rxjs/src/internal/operators/bufferTime.ts +++ b/packages/rxjs/src/internal/operators/bufferTime.ts @@ -1,5 +1,5 @@ import { Subscription, Observable, operate } from '../Observable.js'; -import { OperatorFunction, SchedulerLike } from '../types.js'; +import type { OperatorFunction, SchedulerLike } from '../types.js'; import { arrRemove } from '../util/arrRemove.js'; import { asyncScheduler } from '../scheduler/async.js'; import { popScheduler } from '../util/args.js'; diff --git a/packages/rxjs/src/internal/operators/bufferToggle.ts b/packages/rxjs/src/internal/operators/bufferToggle.ts index ffce91a9c0..3662ec8ccb 100644 --- a/packages/rxjs/src/internal/operators/bufferToggle.ts +++ b/packages/rxjs/src/internal/operators/bufferToggle.ts @@ -1,5 +1,5 @@ import { Subscription, Observable, operate, from } from '../Observable.js'; -import { OperatorFunction, ObservableInput } from '../types.js'; +import type { OperatorFunction, ObservableInput } from '../types.js'; import { noop } from '../util/noop.js'; import { arrRemove } from '../util/arrRemove.js'; diff --git a/packages/rxjs/src/internal/operators/bufferWhen.ts b/packages/rxjs/src/internal/operators/bufferWhen.ts index e24a15f87c..b948607669 100644 --- a/packages/rxjs/src/internal/operators/bufferWhen.ts +++ b/packages/rxjs/src/internal/operators/bufferWhen.ts @@ -1,5 +1,6 @@ -import { Subscriber, operate, Observable, from } from '../Observable.js'; -import { ObservableInput, OperatorFunction } from '../types.js'; +import type { Subscriber} from '../Observable.js'; +import { operate, Observable, from } from '../Observable.js'; +import type { ObservableInput, OperatorFunction } from '../types.js'; import { noop } from '../util/noop.js'; /** diff --git a/packages/rxjs/src/internal/operators/catchError.ts b/packages/rxjs/src/internal/operators/catchError.ts index e8ba91bb97..b45557183a 100644 --- a/packages/rxjs/src/internal/operators/catchError.ts +++ b/packages/rxjs/src/internal/operators/catchError.ts @@ -1,5 +1,6 @@ -import { Observable, Subscription, operate, from } from '../Observable.js'; -import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types.js'; +import type { Subscription} from '../Observable.js'; +import { Observable, operate, from } from '../Observable.js'; +import type { ObservableInput, OperatorFunction, ObservedValueOf } from '../types.js'; export function catchError>( selector: (err: any, caught: Observable) => O diff --git a/packages/rxjs/src/internal/operators/combineLatestAll.ts b/packages/rxjs/src/internal/operators/combineLatestAll.ts index 5eb022d3cb..d3ec6bb8a9 100644 --- a/packages/rxjs/src/internal/operators/combineLatestAll.ts +++ b/packages/rxjs/src/internal/operators/combineLatestAll.ts @@ -1,5 +1,5 @@ import { combineLatest } from '../observable/combineLatest.js'; -import { OperatorFunction, ObservableInput } from '../types.js'; +import type { OperatorFunction, ObservableInput } from '../types.js'; import { joinAllInternals } from './joinAllInternals.js'; export function combineLatestAll(): OperatorFunction, T[]>; diff --git a/packages/rxjs/src/internal/operators/combineLatestWith.ts b/packages/rxjs/src/internal/operators/combineLatestWith.ts index 31085f394b..d185213e97 100644 --- a/packages/rxjs/src/internal/operators/combineLatestWith.ts +++ b/packages/rxjs/src/internal/operators/combineLatestWith.ts @@ -1,6 +1,6 @@ import { combineLatestInit } from '../observable/combineLatest.js'; import { Observable } from '../Observable.js'; -import { Cons, ObservableInputTuple, OperatorFunction } from '../types.js'; +import type { Cons, ObservableInputTuple, OperatorFunction } from '../types.js'; /** * Create an observable that combines the latest values from all passed observables and the source diff --git a/packages/rxjs/src/internal/operators/concatAll.ts b/packages/rxjs/src/internal/operators/concatAll.ts index 2ba28a9e43..fcd8a8909d 100644 --- a/packages/rxjs/src/internal/operators/concatAll.ts +++ b/packages/rxjs/src/internal/operators/concatAll.ts @@ -1,5 +1,5 @@ import { mergeAll } from './mergeAll.js'; -import { OperatorFunction, ObservableInput, ObservedValueOf } from '../types.js'; +import type { OperatorFunction, ObservableInput, ObservedValueOf } from '../types.js'; /** * Converts a higher-order Observable into a first-order Observable by diff --git a/packages/rxjs/src/internal/operators/concatMap.ts b/packages/rxjs/src/internal/operators/concatMap.ts index 9d53481a7b..7763595610 100644 --- a/packages/rxjs/src/internal/operators/concatMap.ts +++ b/packages/rxjs/src/internal/operators/concatMap.ts @@ -1,5 +1,5 @@ import { mergeMap } from './mergeMap.js'; -import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types.js'; +import type { ObservableInput, OperatorFunction, ObservedValueOf } from '../types.js'; /** * Projects each source value to an Observable which is merged in the output diff --git a/packages/rxjs/src/internal/operators/concatMapTo.ts b/packages/rxjs/src/internal/operators/concatMapTo.ts index d527e97c14..2d47040cc9 100644 --- a/packages/rxjs/src/internal/operators/concatMapTo.ts +++ b/packages/rxjs/src/internal/operators/concatMapTo.ts @@ -1,5 +1,5 @@ import { concatMap } from './concatMap.js'; -import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types.js'; +import type { ObservableInput, OperatorFunction, ObservedValueOf } from '../types.js'; /** * Projects each source value to the same Observable which is merged multiple diff --git a/packages/rxjs/src/internal/operators/concatWith.ts b/packages/rxjs/src/internal/operators/concatWith.ts index 234aec1f70..c57e488107 100644 --- a/packages/rxjs/src/internal/operators/concatWith.ts +++ b/packages/rxjs/src/internal/operators/concatWith.ts @@ -1,4 +1,4 @@ -import { ObservableInputTuple, OperatorFunction } from '../types.js'; +import type { ObservableInputTuple, OperatorFunction } from '../types.js'; import { Observable, from } from '../Observable.js'; import { concatAll } from '../operators/concatAll.js'; diff --git a/packages/rxjs/src/internal/operators/connect.ts b/packages/rxjs/src/internal/operators/connect.ts index 0c122f8f96..06e357c498 100644 --- a/packages/rxjs/src/internal/operators/connect.ts +++ b/packages/rxjs/src/internal/operators/connect.ts @@ -1,4 +1,4 @@ -import { OperatorFunction, ObservableInput, ObservedValueOf, SubjectLike } from '../types.js'; +import type { OperatorFunction, ObservableInput, ObservedValueOf, SubjectLike } from '../types.js'; import { Observable, from } from '../Observable.js'; import { Subject } from '../Subject.js'; import { fromSubscribable } from '../observable/fromSubscribable.js'; diff --git a/packages/rxjs/src/internal/operators/count.ts b/packages/rxjs/src/internal/operators/count.ts index 30a4f1263e..7517bee823 100644 --- a/packages/rxjs/src/internal/operators/count.ts +++ b/packages/rxjs/src/internal/operators/count.ts @@ -1,4 +1,4 @@ -import { OperatorFunction } from '../types.js'; +import type { OperatorFunction } from '../types.js'; import { reduce } from './reduce.js'; /** diff --git a/packages/rxjs/src/internal/operators/debounce.ts b/packages/rxjs/src/internal/operators/debounce.ts index 8da24514f9..46805af6be 100644 --- a/packages/rxjs/src/internal/operators/debounce.ts +++ b/packages/rxjs/src/internal/operators/debounce.ts @@ -1,5 +1,6 @@ -import { Subscriber, operate, Observable, from } from '../Observable.js'; -import { MonoTypeOperatorFunction, ObservableInput } from '../types.js'; +import type { Subscriber} from '../Observable.js'; +import { operate, Observable, from } from '../Observable.js'; +import type { MonoTypeOperatorFunction, ObservableInput } from '../types.js'; import { noop } from '../util/noop.js'; /** diff --git a/packages/rxjs/src/internal/operators/debounceTime.ts b/packages/rxjs/src/internal/operators/debounceTime.ts index c0d5ebce4b..5381a777d5 100644 --- a/packages/rxjs/src/internal/operators/debounceTime.ts +++ b/packages/rxjs/src/internal/operators/debounceTime.ts @@ -1,6 +1,7 @@ import { asyncScheduler } from '../scheduler/async.js'; -import { Subscription, Observable, operate } from '../Observable.js'; -import { MonoTypeOperatorFunction, SchedulerAction, SchedulerLike } from '../types.js'; +import type { Subscription} from '../Observable.js'; +import { Observable, operate } from '../Observable.js'; +import type { MonoTypeOperatorFunction, SchedulerAction, SchedulerLike } from '../types.js'; /** * Emits a notification from the source Observable only after a particular time span diff --git a/packages/rxjs/src/internal/operators/defaultIfEmpty.ts b/packages/rxjs/src/internal/operators/defaultIfEmpty.ts index 509ca7885b..a92257f7e6 100644 --- a/packages/rxjs/src/internal/operators/defaultIfEmpty.ts +++ b/packages/rxjs/src/internal/operators/defaultIfEmpty.ts @@ -1,4 +1,4 @@ -import { OperatorFunction } from '../types.js'; +import type { OperatorFunction } from '../types.js'; import { Observable, operate } from '../Observable.js'; /** diff --git a/packages/rxjs/src/internal/operators/delay.ts b/packages/rxjs/src/internal/operators/delay.ts index c4aaeae71a..b1608c2abd 100644 --- a/packages/rxjs/src/internal/operators/delay.ts +++ b/packages/rxjs/src/internal/operators/delay.ts @@ -1,5 +1,5 @@ import { asyncScheduler } from '../scheduler/async.js'; -import { MonoTypeOperatorFunction, SchedulerLike } from '../types.js'; +import type { MonoTypeOperatorFunction, SchedulerLike } from '../types.js'; import { delayWhen } from './delayWhen.js'; import { timer } from '../observable/timer.js'; diff --git a/packages/rxjs/src/internal/operators/delayWhen.ts b/packages/rxjs/src/internal/operators/delayWhen.ts index 2f0522650e..791c2048df 100644 --- a/packages/rxjs/src/internal/operators/delayWhen.ts +++ b/packages/rxjs/src/internal/operators/delayWhen.ts @@ -1,5 +1,6 @@ -import { Observable, from } from '../Observable.js'; -import { MonoTypeOperatorFunction, ObservableInput } from '../types.js'; +import type { Observable} from '../Observable.js'; +import { from } from '../Observable.js'; +import type { MonoTypeOperatorFunction, ObservableInput } from '../types.js'; import { concat } from '../observable/concat.js'; import { take } from './take.js'; import { ignoreElements } from './ignoreElements.js'; diff --git a/packages/rxjs/src/internal/operators/dematerialize.ts b/packages/rxjs/src/internal/operators/dematerialize.ts index 8475be9182..bed5f22604 100644 --- a/packages/rxjs/src/internal/operators/dematerialize.ts +++ b/packages/rxjs/src/internal/operators/dematerialize.ts @@ -1,5 +1,5 @@ import { observeNotification } from '../Notification.js'; -import { OperatorFunction, ObservableNotification, ValueFromNotification } from '../types.js'; +import type { OperatorFunction, ObservableNotification, ValueFromNotification } from '../types.js'; import { Observable, operate } from '../Observable.js'; /** diff --git a/packages/rxjs/src/internal/operators/distinct.ts b/packages/rxjs/src/internal/operators/distinct.ts index fbf6d63be5..440ad4602f 100644 --- a/packages/rxjs/src/internal/operators/distinct.ts +++ b/packages/rxjs/src/internal/operators/distinct.ts @@ -1,4 +1,4 @@ -import { MonoTypeOperatorFunction, ObservableInput } from '../types.js'; +import type { MonoTypeOperatorFunction, ObservableInput } from '../types.js'; import { Observable, operate, from } from '../Observable.js'; import { noop } from '../util/noop.js'; diff --git a/packages/rxjs/src/internal/operators/distinctUntilChanged.ts b/packages/rxjs/src/internal/operators/distinctUntilChanged.ts index ad27f5e726..57fe25e35b 100644 --- a/packages/rxjs/src/internal/operators/distinctUntilChanged.ts +++ b/packages/rxjs/src/internal/operators/distinctUntilChanged.ts @@ -1,4 +1,4 @@ -import { MonoTypeOperatorFunction } from '../types.js'; +import type { MonoTypeOperatorFunction } from '../types.js'; import { identity } from '../util/identity.js'; import { Observable, operate } from '../Observable.js'; diff --git a/packages/rxjs/src/internal/operators/distinctUntilKeyChanged.ts b/packages/rxjs/src/internal/operators/distinctUntilKeyChanged.ts index 439870fe37..fc0f39571e 100644 --- a/packages/rxjs/src/internal/operators/distinctUntilKeyChanged.ts +++ b/packages/rxjs/src/internal/operators/distinctUntilKeyChanged.ts @@ -1,5 +1,5 @@ import { distinctUntilChanged } from './distinctUntilChanged.js'; -import { MonoTypeOperatorFunction } from '../types.js'; +import type { MonoTypeOperatorFunction } from '../types.js'; export function distinctUntilKeyChanged(key: keyof T): MonoTypeOperatorFunction; export function distinctUntilKeyChanged(key: K, compare: (x: T[K], y: T[K]) => boolean): MonoTypeOperatorFunction; diff --git a/packages/rxjs/src/internal/operators/elementAt.ts b/packages/rxjs/src/internal/operators/elementAt.ts index e902914270..7c95225a91 100644 --- a/packages/rxjs/src/internal/operators/elementAt.ts +++ b/packages/rxjs/src/internal/operators/elementAt.ts @@ -1,6 +1,6 @@ import { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError.js'; -import { Observable } from '../Observable.js'; -import { OperatorFunction } from '../types.js'; +import type { Observable } from '../Observable.js'; +import type { OperatorFunction } from '../types.js'; import { filter } from './filter.js'; import { throwIfEmpty } from './throwIfEmpty.js'; import { defaultIfEmpty } from './defaultIfEmpty.js'; diff --git a/packages/rxjs/src/internal/operators/endWith.ts b/packages/rxjs/src/internal/operators/endWith.ts index 4cea94614d..f50ab16563 100644 --- a/packages/rxjs/src/internal/operators/endWith.ts +++ b/packages/rxjs/src/internal/operators/endWith.ts @@ -1,6 +1,6 @@ /** prettier */ import { Observable, operate, subscribeToArray } from '../Observable.js'; -import { OperatorFunction, ValueFromArray } from '../types.js'; +import type { OperatorFunction, ValueFromArray } from '../types.js'; /** * Returns an observable that will emit all values from the source, then synchronously emit diff --git a/packages/rxjs/src/internal/operators/every.ts b/packages/rxjs/src/internal/operators/every.ts index ce73254e6e..424df0a3ee 100644 --- a/packages/rxjs/src/internal/operators/every.ts +++ b/packages/rxjs/src/internal/operators/every.ts @@ -1,5 +1,5 @@ import { Observable, operate } from '../Observable.js'; -import { Falsy, OperatorFunction } from '../types.js'; +import type { Falsy, OperatorFunction } from '../types.js'; export function every(predicate: BooleanConstructor): OperatorFunction extends never ? false : boolean>; /** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ diff --git a/packages/rxjs/src/internal/operators/exhaustAll.ts b/packages/rxjs/src/internal/operators/exhaustAll.ts index fb1d07d67b..222ff986fe 100644 --- a/packages/rxjs/src/internal/operators/exhaustAll.ts +++ b/packages/rxjs/src/internal/operators/exhaustAll.ts @@ -1,4 +1,4 @@ -import { OperatorFunction, ObservableInput, ObservedValueOf } from '../types.js'; +import type { OperatorFunction, ObservableInput, ObservedValueOf } from '../types.js'; import { exhaustMap } from './exhaustMap.js'; import { identity } from '../util/identity.js'; diff --git a/packages/rxjs/src/internal/operators/exhaustMap.ts b/packages/rxjs/src/internal/operators/exhaustMap.ts index 454feea5d1..2fd2ab9415 100644 --- a/packages/rxjs/src/internal/operators/exhaustMap.ts +++ b/packages/rxjs/src/internal/operators/exhaustMap.ts @@ -1,5 +1,6 @@ -import { Subscriber, operate, from, Observable } from '../Observable.js'; -import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types.js'; +import type { Subscriber} from '../Observable.js'; +import { operate, from, Observable } from '../Observable.js'; +import type { ObservableInput, OperatorFunction, ObservedValueOf } from '../types.js'; /** * Projects each source value to an Observable which is merged in the output diff --git a/packages/rxjs/src/internal/operators/expand.ts b/packages/rxjs/src/internal/operators/expand.ts index 19d40e1ba3..34fd205491 100644 --- a/packages/rxjs/src/internal/operators/expand.ts +++ b/packages/rxjs/src/internal/operators/expand.ts @@ -1,4 +1,4 @@ -import { OperatorFunction, ObservableInput, ObservedValueOf, SchedulerLike } from '../types.js'; +import type { OperatorFunction, ObservableInput, ObservedValueOf, SchedulerLike } from '../types.js'; import { Observable } from '../Observable.js'; import { mergeInternals } from './mergeInternals.js'; diff --git a/packages/rxjs/src/internal/operators/filter.ts b/packages/rxjs/src/internal/operators/filter.ts index a17ebf16f2..4c99edfdca 100644 --- a/packages/rxjs/src/internal/operators/filter.ts +++ b/packages/rxjs/src/internal/operators/filter.ts @@ -1,4 +1,4 @@ -import { OperatorFunction, MonoTypeOperatorFunction, TruthyTypesOf } from '../types.js'; +import type { OperatorFunction, MonoTypeOperatorFunction, TruthyTypesOf } from '../types.js'; import { Observable, operate } from '../Observable.js'; /** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ diff --git a/packages/rxjs/src/internal/operators/finalize.ts b/packages/rxjs/src/internal/operators/finalize.ts index 89587e03e1..2577423b94 100644 --- a/packages/rxjs/src/internal/operators/finalize.ts +++ b/packages/rxjs/src/internal/operators/finalize.ts @@ -1,4 +1,4 @@ -import { MonoTypeOperatorFunction } from '../types.js'; +import type { MonoTypeOperatorFunction } from '../types.js'; import { Observable } from '../Observable.js'; /** diff --git a/packages/rxjs/src/internal/operators/find.ts b/packages/rxjs/src/internal/operators/find.ts index bd9df703c5..d5951384f8 100644 --- a/packages/rxjs/src/internal/operators/find.ts +++ b/packages/rxjs/src/internal/operators/find.ts @@ -1,5 +1,6 @@ -import { Observable, Subscriber, operate } from '../Observable.js'; -import { OperatorFunction, TruthyTypesOf } from '../types.js'; +import type { Subscriber} from '../Observable.js'; +import { Observable, operate } from '../Observable.js'; +import type { OperatorFunction, TruthyTypesOf } from '../types.js'; export function find(predicate: BooleanConstructor): OperatorFunction>; export function find( diff --git a/packages/rxjs/src/internal/operators/findIndex.ts b/packages/rxjs/src/internal/operators/findIndex.ts index 16b7fcb283..555244ee45 100644 --- a/packages/rxjs/src/internal/operators/findIndex.ts +++ b/packages/rxjs/src/internal/operators/findIndex.ts @@ -1,5 +1,5 @@ import { Observable } from '../Observable.js'; -import { Falsy, OperatorFunction } from '../types.js'; +import type { Falsy, OperatorFunction } from '../types.js'; import { createFind } from './find.js'; export function findIndex(predicate: BooleanConstructor): OperatorFunction; diff --git a/packages/rxjs/src/internal/operators/first.ts b/packages/rxjs/src/internal/operators/first.ts index 1968c77402..9d572ecf5b 100644 --- a/packages/rxjs/src/internal/operators/first.ts +++ b/packages/rxjs/src/internal/operators/first.ts @@ -1,6 +1,6 @@ -import { Observable } from '../Observable.js'; +import type { Observable } from '../Observable.js'; import { EmptyError } from '../util/EmptyError.js'; -import { OperatorFunction, TruthyTypesOf } from '../types.js'; +import type { OperatorFunction, TruthyTypesOf } from '../types.js'; import { filter } from './filter.js'; import { take } from './take.js'; import { defaultIfEmpty } from './defaultIfEmpty.js'; diff --git a/packages/rxjs/src/internal/operators/groupBy.ts b/packages/rxjs/src/internal/operators/groupBy.ts index fa7e51d364..ff0040c309 100644 --- a/packages/rxjs/src/internal/operators/groupBy.ts +++ b/packages/rxjs/src/internal/operators/groupBy.ts @@ -1,6 +1,6 @@ import { Observable, from, operate } from '../Observable.js'; import { Subject } from '../Subject.js'; -import { ObservableInput, Observer, OperatorFunction, SubjectLike } from '../types.js'; +import type { ObservableInput, Observer, OperatorFunction, SubjectLike } from '../types.js'; export interface BasicGroupByOptions { element?: undefined; diff --git a/packages/rxjs/src/internal/operators/ignoreElements.ts b/packages/rxjs/src/internal/operators/ignoreElements.ts index 26c57e65ce..5d806af6ab 100644 --- a/packages/rxjs/src/internal/operators/ignoreElements.ts +++ b/packages/rxjs/src/internal/operators/ignoreElements.ts @@ -1,4 +1,4 @@ -import { OperatorFunction } from '../types.js'; +import type { OperatorFunction } from '../types.js'; import { Observable, operate } from '../Observable.js'; import { noop } from '../util/noop.js'; diff --git a/packages/rxjs/src/internal/operators/isEmpty.ts b/packages/rxjs/src/internal/operators/isEmpty.ts index ff5bf79560..7dfbd177ff 100644 --- a/packages/rxjs/src/internal/operators/isEmpty.ts +++ b/packages/rxjs/src/internal/operators/isEmpty.ts @@ -1,4 +1,4 @@ -import { OperatorFunction } from '../types.js'; +import type { OperatorFunction } from '../types.js'; import { Observable, operate } from '../Observable.js'; /** diff --git a/packages/rxjs/src/internal/operators/joinAllInternals.ts b/packages/rxjs/src/internal/operators/joinAllInternals.ts index 73a11fe600..e8ec51b37e 100644 --- a/packages/rxjs/src/internal/operators/joinAllInternals.ts +++ b/packages/rxjs/src/internal/operators/joinAllInternals.ts @@ -1,5 +1,5 @@ -import { Observable } from '../Observable.js'; -import { ObservableInput, OperatorFunction } from '../types.js'; +import type { Observable } from '../Observable.js'; +import type { ObservableInput, OperatorFunction } from '../types.js'; import { identity } from '../util/identity.js'; import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs.js'; import { pipe } from '../util/pipe.js'; diff --git a/packages/rxjs/src/internal/operators/last.ts b/packages/rxjs/src/internal/operators/last.ts index 9a57a54331..5fabe159d9 100644 --- a/packages/rxjs/src/internal/operators/last.ts +++ b/packages/rxjs/src/internal/operators/last.ts @@ -1,6 +1,6 @@ -import { Observable } from '../Observable.js'; +import type { Observable } from '../Observable.js'; import { EmptyError } from '../util/EmptyError.js'; -import { OperatorFunction, TruthyTypesOf } from '../types.js'; +import type { OperatorFunction, TruthyTypesOf } from '../types.js'; import { filter } from './filter.js'; import { takeLast } from './takeLast.js'; import { throwIfEmpty } from './throwIfEmpty.js'; diff --git a/packages/rxjs/src/internal/operators/map.ts b/packages/rxjs/src/internal/operators/map.ts index 5188e7461d..de10203aa8 100644 --- a/packages/rxjs/src/internal/operators/map.ts +++ b/packages/rxjs/src/internal/operators/map.ts @@ -1,4 +1,4 @@ -import { OperatorFunction } from '../types.js'; +import type { OperatorFunction } from '../types.js'; import { Observable, operate } from '../Observable.js'; /** diff --git a/packages/rxjs/src/internal/operators/mapTo.ts b/packages/rxjs/src/internal/operators/mapTo.ts index ee86fe33d0..d25679e6bc 100644 --- a/packages/rxjs/src/internal/operators/mapTo.ts +++ b/packages/rxjs/src/internal/operators/mapTo.ts @@ -1,4 +1,4 @@ -import { OperatorFunction } from '../types.js'; +import type { OperatorFunction } from '../types.js'; import { map } from './map.js'; /** @deprecated To be removed in v9. Use {@link map} instead: `map(() => value)`. */ diff --git a/packages/rxjs/src/internal/operators/materialize.ts b/packages/rxjs/src/internal/operators/materialize.ts index 9e9be37054..7d7e132477 100644 --- a/packages/rxjs/src/internal/operators/materialize.ts +++ b/packages/rxjs/src/internal/operators/materialize.ts @@ -1,4 +1,4 @@ -import { OperatorFunction, ObservableNotification } from '../types.js'; +import type { OperatorFunction, ObservableNotification } from '../types.js'; import { Observable, operate, COMPLETE_NOTIFICATION, errorNotification, nextNotification } from '../Observable.js'; /** diff --git a/packages/rxjs/src/internal/operators/max.ts b/packages/rxjs/src/internal/operators/max.ts index 94242a48c8..73fdd85116 100644 --- a/packages/rxjs/src/internal/operators/max.ts +++ b/packages/rxjs/src/internal/operators/max.ts @@ -1,5 +1,5 @@ import { reduce } from './reduce.js'; -import { MonoTypeOperatorFunction } from '../types.js'; +import type { MonoTypeOperatorFunction } from '../types.js'; import { isFunction } from '../Observable.js'; /** diff --git a/packages/rxjs/src/internal/operators/mergeAll.ts b/packages/rxjs/src/internal/operators/mergeAll.ts index 837cd12171..2e29d33344 100644 --- a/packages/rxjs/src/internal/operators/mergeAll.ts +++ b/packages/rxjs/src/internal/operators/mergeAll.ts @@ -1,6 +1,6 @@ import { mergeMap } from './mergeMap.js'; import { identity } from '../util/identity.js'; -import { OperatorFunction, ObservableInput, ObservedValueOf } from '../types.js'; +import type { OperatorFunction, ObservableInput, ObservedValueOf } from '../types.js'; /** * Converts a higher-order Observable into a first-order Observable which diff --git a/packages/rxjs/src/internal/operators/mergeInternals.ts b/packages/rxjs/src/internal/operators/mergeInternals.ts index 181883907c..c4590da1d7 100644 --- a/packages/rxjs/src/internal/operators/mergeInternals.ts +++ b/packages/rxjs/src/internal/operators/mergeInternals.ts @@ -1,5 +1,6 @@ -import { Observable, from, Subscriber, operate } from '../Observable.js'; -import { ObservableInput, SchedulerLike } from '../types.js'; +import type { Observable, Subscriber} from '../Observable.js'; +import { from, operate } from '../Observable.js'; +import type { ObservableInput, SchedulerLike } from '../types.js'; import { executeSchedule } from '../util/executeSchedule.js'; /** diff --git a/packages/rxjs/src/internal/operators/mergeMap.ts b/packages/rxjs/src/internal/operators/mergeMap.ts index 7d899d43c6..23aad4b5fd 100644 --- a/packages/rxjs/src/internal/operators/mergeMap.ts +++ b/packages/rxjs/src/internal/operators/mergeMap.ts @@ -1,4 +1,4 @@ -import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types.js'; +import type { ObservableInput, OperatorFunction, ObservedValueOf } from '../types.js'; import { Observable } from '../Observable.js'; import { mergeInternals } from './mergeInternals.js'; diff --git a/packages/rxjs/src/internal/operators/mergeMapTo.ts b/packages/rxjs/src/internal/operators/mergeMapTo.ts index 9bc9ee8a83..41c509e817 100644 --- a/packages/rxjs/src/internal/operators/mergeMapTo.ts +++ b/packages/rxjs/src/internal/operators/mergeMapTo.ts @@ -1,4 +1,4 @@ -import { OperatorFunction, ObservedValueOf, ObservableInput } from '../types.js'; +import type { OperatorFunction, ObservedValueOf, ObservableInput } from '../types.js'; import { mergeMap } from './mergeMap.js'; /** diff --git a/packages/rxjs/src/internal/operators/mergeScan.ts b/packages/rxjs/src/internal/operators/mergeScan.ts index c76739a052..dc940b1d82 100644 --- a/packages/rxjs/src/internal/operators/mergeScan.ts +++ b/packages/rxjs/src/internal/operators/mergeScan.ts @@ -1,4 +1,4 @@ -import { ObservableInput, OperatorFunction } from '../types.js'; +import type { ObservableInput, OperatorFunction } from '../types.js'; import { Observable } from '../Observable.js'; import { mergeInternals } from './mergeInternals.js'; diff --git a/packages/rxjs/src/internal/operators/mergeWith.ts b/packages/rxjs/src/internal/operators/mergeWith.ts index 928eafd2df..4ad80a73b5 100644 --- a/packages/rxjs/src/internal/operators/mergeWith.ts +++ b/packages/rxjs/src/internal/operators/mergeWith.ts @@ -1,6 +1,6 @@ import { Observable, from } from '../Observable.js'; import { mergeAll } from '../operators/mergeAll.js'; -import { ObservableInputTuple, OperatorFunction } from '../types.js'; +import type { ObservableInputTuple, OperatorFunction } from '../types.js'; /** * Merge the values from all observables to a single observable result. diff --git a/packages/rxjs/src/internal/operators/min.ts b/packages/rxjs/src/internal/operators/min.ts index a1b856023f..10ddf64172 100644 --- a/packages/rxjs/src/internal/operators/min.ts +++ b/packages/rxjs/src/internal/operators/min.ts @@ -1,5 +1,5 @@ import { reduce } from './reduce.js'; -import { MonoTypeOperatorFunction } from '../types.js'; +import type { MonoTypeOperatorFunction } from '../types.js'; import { isFunction } from '../Observable.js'; /** diff --git a/packages/rxjs/src/internal/operators/observeOn.ts b/packages/rxjs/src/internal/operators/observeOn.ts index f847a7b34a..c43ff8dc8d 100644 --- a/packages/rxjs/src/internal/operators/observeOn.ts +++ b/packages/rxjs/src/internal/operators/observeOn.ts @@ -1,4 +1,4 @@ -import { MonoTypeOperatorFunction, SchedulerLike } from '../types.js'; +import type { MonoTypeOperatorFunction, SchedulerLike } from '../types.js'; import { executeSchedule } from '../util/executeSchedule.js'; import { Observable, operate } from '../Observable.js'; diff --git a/packages/rxjs/src/internal/operators/onErrorResumeNextWith.ts b/packages/rxjs/src/internal/operators/onErrorResumeNextWith.ts index 9a77163945..425af52aae 100644 --- a/packages/rxjs/src/internal/operators/onErrorResumeNextWith.ts +++ b/packages/rxjs/src/internal/operators/onErrorResumeNextWith.ts @@ -1,4 +1,4 @@ -import { ObservableInputTuple, OperatorFunction } from '../types.js'; +import type { ObservableInputTuple, OperatorFunction } from '../types.js'; import { argsOrArgArray } from '../util/argsOrArgArray.js'; import { onErrorResumeNext as oERNCreate } from '../observable/onErrorResumeNext.js'; diff --git a/packages/rxjs/src/internal/operators/pairwise.ts b/packages/rxjs/src/internal/operators/pairwise.ts index 417c782364..7569a4ee87 100644 --- a/packages/rxjs/src/internal/operators/pairwise.ts +++ b/packages/rxjs/src/internal/operators/pairwise.ts @@ -1,4 +1,4 @@ -import { OperatorFunction } from '../types.js'; +import type { OperatorFunction } from '../types.js'; import { Observable, operate } from '../Observable.js'; /** diff --git a/packages/rxjs/src/internal/operators/partition.ts b/packages/rxjs/src/internal/operators/partition.ts index 2f04809a82..684855d0e6 100644 --- a/packages/rxjs/src/internal/operators/partition.ts +++ b/packages/rxjs/src/internal/operators/partition.ts @@ -1,7 +1,7 @@ import { not } from '../util/not.js'; import { filter } from './filter.js'; -import { Observable } from '../Observable.js'; -import { UnaryFunction } from '../types.js'; +import type { Observable } from '../Observable.js'; +import type { UnaryFunction } from '../types.js'; /** * Splits the source Observable into two, one with values that satisfy a diff --git a/packages/rxjs/src/internal/operators/raceWith.ts b/packages/rxjs/src/internal/operators/raceWith.ts index 96ce921c06..ba549ee759 100644 --- a/packages/rxjs/src/internal/operators/raceWith.ts +++ b/packages/rxjs/src/internal/operators/raceWith.ts @@ -1,4 +1,4 @@ -import { OperatorFunction, ObservableInputTuple } from '../types.js'; +import type { OperatorFunction, ObservableInputTuple } from '../types.js'; import { raceInit } from '../observable/race.js'; import { Observable } from '../Observable.js'; import { identity } from '../util/identity.js'; diff --git a/packages/rxjs/src/internal/operators/reduce.ts b/packages/rxjs/src/internal/operators/reduce.ts index 63350ec841..4ccc37b08a 100644 --- a/packages/rxjs/src/internal/operators/reduce.ts +++ b/packages/rxjs/src/internal/operators/reduce.ts @@ -1,5 +1,5 @@ import { scanInternals } from './scanInternals.js'; -import { OperatorFunction } from '../types.js'; +import type { OperatorFunction } from '../types.js'; import { Observable } from '../Observable.js'; export function reduce(accumulator: (acc: A | V, value: V, index: number) => A): OperatorFunction; diff --git a/packages/rxjs/src/internal/operators/repeat.ts b/packages/rxjs/src/internal/operators/repeat.ts index 89c275659f..09be596d33 100644 --- a/packages/rxjs/src/internal/operators/repeat.ts +++ b/packages/rxjs/src/internal/operators/repeat.ts @@ -1,6 +1,7 @@ -import { Observable, operate, Subscription, from } from '../Observable.js'; +import type { Subscription} from '../Observable.js'; +import { Observable, operate, from } from '../Observable.js'; import { EMPTY } from '../observable/empty.js'; -import { MonoTypeOperatorFunction, ObservableInput } from '../types.js'; +import type { MonoTypeOperatorFunction, ObservableInput } from '../types.js'; import { timer } from '../observable/timer.js'; export interface RepeatConfig { diff --git a/packages/rxjs/src/internal/operators/repeatWhen.ts b/packages/rxjs/src/internal/operators/repeatWhen.ts index 283e374620..b76ed9c9a4 100644 --- a/packages/rxjs/src/internal/operators/repeatWhen.ts +++ b/packages/rxjs/src/internal/operators/repeatWhen.ts @@ -1,6 +1,7 @@ -import { Observable, from, Subscription, operate } from '../Observable.js'; +import type { Subscription} from '../Observable.js'; +import { Observable, from, operate } from '../Observable.js'; import { Subject } from '../Subject.js'; -import { MonoTypeOperatorFunction, ObservableInput } from '../types.js'; +import type { MonoTypeOperatorFunction, ObservableInput } from '../types.js'; /** * Returns an Observable that mirrors the source Observable with the exception of a `complete`. If the source diff --git a/packages/rxjs/src/internal/operators/retry.ts b/packages/rxjs/src/internal/operators/retry.ts index 36ea86183c..0e81b13e01 100644 --- a/packages/rxjs/src/internal/operators/retry.ts +++ b/packages/rxjs/src/internal/operators/retry.ts @@ -1,5 +1,6 @@ -import { MonoTypeOperatorFunction, ObservableInput } from '../types.js'; -import { Observable, Subscription, operate, from } from '../Observable.js'; +import type { MonoTypeOperatorFunction, ObservableInput } from '../types.js'; +import type { Subscription} from '../Observable.js'; +import { Observable, operate, from } from '../Observable.js'; import { identity } from '../util/identity.js'; import { timer } from '../observable/timer.js'; diff --git a/packages/rxjs/src/internal/operators/retryWhen.ts b/packages/rxjs/src/internal/operators/retryWhen.ts index d9233be06f..79d77478cc 100644 --- a/packages/rxjs/src/internal/operators/retryWhen.ts +++ b/packages/rxjs/src/internal/operators/retryWhen.ts @@ -1,6 +1,7 @@ -import { Observable, Subscription, from, operate } from '../Observable.js'; +import type { Subscription} from '../Observable.js'; +import { Observable, from, operate } from '../Observable.js'; import { Subject } from '../Subject.js'; -import { MonoTypeOperatorFunction, ObservableInput } from '../types.js'; +import type { MonoTypeOperatorFunction, ObservableInput } from '../types.js'; /** * Returns an Observable that mirrors the source Observable with the exception of an `error`. If the source Observable diff --git a/packages/rxjs/src/internal/operators/sample.ts b/packages/rxjs/src/internal/operators/sample.ts index 8ab282b4af..52fde9c1cf 100644 --- a/packages/rxjs/src/internal/operators/sample.ts +++ b/packages/rxjs/src/internal/operators/sample.ts @@ -1,5 +1,5 @@ import { Observable, from, operate } from '../Observable.js'; -import { MonoTypeOperatorFunction, ObservableInput } from '../types.js'; +import type { MonoTypeOperatorFunction, ObservableInput } from '../types.js'; import { noop } from '../util/noop.js'; /** diff --git a/packages/rxjs/src/internal/operators/sampleTime.ts b/packages/rxjs/src/internal/operators/sampleTime.ts index b2c5627f86..5e4a14ad2e 100644 --- a/packages/rxjs/src/internal/operators/sampleTime.ts +++ b/packages/rxjs/src/internal/operators/sampleTime.ts @@ -1,5 +1,5 @@ import { asyncScheduler } from '../scheduler/async.js'; -import { MonoTypeOperatorFunction, SchedulerLike } from '../types.js'; +import type { MonoTypeOperatorFunction, SchedulerLike } from '../types.js'; import { sample } from './sample.js'; import { interval } from '../observable/interval.js'; diff --git a/packages/rxjs/src/internal/operators/scan.ts b/packages/rxjs/src/internal/operators/scan.ts index 924f33b7ad..fda73680d5 100644 --- a/packages/rxjs/src/internal/operators/scan.ts +++ b/packages/rxjs/src/internal/operators/scan.ts @@ -1,5 +1,5 @@ import { Observable } from '../Observable.js'; -import { OperatorFunction } from '../types.js'; +import type { OperatorFunction } from '../types.js'; import { scanInternals } from './scanInternals.js'; export function scan(accumulator: (acc: A | V, value: V, index: number) => A): OperatorFunction; diff --git a/packages/rxjs/src/internal/operators/scanInternals.ts b/packages/rxjs/src/internal/operators/scanInternals.ts index 46e8f240b8..861363a1fb 100644 --- a/packages/rxjs/src/internal/operators/scanInternals.ts +++ b/packages/rxjs/src/internal/operators/scanInternals.ts @@ -1,4 +1,5 @@ -import { Observable, Subscriber, operate } from '../Observable.js'; +import type { Observable, Subscriber} from '../Observable.js'; +import { operate } from '../Observable.js'; /** * A basic scan operation. This is used for `scan` and `reduce`. diff --git a/packages/rxjs/src/internal/operators/sequenceEqual.ts b/packages/rxjs/src/internal/operators/sequenceEqual.ts index 624242b5a3..726324c7a7 100644 --- a/packages/rxjs/src/internal/operators/sequenceEqual.ts +++ b/packages/rxjs/src/internal/operators/sequenceEqual.ts @@ -1,4 +1,4 @@ -import { OperatorFunction, ObservableInput } from '../types.js'; +import type { OperatorFunction, ObservableInput } from '../types.js'; import { Observable, operate, from } from '../Observable.js'; /** diff --git a/packages/rxjs/src/internal/operators/share.ts b/packages/rxjs/src/internal/operators/share.ts index ffb1885ece..785b2678b0 100644 --- a/packages/rxjs/src/internal/operators/share.ts +++ b/packages/rxjs/src/internal/operators/share.ts @@ -1,6 +1,7 @@ -import { Observable, Subscriber, Subscription, from } from '../Observable.js'; +import type { Subscription} from '../Observable.js'; +import { Observable, Subscriber, from } from '../Observable.js'; import { Subject } from '../Subject.js'; -import { MonoTypeOperatorFunction, SubjectLike, ObservableInput } from '../types.js'; +import type { MonoTypeOperatorFunction, SubjectLike, ObservableInput } from '../types.js'; export interface ShareConfig { /** diff --git a/packages/rxjs/src/internal/operators/shareReplay.ts b/packages/rxjs/src/internal/operators/shareReplay.ts index 63612ed2e2..a9d39cc30e 100644 --- a/packages/rxjs/src/internal/operators/shareReplay.ts +++ b/packages/rxjs/src/internal/operators/shareReplay.ts @@ -1,5 +1,5 @@ import { ReplaySubject } from '../ReplaySubject.js'; -import { MonoTypeOperatorFunction, SchedulerLike } from '../types.js'; +import type { MonoTypeOperatorFunction, SchedulerLike } from '../types.js'; import { share } from './share.js'; export interface ShareReplayConfig { diff --git a/packages/rxjs/src/internal/operators/single.ts b/packages/rxjs/src/internal/operators/single.ts index 97d0e03095..805b2ce9ef 100644 --- a/packages/rxjs/src/internal/operators/single.ts +++ b/packages/rxjs/src/internal/operators/single.ts @@ -1,7 +1,7 @@ import { Observable, operate } from '../Observable.js'; import { EmptyError } from '../util/EmptyError.js'; -import { MonoTypeOperatorFunction, OperatorFunction, TruthyTypesOf } from '../types.js'; +import type { MonoTypeOperatorFunction, OperatorFunction, TruthyTypesOf } from '../types.js'; import { SequenceError } from '../util/SequenceError.js'; import { NotFoundError } from '../util/NotFoundError.js'; diff --git a/packages/rxjs/src/internal/operators/skip.ts b/packages/rxjs/src/internal/operators/skip.ts index c13ab89be6..b7dd9d5d65 100644 --- a/packages/rxjs/src/internal/operators/skip.ts +++ b/packages/rxjs/src/internal/operators/skip.ts @@ -1,4 +1,4 @@ -import { MonoTypeOperatorFunction } from '../types.js'; +import type { MonoTypeOperatorFunction } from '../types.js'; import { filter } from './filter.js'; /** diff --git a/packages/rxjs/src/internal/operators/skipLast.ts b/packages/rxjs/src/internal/operators/skipLast.ts index 1044f861f2..c4f82ec3c8 100644 --- a/packages/rxjs/src/internal/operators/skipLast.ts +++ b/packages/rxjs/src/internal/operators/skipLast.ts @@ -1,4 +1,4 @@ -import { MonoTypeOperatorFunction } from '../types.js'; +import type { MonoTypeOperatorFunction } from '../types.js'; import { identity } from '../util/identity.js'; import { Observable, operate } from '../Observable.js'; diff --git a/packages/rxjs/src/internal/operators/skipUntil.ts b/packages/rxjs/src/internal/operators/skipUntil.ts index 169c3dd089..ad315c5b38 100644 --- a/packages/rxjs/src/internal/operators/skipUntil.ts +++ b/packages/rxjs/src/internal/operators/skipUntil.ts @@ -1,4 +1,4 @@ -import { MonoTypeOperatorFunction, ObservableInput } from '../types.js'; +import type { MonoTypeOperatorFunction, ObservableInput } from '../types.js'; import { Observable, operate, from } from '../Observable.js'; import { noop } from '../util/noop.js'; diff --git a/packages/rxjs/src/internal/operators/skipWhile.ts b/packages/rxjs/src/internal/operators/skipWhile.ts index cfe042f5cb..c129057aed 100644 --- a/packages/rxjs/src/internal/operators/skipWhile.ts +++ b/packages/rxjs/src/internal/operators/skipWhile.ts @@ -1,4 +1,4 @@ -import { Falsy, MonoTypeOperatorFunction, OperatorFunction } from '../types.js'; +import type { Falsy, MonoTypeOperatorFunction, OperatorFunction } from '../types.js'; import { Observable, operate } from '../Observable.js'; export function skipWhile(predicate: BooleanConstructor): OperatorFunction extends never ? never : T>; diff --git a/packages/rxjs/src/internal/operators/startWith.ts b/packages/rxjs/src/internal/operators/startWith.ts index e9dce1fd75..b6be5ee110 100644 --- a/packages/rxjs/src/internal/operators/startWith.ts +++ b/packages/rxjs/src/internal/operators/startWith.ts @@ -1,5 +1,5 @@ import { Observable, subscribeToArray, operate } from '../Observable.js'; -import { OperatorFunction, ValueFromArray } from '../types.js'; +import type { OperatorFunction, ValueFromArray } from '../types.js'; export function startWith(value: null): OperatorFunction; export function startWith(value: undefined): OperatorFunction; diff --git a/packages/rxjs/src/internal/operators/subscribeOn.ts b/packages/rxjs/src/internal/operators/subscribeOn.ts index 679d513688..078f7dd4ba 100644 --- a/packages/rxjs/src/internal/operators/subscribeOn.ts +++ b/packages/rxjs/src/internal/operators/subscribeOn.ts @@ -1,4 +1,4 @@ -import { MonoTypeOperatorFunction, SchedulerLike } from '../types.js'; +import type { MonoTypeOperatorFunction, SchedulerLike } from '../types.js'; import { Observable } from '../Observable.js'; /** diff --git a/packages/rxjs/src/internal/operators/switchAll.ts b/packages/rxjs/src/internal/operators/switchAll.ts index 0dd215d7c3..0a1693bede 100644 --- a/packages/rxjs/src/internal/operators/switchAll.ts +++ b/packages/rxjs/src/internal/operators/switchAll.ts @@ -1,4 +1,4 @@ -import { OperatorFunction, ObservableInput, ObservedValueOf } from '../types.js'; +import type { OperatorFunction, ObservableInput, ObservedValueOf } from '../types.js'; import { switchMap } from './switchMap.js'; import { identity } from '../util/identity.js'; diff --git a/packages/rxjs/src/internal/operators/switchMap.ts b/packages/rxjs/src/internal/operators/switchMap.ts index c884084eef..032e847f68 100644 --- a/packages/rxjs/src/internal/operators/switchMap.ts +++ b/packages/rxjs/src/internal/operators/switchMap.ts @@ -1,5 +1,6 @@ -import { Observable, from, Subscriber, operate } from '../Observable.js'; -import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types.js'; +import type { Subscriber} from '../Observable.js'; +import { Observable, from, operate } from '../Observable.js'; +import type { ObservableInput, OperatorFunction, ObservedValueOf } from '../types.js'; /** * Projects each source value to an Observable which is merged in the output diff --git a/packages/rxjs/src/internal/operators/switchMapTo.ts b/packages/rxjs/src/internal/operators/switchMapTo.ts index f853b9a212..2b734f3900 100644 --- a/packages/rxjs/src/internal/operators/switchMapTo.ts +++ b/packages/rxjs/src/internal/operators/switchMapTo.ts @@ -1,5 +1,5 @@ import { switchMap } from './switchMap.js'; -import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types.js'; +import type { ObservableInput, OperatorFunction, ObservedValueOf } from '../types.js'; /** * Projects each source value to the same Observable which is flattened multiple diff --git a/packages/rxjs/src/internal/operators/switchScan.ts b/packages/rxjs/src/internal/operators/switchScan.ts index afa4305d3d..839979ad6f 100644 --- a/packages/rxjs/src/internal/operators/switchScan.ts +++ b/packages/rxjs/src/internal/operators/switchScan.ts @@ -1,4 +1,4 @@ -import { ObservableInput, ObservedValueOf, OperatorFunction } from '../types.js'; +import type { ObservableInput, ObservedValueOf, OperatorFunction } from '../types.js'; import { switchMap } from './switchMap.js'; import { Observable, operate } from '../Observable.js'; diff --git a/packages/rxjs/src/internal/operators/take.ts b/packages/rxjs/src/internal/operators/take.ts index 0b9c2cc7fe..af7247ce25 100644 --- a/packages/rxjs/src/internal/operators/take.ts +++ b/packages/rxjs/src/internal/operators/take.ts @@ -1,4 +1,4 @@ -import { MonoTypeOperatorFunction } from '../types.js'; +import type { MonoTypeOperatorFunction } from '../types.js'; import { EMPTY } from '../observable/empty.js'; import { Observable, operate } from '../Observable.js'; diff --git a/packages/rxjs/src/internal/operators/takeLast.ts b/packages/rxjs/src/internal/operators/takeLast.ts index 11cbdb7378..a38f137915 100644 --- a/packages/rxjs/src/internal/operators/takeLast.ts +++ b/packages/rxjs/src/internal/operators/takeLast.ts @@ -1,5 +1,5 @@ import { EMPTY } from '../observable/empty.js'; -import { MonoTypeOperatorFunction } from '../types.js'; +import type { MonoTypeOperatorFunction } from '../types.js'; import { Observable, operate } from '../Observable.js'; /** diff --git a/packages/rxjs/src/internal/operators/takeUntil.ts b/packages/rxjs/src/internal/operators/takeUntil.ts index 378ded343c..503e93c6c4 100644 --- a/packages/rxjs/src/internal/operators/takeUntil.ts +++ b/packages/rxjs/src/internal/operators/takeUntil.ts @@ -1,4 +1,4 @@ -import { MonoTypeOperatorFunction, ObservableInput } from '../types.js'; +import type { MonoTypeOperatorFunction, ObservableInput } from '../types.js'; import { Observable, operate, from } from '../Observable.js'; import { noop } from '../util/noop.js'; diff --git a/packages/rxjs/src/internal/operators/takeWhile.ts b/packages/rxjs/src/internal/operators/takeWhile.ts index 0bd99d4539..b19ba56123 100644 --- a/packages/rxjs/src/internal/operators/takeWhile.ts +++ b/packages/rxjs/src/internal/operators/takeWhile.ts @@ -1,4 +1,4 @@ -import { OperatorFunction, MonoTypeOperatorFunction, TruthyTypesOf } from '../types.js'; +import type { OperatorFunction, MonoTypeOperatorFunction, TruthyTypesOf } from '../types.js'; import { Observable, operate } from '../Observable.js'; export function takeWhile(predicate: BooleanConstructor, inclusive: true): MonoTypeOperatorFunction; diff --git a/packages/rxjs/src/internal/operators/tap.ts b/packages/rxjs/src/internal/operators/tap.ts index 04b5a5f914..4cfab339d9 100644 --- a/packages/rxjs/src/internal/operators/tap.ts +++ b/packages/rxjs/src/internal/operators/tap.ts @@ -1,4 +1,4 @@ -import { MonoTypeOperatorFunction, Observer } from '../types.js'; +import type { MonoTypeOperatorFunction, Observer } from '../types.js'; import { Observable, operate, isFunction } from '../Observable.js'; import { identity } from '../util/identity.js'; diff --git a/packages/rxjs/src/internal/operators/throttle.ts b/packages/rxjs/src/internal/operators/throttle.ts index cf82b91a86..c23dc43b73 100644 --- a/packages/rxjs/src/internal/operators/throttle.ts +++ b/packages/rxjs/src/internal/operators/throttle.ts @@ -1,5 +1,6 @@ -import { Observable, operate, from, Subscription } from '../Observable.js'; -import { MonoTypeOperatorFunction, ObservableInput } from '../types.js'; +import type { Subscription } from '../Observable.js'; +import { Observable, operate, from } from '../Observable.js'; +import type { MonoTypeOperatorFunction, ObservableInput } from '../types.js'; /** * An object interface used by {@link throttle} or {@link throttleTime} that ensure diff --git a/packages/rxjs/src/internal/operators/throttleTime.ts b/packages/rxjs/src/internal/operators/throttleTime.ts index e929d465e8..d22d1d6180 100644 --- a/packages/rxjs/src/internal/operators/throttleTime.ts +++ b/packages/rxjs/src/internal/operators/throttleTime.ts @@ -1,6 +1,7 @@ import { asyncScheduler } from '../scheduler/async.js'; -import { throttle, ThrottleConfig } from './throttle.js'; -import { MonoTypeOperatorFunction, SchedulerLike } from '../types.js'; +import type { ThrottleConfig } from './throttle.js'; +import { throttle } from './throttle.js'; +import type { MonoTypeOperatorFunction, SchedulerLike } from '../types.js'; import { timer } from '../observable/timer.js'; /** diff --git a/packages/rxjs/src/internal/operators/throwIfEmpty.ts b/packages/rxjs/src/internal/operators/throwIfEmpty.ts index ff91eb1221..37b1b4db76 100644 --- a/packages/rxjs/src/internal/operators/throwIfEmpty.ts +++ b/packages/rxjs/src/internal/operators/throwIfEmpty.ts @@ -1,5 +1,5 @@ import { EmptyError } from '../util/EmptyError.js'; -import { MonoTypeOperatorFunction } from '../types.js'; +import type { MonoTypeOperatorFunction } from '../types.js'; import { Observable, operate } from '../Observable.js'; /** diff --git a/packages/rxjs/src/internal/operators/timeInterval.ts b/packages/rxjs/src/internal/operators/timeInterval.ts index ade3a1d151..7a1f4d70ae 100644 --- a/packages/rxjs/src/internal/operators/timeInterval.ts +++ b/packages/rxjs/src/internal/operators/timeInterval.ts @@ -1,5 +1,5 @@ import { asyncScheduler } from '../scheduler/async.js'; -import { SchedulerLike, OperatorFunction } from '../types.js'; +import type { SchedulerLike, OperatorFunction } from '../types.js'; import { Observable, operate } from '../Observable.js'; /** diff --git a/packages/rxjs/src/internal/operators/timeout.ts b/packages/rxjs/src/internal/operators/timeout.ts index 59880fc426..4cd5dcf4e4 100644 --- a/packages/rxjs/src/internal/operators/timeout.ts +++ b/packages/rxjs/src/internal/operators/timeout.ts @@ -1,7 +1,8 @@ import { asyncScheduler } from '../scheduler/async.js'; -import { MonoTypeOperatorFunction, SchedulerLike, OperatorFunction, ObservableInput, ObservedValueOf } from '../types.js'; +import type { MonoTypeOperatorFunction, SchedulerLike, OperatorFunction, ObservableInput, ObservedValueOf } from '../types.js'; import { isValidDate } from '../util/isDate.js'; -import { Subscription, Observable, from, operate } from '../Observable.js'; +import type { Subscription} from '../Observable.js'; +import { Observable, from, operate } from '../Observable.js'; import { executeSchedule } from '../util/executeSchedule.js'; export interface TimeoutConfig = ObservableInput, M = unknown> { diff --git a/packages/rxjs/src/internal/operators/timeoutWith.ts b/packages/rxjs/src/internal/operators/timeoutWith.ts index 157589869e..0c62f5ae43 100644 --- a/packages/rxjs/src/internal/operators/timeoutWith.ts +++ b/packages/rxjs/src/internal/operators/timeoutWith.ts @@ -1,6 +1,6 @@ import { asyncScheduler } from '../scheduler/async.js'; import { isValidDate } from '../util/isDate.js'; -import { ObservableInput, OperatorFunction, SchedulerLike } from '../types.js'; +import type { ObservableInput, OperatorFunction, SchedulerLike } from '../types.js'; import { timeout } from './timeout.js'; /** @deprecated Replaced with {@link timeout}. Instead of `timeoutWith(someDate, a$, scheduler)`, use the configuration object diff --git a/packages/rxjs/src/internal/operators/timestamp.ts b/packages/rxjs/src/internal/operators/timestamp.ts index 02541bd166..2b99499914 100644 --- a/packages/rxjs/src/internal/operators/timestamp.ts +++ b/packages/rxjs/src/internal/operators/timestamp.ts @@ -1,4 +1,4 @@ -import { OperatorFunction, TimestampProvider, Timestamp } from '../types.js'; +import type { OperatorFunction, TimestampProvider, Timestamp } from '../types.js'; import { dateTimestampProvider } from '../scheduler/dateTimestampProvider.js'; import { map } from './map.js'; diff --git a/packages/rxjs/src/internal/operators/toArray.ts b/packages/rxjs/src/internal/operators/toArray.ts index 6a25db5b41..b879ea136d 100644 --- a/packages/rxjs/src/internal/operators/toArray.ts +++ b/packages/rxjs/src/internal/operators/toArray.ts @@ -1,5 +1,5 @@ import { reduce } from './reduce.js'; -import { OperatorFunction } from '../types.js'; +import type { OperatorFunction } from '../types.js'; import { Observable } from '../Observable.js'; const arrReducer = (arr: any[], value: any) => (arr.push(value), arr); diff --git a/packages/rxjs/src/internal/operators/window.ts b/packages/rxjs/src/internal/operators/window.ts index e5064d2b00..72811c941b 100644 --- a/packages/rxjs/src/internal/operators/window.ts +++ b/packages/rxjs/src/internal/operators/window.ts @@ -1,5 +1,5 @@ import { Observable, from, operate } from '../Observable.js'; -import { OperatorFunction, ObservableInput } from '../types.js'; +import type { OperatorFunction, ObservableInput } from '../types.js'; import { Subject } from '../Subject.js'; import { noop } from '../util/noop.js'; diff --git a/packages/rxjs/src/internal/operators/windowCount.ts b/packages/rxjs/src/internal/operators/windowCount.ts index bc637bc88a..26b1bb5687 100644 --- a/packages/rxjs/src/internal/operators/windowCount.ts +++ b/packages/rxjs/src/internal/operators/windowCount.ts @@ -1,6 +1,6 @@ import { Observable, operate } from '../Observable.js'; import { Subject } from '../Subject.js'; -import { OperatorFunction } from '../types.js'; +import type { OperatorFunction } from '../types.js'; /** * Branch out the source Observable values as a nested Observable with each diff --git a/packages/rxjs/src/internal/operators/windowTime.ts b/packages/rxjs/src/internal/operators/windowTime.ts index ea75e2b28f..f17627dcc6 100644 --- a/packages/rxjs/src/internal/operators/windowTime.ts +++ b/packages/rxjs/src/internal/operators/windowTime.ts @@ -1,7 +1,7 @@ import { Subject } from '../Subject.js'; import { asyncScheduler } from '../scheduler/async.js'; import { Observable, operate, Subscription } from '../Observable.js'; -import { Observer, OperatorFunction, SchedulerLike } from '../types.js'; +import type { Observer, OperatorFunction, SchedulerLike } from '../types.js'; import { arrRemove } from '../util/arrRemove.js'; import { popScheduler } from '../util/args.js'; import { executeSchedule } from '../util/executeSchedule.js'; diff --git a/packages/rxjs/src/internal/operators/windowToggle.ts b/packages/rxjs/src/internal/operators/windowToggle.ts index bdfb91fa7d..1f198e723c 100644 --- a/packages/rxjs/src/internal/operators/windowToggle.ts +++ b/packages/rxjs/src/internal/operators/windowToggle.ts @@ -1,6 +1,6 @@ import { Observable, Subscription, from, operate } from '../Observable.js'; import { Subject } from '../Subject.js'; -import { ObservableInput, OperatorFunction } from '../types.js'; +import type { ObservableInput, OperatorFunction } from '../types.js'; import { noop } from '../util/noop.js'; import { arrRemove } from '../util/arrRemove.js'; diff --git a/packages/rxjs/src/internal/operators/windowWhen.ts b/packages/rxjs/src/internal/operators/windowWhen.ts index 8329c8d4ab..fd6991b4ed 100644 --- a/packages/rxjs/src/internal/operators/windowWhen.ts +++ b/packages/rxjs/src/internal/operators/windowWhen.ts @@ -1,6 +1,7 @@ -import { Subscriber, operate, Observable, from } from '../Observable.js'; +import type { Subscriber} from '../Observable.js'; +import { operate, Observable, from } from '../Observable.js'; import { Subject } from '../Subject.js'; -import { ObservableInput, OperatorFunction } from '../types.js'; +import type { ObservableInput, OperatorFunction } from '../types.js'; import { noop } from '../util/noop.js'; /** diff --git a/packages/rxjs/src/internal/operators/withLatestFrom.ts b/packages/rxjs/src/internal/operators/withLatestFrom.ts index ddc3cdec95..dd11d4c6f7 100644 --- a/packages/rxjs/src/internal/operators/withLatestFrom.ts +++ b/packages/rxjs/src/internal/operators/withLatestFrom.ts @@ -1,4 +1,4 @@ -import { OperatorFunction, ObservableInputTuple } from '../types.js'; +import type { OperatorFunction, ObservableInputTuple } from '../types.js'; import { Observable, operate, from } from '../Observable.js'; import { identity } from '../util/identity.js'; import { noop } from '../util/noop.js'; diff --git a/packages/rxjs/src/internal/operators/zipAll.ts b/packages/rxjs/src/internal/operators/zipAll.ts index 05df9f10b3..658abe7693 100644 --- a/packages/rxjs/src/internal/operators/zipAll.ts +++ b/packages/rxjs/src/internal/operators/zipAll.ts @@ -1,4 +1,4 @@ -import { OperatorFunction, ObservableInput } from '../types.js'; +import type { OperatorFunction, ObservableInput } from '../types.js'; import { zip } from '../observable/zip.js'; import { joinAllInternals } from './joinAllInternals.js'; diff --git a/packages/rxjs/src/internal/operators/zipWith.ts b/packages/rxjs/src/internal/operators/zipWith.ts index 3836469c86..ba521dcbb1 100644 --- a/packages/rxjs/src/internal/operators/zipWith.ts +++ b/packages/rxjs/src/internal/operators/zipWith.ts @@ -1,4 +1,4 @@ -import { ObservableInputTuple, OperatorFunction, Cons } from '../types.js'; +import type { ObservableInputTuple, OperatorFunction, Cons } from '../types.js'; import { Observable } from '../Observable.js'; import { zip } from '../observable/zip.js'; diff --git a/packages/rxjs/src/internal/scheduled/scheduleArray.ts b/packages/rxjs/src/internal/scheduled/scheduleArray.ts index 51636a4128..ef40e61747 100644 --- a/packages/rxjs/src/internal/scheduled/scheduleArray.ts +++ b/packages/rxjs/src/internal/scheduled/scheduleArray.ts @@ -1,5 +1,5 @@ import { Observable } from '../Observable.js'; -import { SchedulerLike } from '../types.js'; +import type { SchedulerLike } from '../types.js'; export function scheduleArray(input: ArrayLike, scheduler: SchedulerLike) { return new Observable((subscriber) => { diff --git a/packages/rxjs/src/internal/scheduled/scheduleAsyncIterable.ts b/packages/rxjs/src/internal/scheduled/scheduleAsyncIterable.ts index 713db312da..f929577074 100644 --- a/packages/rxjs/src/internal/scheduled/scheduleAsyncIterable.ts +++ b/packages/rxjs/src/internal/scheduled/scheduleAsyncIterable.ts @@ -1,4 +1,4 @@ -import { SchedulerLike } from '../types.js'; +import type { SchedulerLike } from '../types.js'; import { Observable } from '../Observable.js'; import { executeSchedule } from '../util/executeSchedule.js'; diff --git a/packages/rxjs/src/internal/scheduled/scheduleIterable.ts b/packages/rxjs/src/internal/scheduled/scheduleIterable.ts index c6ca20453c..b90bc6472e 100644 --- a/packages/rxjs/src/internal/scheduled/scheduleIterable.ts +++ b/packages/rxjs/src/internal/scheduled/scheduleIterable.ts @@ -1,5 +1,5 @@ import { Observable, isFunction } from '../Observable.js'; -import { SchedulerLike } from '../types.js'; +import type { SchedulerLike } from '../types.js'; import { iterator as Symbol_iterator } from '../symbol/iterator.js'; import { executeSchedule } from '../util/executeSchedule.js'; diff --git a/packages/rxjs/src/internal/scheduled/scheduleObservable.ts b/packages/rxjs/src/internal/scheduled/scheduleObservable.ts index f7002acd23..43e216492f 100644 --- a/packages/rxjs/src/internal/scheduled/scheduleObservable.ts +++ b/packages/rxjs/src/internal/scheduled/scheduleObservable.ts @@ -1,7 +1,7 @@ import { from } from '../Observable.js'; import { observeOn } from '../operators/observeOn.js'; import { subscribeOn } from '../operators/subscribeOn.js'; -import { InteropObservable, SchedulerLike } from '../types.js'; +import type { InteropObservable, SchedulerLike } from '../types.js'; export function scheduleObservable(input: InteropObservable, scheduler: SchedulerLike) { return from(input).pipe(subscribeOn(scheduler), observeOn(scheduler)); diff --git a/packages/rxjs/src/internal/scheduled/schedulePromise.ts b/packages/rxjs/src/internal/scheduled/schedulePromise.ts index 377f64cc94..e8f7f6cd7d 100644 --- a/packages/rxjs/src/internal/scheduled/schedulePromise.ts +++ b/packages/rxjs/src/internal/scheduled/schedulePromise.ts @@ -1,7 +1,7 @@ import { from } from '../Observable.js'; import { observeOn } from '../operators/observeOn.js'; import { subscribeOn } from '../operators/subscribeOn.js'; -import { SchedulerLike } from '../types.js'; +import type { SchedulerLike } from '../types.js'; export function schedulePromise(input: PromiseLike, scheduler: SchedulerLike) { return from(input).pipe(subscribeOn(scheduler), observeOn(scheduler)); diff --git a/packages/rxjs/src/internal/scheduled/scheduleReadableStreamLike.ts b/packages/rxjs/src/internal/scheduled/scheduleReadableStreamLike.ts index 53a00a9368..9adbf2e0e3 100644 --- a/packages/rxjs/src/internal/scheduled/scheduleReadableStreamLike.ts +++ b/packages/rxjs/src/internal/scheduled/scheduleReadableStreamLike.ts @@ -1,5 +1,6 @@ -import { SchedulerLike, ReadableStreamLike } from '../types.js'; -import { Observable, readableStreamLikeToAsyncGenerator } from '../Observable.js'; +import type { SchedulerLike, ReadableStreamLike } from '../types.js'; +import type { Observable} from '../Observable.js'; +import { readableStreamLikeToAsyncGenerator } from '../Observable.js'; import { scheduleAsyncIterable } from './scheduleAsyncIterable.js'; export function scheduleReadableStreamLike(input: ReadableStreamLike, scheduler: SchedulerLike): Observable { diff --git a/packages/rxjs/src/internal/scheduled/scheduled.ts b/packages/rxjs/src/internal/scheduled/scheduled.ts index 38fb26ac26..76af570f08 100644 --- a/packages/rxjs/src/internal/scheduled/scheduled.ts +++ b/packages/rxjs/src/internal/scheduled/scheduled.ts @@ -3,8 +3,9 @@ import { schedulePromise } from './schedulePromise.js'; import { scheduleArray } from './scheduleArray.js'; import { scheduleIterable } from './scheduleIterable.js'; import { scheduleAsyncIterable } from './scheduleAsyncIterable.js'; -import { InteropObservable, ObservableInput, SchedulerLike } from '../types.js'; -import { Observable, ObservableInputType, getObservableInputType } from '../Observable.js'; +import type { InteropObservable, ObservableInput, SchedulerLike } from '../types.js'; +import type { Observable} from '../Observable.js'; +import { ObservableInputType, getObservableInputType } from '../Observable.js'; import { scheduleReadableStreamLike } from './scheduleReadableStreamLike.js'; /** diff --git a/packages/rxjs/src/internal/scheduler/Action.ts b/packages/rxjs/src/internal/scheduler/Action.ts index ff271648a8..6697d54be0 100644 --- a/packages/rxjs/src/internal/scheduler/Action.ts +++ b/packages/rxjs/src/internal/scheduler/Action.ts @@ -1,6 +1,6 @@ -import { Scheduler } from '../Scheduler.js'; +import type { Scheduler } from '../Scheduler.js'; import { Subscription } from '../Observable.js'; -import { SchedulerAction } from '../types.js'; +import type { SchedulerAction } from '../types.js'; /** * A unit of work to be executed in a `scheduler`. An action is typically diff --git a/packages/rxjs/src/internal/scheduler/AnimationFrameAction.ts b/packages/rxjs/src/internal/scheduler/AnimationFrameAction.ts index 3a0d7bb726..e292df0344 100644 --- a/packages/rxjs/src/internal/scheduler/AnimationFrameAction.ts +++ b/packages/rxjs/src/internal/scheduler/AnimationFrameAction.ts @@ -1,8 +1,8 @@ import { AsyncAction } from './AsyncAction.js'; -import { AnimationFrameScheduler } from './AnimationFrameScheduler.js'; -import { SchedulerAction } from '../types.js'; +import type { AnimationFrameScheduler } from './AnimationFrameScheduler.js'; +import type { SchedulerAction } from '../types.js'; import { animationFrameProvider } from './animationFrameProvider.js'; -import { TimerHandle } from './timerHandle.js'; +import type { TimerHandle } from './timerHandle.js'; export class AnimationFrameAction extends AsyncAction { constructor(protected scheduler: AnimationFrameScheduler, protected work: (this: SchedulerAction, state?: T) => void) { diff --git a/packages/rxjs/src/internal/scheduler/AnimationFrameScheduler.ts b/packages/rxjs/src/internal/scheduler/AnimationFrameScheduler.ts index 6a64beed67..591466450f 100644 --- a/packages/rxjs/src/internal/scheduler/AnimationFrameScheduler.ts +++ b/packages/rxjs/src/internal/scheduler/AnimationFrameScheduler.ts @@ -1,4 +1,4 @@ -import { AsyncAction } from './AsyncAction.js'; +import type { AsyncAction } from './AsyncAction.js'; import { AsyncScheduler } from './AsyncScheduler.js'; export class AnimationFrameScheduler extends AsyncScheduler { diff --git a/packages/rxjs/src/internal/scheduler/AsapAction.ts b/packages/rxjs/src/internal/scheduler/AsapAction.ts index 95beb0db15..e09a470345 100644 --- a/packages/rxjs/src/internal/scheduler/AsapAction.ts +++ b/packages/rxjs/src/internal/scheduler/AsapAction.ts @@ -1,8 +1,8 @@ import { AsyncAction } from './AsyncAction.js'; -import { AsapScheduler } from './AsapScheduler.js'; -import { SchedulerAction } from '../types.js'; +import type { AsapScheduler } from './AsapScheduler.js'; +import type { SchedulerAction } from '../types.js'; import { immediateProvider } from './immediateProvider.js'; -import { TimerHandle } from './timerHandle.js'; +import type { TimerHandle } from './timerHandle.js'; export class AsapAction extends AsyncAction { constructor(protected scheduler: AsapScheduler, protected work: (this: SchedulerAction, state?: T) => void) { diff --git a/packages/rxjs/src/internal/scheduler/AsapScheduler.ts b/packages/rxjs/src/internal/scheduler/AsapScheduler.ts index baa9d62e5c..15ac2ed116 100644 --- a/packages/rxjs/src/internal/scheduler/AsapScheduler.ts +++ b/packages/rxjs/src/internal/scheduler/AsapScheduler.ts @@ -1,4 +1,4 @@ -import { AsyncAction } from './AsyncAction.js'; +import type { AsyncAction } from './AsyncAction.js'; import { AsyncScheduler } from './AsyncScheduler.js'; export class AsapScheduler extends AsyncScheduler { diff --git a/packages/rxjs/src/internal/scheduler/AsyncAction.ts b/packages/rxjs/src/internal/scheduler/AsyncAction.ts index e7d9caf285..8ca7aa1cf8 100644 --- a/packages/rxjs/src/internal/scheduler/AsyncAction.ts +++ b/packages/rxjs/src/internal/scheduler/AsyncAction.ts @@ -1,10 +1,10 @@ import { Action } from './Action.js'; -import { SchedulerAction } from '../types.js'; -import { Subscription } from '../Observable.js'; -import { AsyncScheduler } from './AsyncScheduler.js'; +import type { SchedulerAction } from '../types.js'; +import type { Subscription } from '../Observable.js'; +import type { AsyncScheduler } from './AsyncScheduler.js'; import { intervalProvider } from './intervalProvider.js'; import { arrRemove } from '../util/arrRemove.js'; -import { TimerHandle } from './timerHandle.js'; +import type { TimerHandle } from './timerHandle.js'; export class AsyncAction extends Action { public id: TimerHandle | undefined; diff --git a/packages/rxjs/src/internal/scheduler/AsyncScheduler.ts b/packages/rxjs/src/internal/scheduler/AsyncScheduler.ts index 2428cdfb67..55979bc838 100644 --- a/packages/rxjs/src/internal/scheduler/AsyncScheduler.ts +++ b/packages/rxjs/src/internal/scheduler/AsyncScheduler.ts @@ -1,7 +1,7 @@ import { Scheduler } from '../Scheduler.js'; -import { Action } from './Action.js'; -import { AsyncAction } from './AsyncAction.js'; -import { TimerHandle } from './timerHandle.js'; +import type { Action } from './Action.js'; +import type { AsyncAction } from './AsyncAction.js'; +import type { TimerHandle } from './timerHandle.js'; export class AsyncScheduler extends Scheduler { public actions: Array> = []; diff --git a/packages/rxjs/src/internal/scheduler/QueueAction.ts b/packages/rxjs/src/internal/scheduler/QueueAction.ts index 62fd45584d..9f9e3dc933 100644 --- a/packages/rxjs/src/internal/scheduler/QueueAction.ts +++ b/packages/rxjs/src/internal/scheduler/QueueAction.ts @@ -1,8 +1,8 @@ import { AsyncAction } from './AsyncAction.js'; -import { Subscription } from '../Observable.js'; -import { QueueScheduler } from './QueueScheduler.js'; -import { SchedulerAction } from '../types.js'; -import { TimerHandle } from './timerHandle.js'; +import type { Subscription } from '../Observable.js'; +import type { QueueScheduler } from './QueueScheduler.js'; +import type { SchedulerAction } from '../types.js'; +import type { TimerHandle } from './timerHandle.js'; export class QueueAction extends AsyncAction { constructor(protected scheduler: QueueScheduler, protected work: (this: SchedulerAction, state?: T) => void) { diff --git a/packages/rxjs/src/internal/scheduler/VirtualTimeScheduler.ts b/packages/rxjs/src/internal/scheduler/VirtualTimeScheduler.ts index 82e10f127e..1d8a54fe5e 100644 --- a/packages/rxjs/src/internal/scheduler/VirtualTimeScheduler.ts +++ b/packages/rxjs/src/internal/scheduler/VirtualTimeScheduler.ts @@ -1,8 +1,8 @@ import { AsyncAction } from './AsyncAction.js'; import { Subscription } from '../Observable.js'; import { AsyncScheduler } from './AsyncScheduler.js'; -import { SchedulerAction } from '../types.js'; -import { TimerHandle } from './timerHandle.js'; +import type { SchedulerAction } from '../types.js'; +import type { TimerHandle } from './timerHandle.js'; export class VirtualTimeScheduler extends AsyncScheduler { /** @deprecated Not used in VirtualTimeScheduler directly. Will be removed in v8. */ diff --git a/packages/rxjs/src/internal/scheduler/dateTimestampProvider.ts b/packages/rxjs/src/internal/scheduler/dateTimestampProvider.ts index ef7616f74b..b278bb98f4 100644 --- a/packages/rxjs/src/internal/scheduler/dateTimestampProvider.ts +++ b/packages/rxjs/src/internal/scheduler/dateTimestampProvider.ts @@ -1,4 +1,4 @@ -import { TimestampProvider } from '../types.js'; +import type { TimestampProvider } from '../types.js'; interface DateTimestampProvider extends TimestampProvider { delegate: TimestampProvider | undefined; diff --git a/packages/rxjs/src/internal/scheduler/performanceTimestampProvider.ts b/packages/rxjs/src/internal/scheduler/performanceTimestampProvider.ts index 1c260ca776..1d910911cd 100644 --- a/packages/rxjs/src/internal/scheduler/performanceTimestampProvider.ts +++ b/packages/rxjs/src/internal/scheduler/performanceTimestampProvider.ts @@ -1,4 +1,4 @@ -import { TimestampProvider } from '../types.js'; +import type { TimestampProvider } from '../types.js'; interface PerformanceTimestampProvider extends TimestampProvider { delegate: TimestampProvider | undefined; diff --git a/packages/rxjs/src/internal/testing/ColdObservable.ts b/packages/rxjs/src/internal/testing/ColdObservable.ts index b776d0f3ff..a74a89a21c 100644 --- a/packages/rxjs/src/internal/testing/ColdObservable.ts +++ b/packages/rxjs/src/internal/testing/ColdObservable.ts @@ -1,8 +1,10 @@ -import { Observable, Subscriber, Subscription } from '../Observable.js'; -import { TestMessage } from './TestMessage.js'; +import type { Subscriber} from '../Observable.js'; +import { Observable, Subscription } from '../Observable.js'; +import type { TestMessage } from './TestMessage.js'; import { observeNotification } from '../Notification.js'; -import { SchedulerLike, TeardownLogic } from '../types.js'; -import { logSubscribedFrame, logUnsubscribedFrame, SubscriptionLog } from './subscription-logging.js'; +import type { SchedulerLike, TeardownLogic } from '../types.js'; +import type { SubscriptionLog } from './subscription-logging.js'; +import { logSubscribedFrame, logUnsubscribedFrame } from './subscription-logging.js'; export class ColdObservable extends Observable { public subscriptions: SubscriptionLog[] = []; diff --git a/packages/rxjs/src/internal/testing/HotObservable.ts b/packages/rxjs/src/internal/testing/HotObservable.ts index 279e5c07db..16c179472b 100644 --- a/packages/rxjs/src/internal/testing/HotObservable.ts +++ b/packages/rxjs/src/internal/testing/HotObservable.ts @@ -1,9 +1,11 @@ import { Subject } from '../Subject.js'; -import { Subscriber, Subscription } from '../Observable.js'; -import { Scheduler } from '../Scheduler.js'; -import { TestMessage } from './TestMessage.js'; +import type { Subscriber} from '../Observable.js'; +import { Subscription } from '../Observable.js'; +import type { Scheduler } from '../Scheduler.js'; +import type { TestMessage } from './TestMessage.js'; import { observeNotification } from '../Notification.js'; -import { logSubscribedFrame, logUnsubscribedFrame, SubscriptionLog } from './subscription-logging.js'; +import type { SubscriptionLog } from './subscription-logging.js'; +import { logSubscribedFrame, logUnsubscribedFrame } from './subscription-logging.js'; export class HotObservable extends Subject { public subscriptions: SubscriptionLog[] = []; diff --git a/packages/rxjs/src/internal/testing/TestMessage.ts b/packages/rxjs/src/internal/testing/TestMessage.ts index 7702671abc..401839b673 100644 --- a/packages/rxjs/src/internal/testing/TestMessage.ts +++ b/packages/rxjs/src/internal/testing/TestMessage.ts @@ -1,4 +1,4 @@ -import { ObservableNotification } from '../types.js'; +import type { ObservableNotification } from '../types.js'; export interface TestMessage { frame: number; diff --git a/packages/rxjs/src/internal/testing/TestScheduler.ts b/packages/rxjs/src/internal/testing/TestScheduler.ts index 55aed469ca..b4fd51a37b 100644 --- a/packages/rxjs/src/internal/testing/TestScheduler.ts +++ b/packages/rxjs/src/internal/testing/TestScheduler.ts @@ -1,10 +1,11 @@ -import { Observable, Subscription, COMPLETE_NOTIFICATION, errorNotification, nextNotification } from '../Observable.js'; +import type { Subscription} from '../Observable.js'; +import { Observable, COMPLETE_NOTIFICATION, errorNotification, nextNotification } from '../Observable.js'; import { ColdObservable } from './ColdObservable.js'; import { HotObservable } from './HotObservable.js'; -import { TestMessage } from './TestMessage.js'; +import type { TestMessage } from './TestMessage.js'; import { SubscriptionLog } from './subscription-logging.js'; import { VirtualTimeScheduler, VirtualAction } from '../scheduler/VirtualTimeScheduler.js'; -import { ObservableNotification } from '../types.js'; +import type { ObservableNotification } from '../types.js'; import { dateTimestampProvider } from '../scheduler/dateTimestampProvider.js'; import { performanceTimestampProvider } from '../scheduler/performanceTimestampProvider.js'; import { animationFrameProvider } from '../scheduler/animationFrameProvider.js'; diff --git a/packages/rxjs/src/internal/types.ts b/packages/rxjs/src/internal/types.ts index 236047d361..0263f7948c 100644 --- a/packages/rxjs/src/internal/types.ts +++ b/packages/rxjs/src/internal/types.ts @@ -1,7 +1,7 @@ // https://github.com/microsoft/TypeScript/issues/40462#issuecomment-689879308 /// -import { Observable, Subscription } from './Observable.js'; +import type { Observable, Subscription } from './Observable.js'; /** * Note: This will add Symbol.observable globally for all TypeScript users, diff --git a/packages/rxjs/src/internal/util/args.ts b/packages/rxjs/src/internal/util/args.ts index 09eb37a829..252371dbdc 100644 --- a/packages/rxjs/src/internal/util/args.ts +++ b/packages/rxjs/src/internal/util/args.ts @@ -1,4 +1,4 @@ -import { SchedulerLike } from '../types.js'; +import type { SchedulerLike } from '../types.js'; import { isFunction } from '../Observable.js'; import { isScheduler } from './isScheduler.js'; diff --git a/packages/rxjs/src/internal/util/executeSchedule.ts b/packages/rxjs/src/internal/util/executeSchedule.ts index 186a856fab..3250baa0f9 100644 --- a/packages/rxjs/src/internal/util/executeSchedule.ts +++ b/packages/rxjs/src/internal/util/executeSchedule.ts @@ -1,5 +1,5 @@ -import { Subscription } from '../Observable.js'; -import { SchedulerAction, SchedulerLike } from '../types.js'; +import type { Subscription } from '../Observable.js'; +import type { SchedulerAction, SchedulerLike } from '../types.js'; export function executeSchedule( parentSubscription: Subscription, diff --git a/packages/rxjs/src/internal/util/isScheduler.ts b/packages/rxjs/src/internal/util/isScheduler.ts index be44bbf85b..865645b0ae 100644 --- a/packages/rxjs/src/internal/util/isScheduler.ts +++ b/packages/rxjs/src/internal/util/isScheduler.ts @@ -1,4 +1,4 @@ -import { SchedulerLike } from '../types.js'; +import type { SchedulerLike } from '../types.js'; import { isFunction } from '../Observable.js'; export function isScheduler(value: any): value is SchedulerLike { diff --git a/packages/rxjs/src/internal/util/mapOneOrManyArgs.ts b/packages/rxjs/src/internal/util/mapOneOrManyArgs.ts index a2a8908c9b..f1dd3482f9 100644 --- a/packages/rxjs/src/internal/util/mapOneOrManyArgs.ts +++ b/packages/rxjs/src/internal/util/mapOneOrManyArgs.ts @@ -1,4 +1,4 @@ -import { OperatorFunction } from '../types.js'; +import type { OperatorFunction } from '../types.js'; import { map } from '../operators/map.js'; const { isArray } = Array; diff --git a/packages/rxjs/src/internal/util/pipe.ts b/packages/rxjs/src/internal/util/pipe.ts index ae994820a5..8f20fa0825 100644 --- a/packages/rxjs/src/internal/util/pipe.ts +++ b/packages/rxjs/src/internal/util/pipe.ts @@ -1,4 +1,4 @@ -import { UnaryFunction } from '../types.js'; +import type { UnaryFunction } from '../types.js'; export function pipe(): (x: T) => T; export function pipe(fn1: UnaryFunction): UnaryFunction; diff --git a/packages/rxjs/src/internal/util/rx.ts b/packages/rxjs/src/internal/util/rx.ts index 11310633d0..a04e3c8f59 100644 --- a/packages/rxjs/src/internal/util/rx.ts +++ b/packages/rxjs/src/internal/util/rx.ts @@ -1,5 +1,6 @@ -import { Observable, from } from '../Observable.js'; -import { ObservableInput, UnaryFunction } from '../types.js'; +import type { Observable} from '../Observable.js'; +import { from } from '../Observable.js'; +import type { ObservableInput, UnaryFunction } from '../types.js'; export function rx(source: ObservableInput): Observable; export function rx(source: ObservableInput, fn2: UnaryFunction, B>): B; diff --git a/packages/rxjs/src/operators/index.ts b/packages/rxjs/src/operators/index.ts index 01f9e16838..fbbf558f4b 100644 --- a/packages/rxjs/src/operators/index.ts +++ b/packages/rxjs/src/operators/index.ts @@ -13,7 +13,8 @@ export { concatAll } from '../internal/operators/concatAll.js'; export { concatMap } from '../internal/operators/concatMap.js'; export { concatMapTo } from '../internal/operators/concatMapTo.js'; export { concatWith } from '../internal/operators/concatWith.js'; -export { connect, ConnectConfig } from '../internal/operators/connect.js'; +export type { ConnectConfig } from '../internal/operators/connect.js'; +export { connect } from '../internal/operators/connect.js'; export { count } from '../internal/operators/count.js'; export { debounce } from '../internal/operators/debounce.js'; export { debounceTime } from '../internal/operators/debounceTime.js'; @@ -35,7 +36,8 @@ export { finalize } from '../internal/operators/finalize.js'; export { find } from '../internal/operators/find.js'; export { findIndex } from '../internal/operators/findIndex.js'; export { first } from '../internal/operators/first.js'; -export { groupBy, BasicGroupByOptions, GroupByOptionsWithElement } from '../internal/operators/groupBy.js'; +export type { BasicGroupByOptions, GroupByOptionsWithElement } from '../internal/operators/groupBy.js'; +export { groupBy } from '../internal/operators/groupBy.js'; export { ignoreElements } from '../internal/operators/ignoreElements.js'; export { isEmpty } from '../internal/operators/isEmpty.js'; export { last } from '../internal/operators/last.js'; @@ -55,16 +57,20 @@ export { pairwise } from '../internal/operators/pairwise.js'; export { partition } from '../internal/operators/partition.js'; export { raceWith } from '../internal/operators/raceWith.js'; export { reduce } from '../internal/operators/reduce.js'; -export { repeat, RepeatConfig } from '../internal/operators/repeat.js'; +export type { RepeatConfig } from '../internal/operators/repeat.js'; +export { repeat } from '../internal/operators/repeat.js'; export { repeatWhen } from '../internal/operators/repeatWhen.js'; -export { retry, RetryConfig } from '../internal/operators/retry.js'; +export type { RetryConfig } from '../internal/operators/retry.js'; +export { retry } from '../internal/operators/retry.js'; export { retryWhen } from '../internal/operators/retryWhen.js'; export { sample } from '../internal/operators/sample.js'; export { sampleTime } from '../internal/operators/sampleTime.js'; export { scan } from '../internal/operators/scan.js'; export { sequenceEqual } from '../internal/operators/sequenceEqual.js'; -export { share, ShareConfig } from '../internal/operators/share.js'; -export { shareReplay, ShareReplayConfig } from '../internal/operators/shareReplay.js'; +export type { ShareConfig } from '../internal/operators/share.js'; +export { share } from '../internal/operators/share.js'; +export type { ShareReplayConfig } from '../internal/operators/shareReplay.js'; +export { shareReplay } from '../internal/operators/shareReplay.js'; export { single } from '../internal/operators/single.js'; export { skip } from '../internal/operators/skip.js'; export { skipLast } from '../internal/operators/skipLast.js'; @@ -80,12 +86,15 @@ export { take } from '../internal/operators/take.js'; export { takeLast } from '../internal/operators/takeLast.js'; export { takeUntil } from '../internal/operators/takeUntil.js'; export { takeWhile } from '../internal/operators/takeWhile.js'; -export { tap, TapObserver } from '../internal/operators/tap.js'; -export { throttle, ThrottleConfig } from '../internal/operators/throttle.js'; +export type { TapObserver } from '../internal/operators/tap.js'; +export { tap } from '../internal/operators/tap.js'; +export type { ThrottleConfig } from '../internal/operators/throttle.js'; +export { throttle } from '../internal/operators/throttle.js'; export { throttleTime } from '../internal/operators/throttleTime.js'; export { throwIfEmpty } from '../internal/operators/throwIfEmpty.js'; export { timeInterval } from '../internal/operators/timeInterval.js'; -export { timeout, TimeoutConfig, TimeoutInfo } from '../internal/operators/timeout.js'; +export type { TimeoutConfig, TimeoutInfo } from '../internal/operators/timeout.js'; +export { timeout } from '../internal/operators/timeout.js'; export { timeoutWith } from '../internal/operators/timeoutWith.js'; export { timestamp } from '../internal/operators/timestamp.js'; export { toArray } from '../internal/operators/toArray.js'; diff --git a/packages/rxjs/src/testing/index.ts b/packages/rxjs/src/testing/index.ts index 435945e455..c4b3462ab6 100644 --- a/packages/rxjs/src/testing/index.ts +++ b/packages/rxjs/src/testing/index.ts @@ -1 +1,2 @@ -export { TestScheduler, RunHelpers } from '../internal/testing/TestScheduler.js'; +export type { RunHelpers } from '../internal/testing/TestScheduler.js'; +export { TestScheduler } from '../internal/testing/TestScheduler.js'; diff --git a/packages/rxjs/src/webSocket/index.ts b/packages/rxjs/src/webSocket/index.ts index 46ed4d7a2c..7dcb5c86f8 100644 --- a/packages/rxjs/src/webSocket/index.ts +++ b/packages/rxjs/src/webSocket/index.ts @@ -1,2 +1,3 @@ export { webSocket as webSocket } from '../internal/observable/dom/webSocket.js'; -export { WebSocketSubject, WebSocketSubjectConfig } from '../internal/observable/dom/WebSocketSubject.js'; +export type { WebSocketSubjectConfig } from '../internal/observable/dom/WebSocketSubject.js'; +export { WebSocketSubject } from '../internal/observable/dom/WebSocketSubject.js';