UNPKG

1.04 kBTypeScriptView Raw
1import * as Classes from "./classes.js";
2import { TransportClass } from "./core/clock/Transport.js";
3import { Context } from "./core/context/Context.js";
4import { ListenerClass } from "./core/context/Listener.js";
5import { DestinationClass } from "./core/context/Destination.js";
6import { DrawClass } from "./core/util/Draw.js";
7type ClassesWithoutSingletons = Omit<typeof Classes, "Transport" | "Destination" | "Draw">;
8/**
9 * The exported Tone object. Contains all of the classes that default
10 * to the same context and contains a singleton Transport and Destination node.
11 */
12type ToneObject = {
13 Transport: TransportClass;
14 Destination: DestinationClass;
15 Listener: ListenerClass;
16 Draw: DrawClass;
17 context: Context;
18 now: () => number;
19 immediate: () => number;
20} & ClassesWithoutSingletons;
21/**
22 * Return an object with all of the classes bound to the passed in context
23 * @param context The context to bind all of the nodes to
24 */
25export declare function fromContext(context: Context): ToneObject;
26export {};