Skip to content

Commit

Permalink
fix typings for tone after #862
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyhalight committed Oct 16, 2024
1 parent 2376a76 commit 3c2941b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
Binary file modified bun.lockb
Binary file not shown.
1 change: 1 addition & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export default [
protobuf: "readonly",
Hls: "readonly",
anime: "readonly",
Tone: "readonly",
// WEBPACK ENVIRONMENT
DEBUG_MODE: "readonly",
AVAILABLE_LOCALES: "readonly",
Expand Down
16 changes: 13 additions & 3 deletions src/global.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
const DEBUG_MODE: boolean;
const IS_BETA_VERSION: boolean;
const AVAILABLE_LOCALES: string[];
import type { GrainPlayer as GrainPlayerType } from "tone";

declare global {
const DEBUG_MODE: boolean;
const IS_BETA_VERSION: boolean;
const AVAILABLE_LOCALES: string[];
const Tone: {
GrainPlayer: typeof GrainPlayerType;
};
namespace Tone {
export type GrainPlayer = GrainPlayerType;
}
}
1 change: 1 addition & 0 deletions src/utils/player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { localizationProvider } from "../localization/localizationProvider.js";
import { votStorage } from "./storage.js";
import { VOTLocalizedError } from "./VOTLocalizedError.js";
import { decibelsToPercent, percentToDecibels } from "./volume.js";
// import { Tone } from "../global";

const videoLipSyncEvents = [
"playing",
Expand Down

0 comments on commit 3c2941b

Please sign in to comment.