chore(monorepo/server): integrate type definitions

This commit is contained in:
Elian Doran
2025-04-18 11:59:00 +03:00
parent 9a2cd6b5b8
commit da41b95d36
7 changed files with 58 additions and 15 deletions

View File

@@ -20,5 +20,8 @@
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"devDependencies": {
"turndown": "7.2.0"
}
}

20
apps/server/tsconfig.json Normal file
View File

@@ -0,0 +1,20 @@
{
"compilerOptions": {
"module": "NodeNext",
"declaration": false,
"sourceMap": true,
"outDir": "./build",
"strict": true,
"noImplicitAny": true,
"resolveJsonModule": true,
"lib": ["ES2023"],
"downlevelIteration": true,
"skipLibCheck": true,
"esModuleInterop": true,
"verbatimModuleSyntax": true
},
"include": [ "./src/**/*.ts" ],
"files": [
"./src/types.d.ts",
]
}

32
apps/server/types.d.ts vendored Normal file
View File

@@ -0,0 +1,32 @@
/*
* This file contains type definitions for libraries that did not have one
* in its library or in `@types/*` packages.
*/
declare module "unescape" {
function unescape(str: string, type?: string): string;
export default unescape;
}
declare module "html2plaintext" {
function html2plaintext(htmlText: string): string;
export default html2plaintext;
}
declare module "normalize-strings" {
function normalizeString(string: string): string;
export default normalizeString;
}
declare module "@joplin/turndown-plugin-gfm" {
import TurndownService from "turndown";
namespace gfm {
function gfm(service: TurndownService): void;
}
export default gfm;
}
declare module "is-animated" {
function isAnimated(buffer: Buffer): boolean;
export default isAnimated;
}