Skip to content

Commit

Permalink
chore: update all type imports to explicitly use the type keyword. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
cjpillsbury authored Apr 4, 2024
1 parent f54b252 commit 86d5267
Show file tree
Hide file tree
Showing 15 changed files with 37 additions and 29 deletions.
9 changes: 7 additions & 2 deletions src/controller/base-playlist-controller.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import type Hls from '../hls';
import type { NetworkComponentAPI } from '../types/component-api';
import { getSkipValue, HlsSkip, HlsUrlParameters, Level } from '../types/level';
import {
getSkipValue,
HlsSkip,
HlsUrlParameters,
type Level,
} from '../types/level';
import { computeReloadInterval, mergeDetails } from '../utils/level-helper';
import { ErrorData } from '../types/events';
import type { ErrorData } from '../types/events';
import { getRetryDelay, isTimeoutError } from '../utils/error-helper';
import { NetworkErrorAction } from './error-controller';
import { Logger } from '../utils/logger';
Expand Down
2 changes: 1 addition & 1 deletion src/controller/cmcd-controller.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Events } from '../events';
import Hls from '../hls';
import type Hls from '../hls';
import { Cmcd } from '@svta/common-media-library/cmcd/Cmcd';
import { CmcdObjectType } from '@svta/common-media-library/cmcd/CmcdObjectType';
import { CmcdStreamingFormat } from '@svta/common-media-library/cmcd/CmcdStreamingFormat';
Expand Down
2 changes: 1 addition & 1 deletion src/controller/level-controller.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {
import type {
ManifestLoadedData,
ManifestParsedData,
LevelLoadedData,
Expand Down
16 changes: 8 additions & 8 deletions src/demux/audio/base-audio-demuxer.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import {
DemuxerResult,
Demuxer,
DemuxedAudioTrack,
AudioFrame,
DemuxedMetadataTrack,
DemuxedVideoTrackBase,
DemuxedUserdataTrack,
KeyData,
type DemuxerResult,
type Demuxer,
type DemuxedAudioTrack,
type AudioFrame,
type DemuxedMetadataTrack,
type DemuxedVideoTrackBase,
type DemuxedUserdataTrack,
type KeyData,
MetadataSchema,
} from '../../types/demuxer';
import { dummyTrack } from '../dummy-demuxed-track';
Expand Down
2 changes: 1 addition & 1 deletion src/demux/audio/mpegaudio.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* MPEG parser helper
*/
import { DemuxedAudioTrack } from '../../types/demuxer';
import type { DemuxedAudioTrack } from '../../types/demuxer';

let chromeVersion: number | null = null;

Expand Down
14 changes: 7 additions & 7 deletions src/demux/mp4demuxer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
* MP4 demuxer
*/
import {
Demuxer,
DemuxerResult,
PassthroughTrack,
DemuxedAudioTrack,
DemuxedUserdataTrack,
DemuxedMetadataTrack,
KeyData,
type Demuxer,
type DemuxerResult,
type PassthroughTrack,
type DemuxedAudioTrack,
type DemuxedUserdataTrack,
type DemuxedMetadataTrack,
type KeyData,
MetadataSchema,
} from '../types/demuxer';
import {
Expand Down
5 changes: 4 additions & 1 deletion src/demux/video/hevc-video-parser.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import BaseVideoParser from './base-video-parser';
import { DemuxedVideoTrack, DemuxedUserdataTrack } from '../../types/demuxer';
import type {
DemuxedVideoTrack,
DemuxedUserdataTrack,
} from '../../types/demuxer';
import { parseSEIMessageFromNALu } from '../../utils/mp4-tools';

import type { PES } from '../tsdemuxer';
Expand Down
2 changes: 1 addition & 1 deletion src/events.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {
import type {
ManifestLoadedData,
ManifestLoadingData,
MediaAttachedData,
Expand Down
2 changes: 1 addition & 1 deletion src/exports-named.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Hls from './hls';
import { Events } from './events';
import { ErrorTypes, ErrorDetails } from './errors';
import { Level } from './types/level';
import type { Level } from './types/level';
import AbrController from './controller/abr-controller';
import AudioTrackController from './controller/audio-track-controller';
import AudioStreamController from './controller/audio-stream-controller';
Expand Down
2 changes: 1 addition & 1 deletion src/loader/fragment-loader.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ErrorTypes, ErrorDetails } from '../errors';
import { Fragment } from './fragment';
import {
import type {
Loader,
LoaderConfiguration,
FragmentLoaderContext,
Expand Down
2 changes: 1 addition & 1 deletion src/loader/key-loader.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ErrorTypes, ErrorDetails } from '../errors';
import {
import type {
LoaderStats,
LoaderResponse,
LoaderConfiguration,
Expand Down
2 changes: 1 addition & 1 deletion src/remux/mp4-remuxer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { HlsEventEmitter } from '../events';
import { Events } from '../events';
import { ErrorTypes, ErrorDetails } from '../errors';
import { logger } from '../utils/logger';
import {
import type {
InitSegmentData,
Remuxer,
RemuxerResult,
Expand Down
2 changes: 1 addition & 1 deletion src/types/component-api.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import EwmaBandWidthEstimator from '../utils/ewma-bandwidth-estimator';
import type EwmaBandWidthEstimator from '../utils/ewma-bandwidth-estimator';

export interface ComponentAPI {
destroy(): void;
Expand Down
2 changes: 1 addition & 1 deletion src/types/remuxer.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { TrackSet } from './track';
import {
import type {
DemuxedAudioTrack,
DemuxedMetadataTrack,
DemuxedUserdataTrack,
Expand Down
2 changes: 1 addition & 1 deletion src/utils/fetch-loader.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {
import type {
LoaderCallbacks,
LoaderContext,
Loader,
Expand Down

0 comments on commit 86d5267

Please sign in to comment.