Moved to ts (#6593)

* Moved to ts

* Fixed type check

* Removed js suffixes

* Migrated to ts

* Fixed ts.

* Fixed type check

* Installed missing d ts
This commit is contained in:
SamTV12345 2024-08-17 20:14:36 +02:00 committed by GitHub
parent 5ee2c4e7f8
commit 7e3ad03e2f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
81 changed files with 961 additions and 830 deletions

View file

@ -21,8 +21,8 @@
const db = require('./DB');
const CustomError = require('../utils/customError');
const hooks = require('../../static/js/pluginfw/hooks.js');
const {randomString, padutils: {warnDeprecated}} = require('../../static/js/pad_utils');
const hooks = require('../../static/js/pluginfw/hooks');
import padutils, {randomString} from "../../static/js/pad_utils";
exports.getColorPalette = () => [
'#ffc7c7',
@ -169,7 +169,7 @@ exports.getAuthorId = async (token: string, user: object) => {
* @param {String} token The token
*/
exports.getAuthor4Token = async (token: string) => {
warnDeprecated(
padutils.warnDeprecated(
'AuthorManager.getAuthor4Token() is deprecated; use AuthorManager.getAuthorId() instead');
return await getAuthor4Token(token);
};