mirror of
https://github.com/Tonejs/Tone.js
synced 2024-12-31 22:18:44 +00:00
61c9f191b6
getting rid of tslint from project and using eslint instead
13 lines
322 B
TypeScript
13 lines
322 B
TypeScript
/**
|
|
* Assert that the statement is true, otherwise invoke an error with the given message.
|
|
*/
|
|
export function assert(statement: boolean, error: string): void {
|
|
if (!statement) {
|
|
throw new Error(error);
|
|
}
|
|
}
|
|
|
|
export function log(...args: any[]): void {
|
|
// eslint-disable-next-line no-console
|
|
console.log(...args);
|
|
}
|