mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-06-11 16:30:24 +01:00
Migrate all remaining migratable .js/.mjs files to .ts with strong typing:
- constants/MediaTypes: as const + derived MediaType union
- utils/profiles/{download,subtitles,trackplayer}: typed against
@jellyfin/sdk DeviceProfile/SubtitleProfile/CodecProfile models;
native.ts now validates its profile with `satisfies DeviceProfile`
- trackplayer.d.ts removed (superseded by real TS implementation)
- index.js -> index.ts (entry point, "main" is extension-less)
- scripts/{typecheck,check-i18n-keys,detect-duplicate-issue} -> .ts,
all run via bun (typecheck switched from node to bun)
Remove scripts/symlink-native-dirs.js: dead since 446439c2 (2025-02-28)
when its only reference (prebuild:tv-new) was dropped; superseded by
`expo prebuild --clean` + cross-env EXPO_TV. Drop the matching
.gitignore relics (/iostv, /iosmobile, /androidmobile, /androidtv).
Document tooling-required .js exceptions (babel/metro/react-native/
tailwind configs) in CLAUDE.md and copilot-instructions.md so code
review guidelines stop flagging them.
11 lines
374 B
TypeScript
11 lines
374 B
TypeScript
import "react-native-url-polyfill/auto";
|
|
import { Platform } from "react-native";
|
|
import "expo-router/entry";
|
|
|
|
// TrackPlayer is not supported on tvOS
|
|
if (!Platform.isTV) {
|
|
const TrackPlayer = require("react-native-track-player").default;
|
|
const { PlaybackService } = require("./services/PlaybackService");
|
|
TrackPlayer.registerPlaybackService(() => PlaybackService);
|
|
}
|