Merge pull request #847 from vibertthio/fix-docs

Fix docs of class Tone
This commit is contained in:
Yotam Mann 2021-02-26 09:44:43 -05:00 committed by GitHub
commit 646330b485
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View file

@ -16,7 +16,8 @@ import { log } from "./util/Debug";
export interface BaseToneOptions { }
/**
* @class Tone is the base class of all other classes.
* Tone is the base class of all other classes.
*
* @category Core
* @constructor
*/

View file

@ -18,7 +18,7 @@ type ClassesWithoutSingletons = Omit<typeof Classes, "Transport" | "Destination"
* The exported Tone object. Contains all of the classes that default
* to the same context and contains a singleton Transport and Destination node.
*/
type Tone = {
type ToneObject = {
Transport: Transport;
Destination: Destination;
Listener: Listener;
@ -39,7 +39,7 @@ function bindTypeClass(context: Context, type) {
* Return an object with all of the classes bound to the passed in context
* @param context The context to bind all of the nodes to
*/
export function fromContext(context: Context): Tone {
export function fromContext(context: Context): ToneObject {
const classesWithContext: Partial<ClassesWithoutSingletons> = {};
Object.keys(omitFromObject(Classes, ["Transport", "Destination", "Draw"])).map(key => {
@ -56,7 +56,7 @@ export function fromContext(context: Context): Tone {
}
});
const toneFromContext: Tone = {
const toneFromContext: ToneObject = {
...(classesWithContext as ClassesWithoutSingletons),
now: context.now.bind(context),
immediate: context.immediate.bind(context),