ds4/src/module/helpers.ts

11 lines
284 B
TypeScript
Raw Normal View History

2021-06-26 22:02:00 +02:00
// SPDX-FileCopyrightText: 2021 Johannes Loher
//
// SPDX-License-Identifier: MIT
export function getCanvas(): Canvas {
if (!(canvas instanceof Canvas) || !canvas.ready) {
throw new Error(game.i18n.localize("DS4.ErrorCanvasIsNotInitialized"));
}
return canvas;
}