@baruchiro/paperless-mcp 0.0.0-test1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,316 @@
1
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp";
2
+ import { CallToolResult } from "@modelcontextprotocol/sdk/types";
3
+ import { z } from "zod";
4
+ import { PaperlessAPI } from "../api/PaperlessAPI";
5
+ import { DocumentsResponse } from "../api/types";
6
+ import { errorMiddleware } from "./utils/middlewares";
7
+
8
+ export function registerDocumentTools(server: McpServer, api: PaperlessAPI) {
9
+ server.tool(
10
+ "bulk_edit_documents",
11
+ {
12
+ documents: z.array(z.number()),
13
+ method: z.enum([
14
+ "set_correspondent",
15
+ "set_document_type",
16
+ "set_storage_path",
17
+ "add_tag",
18
+ "remove_tag",
19
+ "modify_tags",
20
+ "delete",
21
+ "reprocess",
22
+ "set_permissions",
23
+ "merge",
24
+ "split",
25
+ "rotate",
26
+ "delete_pages",
27
+ ]),
28
+ correspondent: z.number().optional(),
29
+ document_type: z.number().optional(),
30
+ storage_path: z.number().optional(),
31
+ tag: z.number().optional(),
32
+ add_tags: z.array(z.number()).optional(),
33
+ remove_tags: z.array(z.number()).optional(),
34
+ permissions: z
35
+ .object({
36
+ owner: z.number().nullable().optional(),
37
+ set_permissions: z
38
+ .object({
39
+ view: z.object({
40
+ users: z.array(z.number()),
41
+ groups: z.array(z.number()),
42
+ }),
43
+ change: z.object({
44
+ users: z.array(z.number()),
45
+ groups: z.array(z.number()),
46
+ }),
47
+ })
48
+ .optional(),
49
+ merge: z.boolean().optional(),
50
+ })
51
+ .optional(),
52
+ metadata_document_id: z.number().optional(),
53
+ delete_originals: z.boolean().optional(),
54
+ pages: z.string().optional(),
55
+ degrees: z.number().optional(),
56
+ },
57
+ errorMiddleware(async (args, extra) => {
58
+ if (!api) throw new Error("Please configure API connection first");
59
+ const { documents, method, ...parameters } = args;
60
+ const response = await api.bulkEditDocuments(
61
+ documents,
62
+ method,
63
+ parameters
64
+ );
65
+ return {
66
+ content: [
67
+ {
68
+ type: "text",
69
+ text: JSON.stringify({ result: response.result || response }),
70
+ },
71
+ ],
72
+ };
73
+ })
74
+ );
75
+
76
+ server.tool(
77
+ "post_document",
78
+ {
79
+ file: z.string(),
80
+ filename: z.string(),
81
+ title: z.string().optional(),
82
+ created: z.string().optional(),
83
+ correspondent: z.number().optional(),
84
+ document_type: z.number().optional(),
85
+ storage_path: z.number().optional(),
86
+ tags: z.array(z.number()).optional(),
87
+ archive_serial_number: z.string().optional(),
88
+ custom_fields: z.array(z.number()).optional(),
89
+ },
90
+ errorMiddleware(async (args, extra) => {
91
+ if (!api) throw new Error("Please configure API connection first");
92
+ const binaryData = Buffer.from(args.file, "base64");
93
+ const blob = new Blob([binaryData]);
94
+ const file = new File([blob], args.filename);
95
+ const { file: _, filename: __, ...metadata } = args;
96
+ const response = await api.postDocument(file, metadata);
97
+ let result;
98
+ if (typeof response === "string" && /^\d+$/.test(response)) {
99
+ result = { id: Number(response) };
100
+ } else {
101
+ result = { status: response };
102
+ }
103
+ return {
104
+ content: [
105
+ {
106
+ type: "text",
107
+ text: JSON.stringify(result),
108
+ },
109
+ ],
110
+ };
111
+ })
112
+ );
113
+
114
+ server.tool(
115
+ "list_documents",
116
+ "List and filter documents by fields such as title, correspondent, document type, tag, storage path, creation date, and more. IMPORTANT: For queries like 'the last 3 contributions' or when searching by tag, correspondent, document type, or storage path, you should FIRST use the relevant tool (e.g., 'list_tags', 'list_correspondents', 'list_document_types', 'list_storage_paths') to find the correct ID, and then use that ID as a filter here. Only use the 'search' argument for free-text search when no specific field applies. Using the correct ID filter will yield much more accurate results.",
117
+ {
118
+ page: z.number().optional(),
119
+ page_size: z.number().optional(),
120
+ search: z.string().optional(),
121
+ correspondent: z.number().optional(),
122
+ document_type: z.number().optional(),
123
+ tag: z.number().optional(),
124
+ storage_path: z.number().optional(),
125
+ created__gte: z.string().optional(),
126
+ created__lte: z.string().optional(),
127
+ ordering: z.string().optional(),
128
+ },
129
+ errorMiddleware(async (args, extra) => {
130
+ if (!api) throw new Error("Please configure API connection first");
131
+ const query = new URLSearchParams();
132
+ if (args.page) query.set("page", args.page.toString());
133
+ if (args.page_size) query.set("page_size", args.page_size.toString());
134
+ if (args.search) query.set("search", args.search);
135
+ if (args.correspondent)
136
+ query.set("correspondent__id", args.correspondent.toString());
137
+ if (args.document_type)
138
+ query.set("document_type__id", args.document_type.toString());
139
+ if (args.tag) query.set("tags__id", args.tag.toString());
140
+ if (args.storage_path)
141
+ query.set("storage_path__id", args.storage_path.toString());
142
+ if (args.created__gte) query.set("created__gte", args.created__gte);
143
+ if (args.created__lte) query.set("created__lte", args.created__lte);
144
+ if (args.ordering) query.set("ordering", args.ordering);
145
+
146
+ const docsResponse = await api.getDocuments(
147
+ query.toString() ? `?${query.toString()}` : ""
148
+ );
149
+ return convertDocsWithNames(docsResponse, api);
150
+ })
151
+ );
152
+
153
+ server.tool(
154
+ "get_document",
155
+ {
156
+ id: z.number(),
157
+ },
158
+ errorMiddleware(async (args, extra) => {
159
+ if (!api) throw new Error("Please configure API connection first");
160
+ const doc = await api.getDocument(args.id);
161
+ const [correspondents, documentTypes, tags] = await Promise.all([
162
+ api.getCorrespondents(),
163
+ api.getDocumentTypes(),
164
+ api.getTags(),
165
+ ]);
166
+ const correspondentMap = new Map(
167
+ (correspondents.results || []).map((c) => [c.id, c.name])
168
+ );
169
+ const documentTypeMap = new Map(
170
+ (documentTypes.results || []).map((dt) => [dt.id, dt.name])
171
+ );
172
+ const tagMap = new Map(
173
+ (tags.results || []).map((tag) => [tag.id, tag.name])
174
+ );
175
+ const docWithNames = {
176
+ ...doc,
177
+ correspondent: doc.correspondent
178
+ ? {
179
+ id: doc.correspondent,
180
+ name:
181
+ correspondentMap.get(doc.correspondent) ||
182
+ String(doc.correspondent),
183
+ }
184
+ : null,
185
+ document_type: doc.document_type
186
+ ? {
187
+ id: doc.document_type,
188
+ name:
189
+ documentTypeMap.get(doc.document_type) ||
190
+ String(doc.document_type),
191
+ }
192
+ : null,
193
+ tags: Array.isArray(doc.tags)
194
+ ? doc.tags.map((tagId) => ({
195
+ id: tagId,
196
+ name: tagMap.get(tagId) || String(tagId),
197
+ }))
198
+ : doc.tags,
199
+ };
200
+ return {
201
+ content: [
202
+ {
203
+ type: "text",
204
+ text: JSON.stringify(docWithNames),
205
+ },
206
+ ],
207
+ };
208
+ })
209
+ );
210
+
211
+ server.tool(
212
+ "search_documents",
213
+ "Full text search for documents. This tool is for searching document content, title, and metadata using a full text query. For general document listing or filtering by fields, use 'list_documents' instead.",
214
+ {
215
+ query: z.string(),
216
+ },
217
+ errorMiddleware(async (args, extra) => {
218
+ if (!api) throw new Error("Please configure API connection first");
219
+ const docsResponse = await api.searchDocuments(args.query);
220
+ return convertDocsWithNames(docsResponse, api);
221
+ })
222
+ );
223
+
224
+ server.tool(
225
+ "download_document",
226
+ {
227
+ id: z.number(),
228
+ original: z.boolean().optional(),
229
+ },
230
+ errorMiddleware(async (args, extra) => {
231
+ if (!api) throw new Error("Please configure API connection first");
232
+ const response = await api.downloadDocument(args.id, args.original);
233
+ const filename =
234
+ (typeof response.headers.get === "function"
235
+ ? response.headers.get("content-disposition")
236
+ : response.headers["content-disposition"]
237
+ )
238
+ ?.split("filename=")[1]
239
+ ?.replace(/"/g, "") || `document-${args.id}`;
240
+ return {
241
+ content: [
242
+ {
243
+ type: "resource",
244
+ resource: {
245
+ uri: filename,
246
+ blob: Buffer.from(response.data).toString("base64"),
247
+ mimeType: "application/pdf",
248
+ },
249
+ },
250
+ ],
251
+ };
252
+ })
253
+ );
254
+ }
255
+
256
+ async function convertDocsWithNames(
257
+ docsResponse: DocumentsResponse,
258
+ api: PaperlessAPI
259
+ ): Promise<CallToolResult> {
260
+ if (!docsResponse.results?.length) {
261
+ return {
262
+ content: [
263
+ {
264
+ type: "text",
265
+ text: "No documents found",
266
+ },
267
+ ],
268
+ };
269
+ }
270
+ // Fetch all related entities for name mapping
271
+ const [correspondents, documentTypes, tags] = await Promise.all([
272
+ api.getCorrespondents(),
273
+ api.getDocumentTypes(),
274
+ api.getTags(),
275
+ ]);
276
+ const correspondentMap = new Map(
277
+ (correspondents.results || []).map((c) => [c.id, c.name])
278
+ );
279
+ const documentTypeMap = new Map(
280
+ (documentTypes.results || []).map((dt) => [dt.id, dt.name])
281
+ );
282
+ const tagMap = new Map((tags.results || []).map((tag) => [tag.id, tag.name]));
283
+
284
+ const docsWithNames = docsResponse.results.map((doc) => ({
285
+ ...doc,
286
+ correspondent: doc.correspondent
287
+ ? {
288
+ id: doc.correspondent,
289
+ name:
290
+ correspondentMap.get(doc.correspondent) ||
291
+ String(doc.correspondent),
292
+ }
293
+ : null,
294
+ document_type: doc.document_type
295
+ ? {
296
+ id: doc.document_type,
297
+ name:
298
+ documentTypeMap.get(doc.document_type) || String(doc.document_type),
299
+ }
300
+ : null,
301
+ tags: Array.isArray(doc.tags)
302
+ ? doc.tags.map((tagId) => ({
303
+ id: tagId,
304
+ name: tagMap.get(tagId) || String(tagId),
305
+ }))
306
+ : doc.tags,
307
+ }));
308
+ return {
309
+ content: [
310
+ {
311
+ type: "text",
312
+ text: JSON.stringify(docsWithNames),
313
+ },
314
+ ],
315
+ };
316
+ }
@@ -0,0 +1,143 @@
1
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp";
2
+ import { z } from "zod";
3
+ import { PaperlessAPI } from "../api/PaperlessAPI";
4
+ import { errorMiddleware } from "./utils/middlewares";
5
+ import { buildQueryString } from "./utils/queryString";
6
+
7
+ export function registerTagTools(server: McpServer, api: PaperlessAPI) {
8
+ server.tool(
9
+ "list_tags",
10
+ "List all tags. IMPORTANT: When a user query may refer to a tag or document type, you should fetch all tags and all document types up front (with a large enough page_size), cache them for the session, and search locally for matches by name or slug before making further API calls. This reduces redundant requests and handles ambiguity between tags and document types efficiently.",
11
+ {
12
+ page: z.number().optional(),
13
+ page_size: z.number().optional(),
14
+ name__icontains: z.string().optional(),
15
+ name__iendswith: z.string().optional(),
16
+ name__iexact: z.string().optional(),
17
+ name__istartswith: z.string().optional(),
18
+ ordering: z.string().optional(),
19
+ },
20
+ errorMiddleware(async (args = {}) => {
21
+ if (!api) throw new Error("Please configure API connection first");
22
+ const queryString = buildQueryString(args);
23
+ const tagsResponse = await api.request(
24
+ `/tags/${queryString ? `?${queryString}` : ""}`
25
+ );
26
+ return {
27
+ content: [
28
+ {
29
+ type: "text",
30
+ text: JSON.stringify(tagsResponse),
31
+ },
32
+ ],
33
+ };
34
+ })
35
+ );
36
+
37
+ server.tool(
38
+ "create_tag",
39
+ {
40
+ name: z.string(),
41
+ color: z
42
+ .string()
43
+ .regex(/^#[0-9A-Fa-f]{6}$/)
44
+ .optional(),
45
+ match: z.string().optional(),
46
+ matching_algorithm: z.number().int().min(0).max(4).optional(),
47
+ },
48
+ errorMiddleware(async (args, extra) => {
49
+ if (!api) throw new Error("Please configure API connection first");
50
+ const tag = await api.createTag(args);
51
+ return {
52
+ content: [
53
+ {
54
+ type: "text",
55
+ text: JSON.stringify(tag),
56
+ },
57
+ ],
58
+ };
59
+ })
60
+ );
61
+
62
+ server.tool(
63
+ "update_tag",
64
+ {
65
+ id: z.number(),
66
+ name: z.string(),
67
+ color: z
68
+ .string()
69
+ .regex(/^#[0-9A-Fa-f]{6}$/)
70
+ .optional(),
71
+ match: z.string().optional(),
72
+ matching_algorithm: z.number().int().min(0).max(4).optional(),
73
+ },
74
+ errorMiddleware(async (args, extra) => {
75
+ if (!api) throw new Error("Please configure API connection first");
76
+ const tag = await api.updateTag(args.id, args);
77
+ return {
78
+ content: [
79
+ {
80
+ type: "text",
81
+ text: JSON.stringify(tag),
82
+ },
83
+ ],
84
+ };
85
+ })
86
+ );
87
+
88
+ server.tool(
89
+ "delete_tag",
90
+ {
91
+ id: z.number(),
92
+ },
93
+ errorMiddleware(async (args, extra) => {
94
+ if (!api) throw new Error("Please configure API connection first");
95
+ await api.deleteTag(args.id);
96
+ return {
97
+ content: [
98
+ {
99
+ type: "text",
100
+ text: JSON.stringify({ status: "deleted" }),
101
+ },
102
+ ],
103
+ };
104
+ })
105
+ );
106
+
107
+ server.tool(
108
+ "bulk_edit_tags",
109
+ {
110
+ tag_ids: z.array(z.number()),
111
+ operation: z.enum(["set_permissions", "delete"]),
112
+ owner: z.number().optional(),
113
+ permissions: z
114
+ .object({
115
+ view: z.object({
116
+ users: z.array(z.number()).optional(),
117
+ groups: z.array(z.number()).optional(),
118
+ }),
119
+ change: z.object({
120
+ users: z.array(z.number()).optional(),
121
+ groups: z.array(z.number()).optional(),
122
+ }),
123
+ })
124
+ .optional(),
125
+ merge: z.boolean().optional(),
126
+ },
127
+ errorMiddleware(async (args, extra) => {
128
+ if (!api) throw new Error("Please configure API connection first");
129
+ return api.bulkEditObjects(
130
+ args.tag_ids,
131
+ "tags",
132
+ args.operation,
133
+ args.operation === "set_permissions"
134
+ ? {
135
+ owner: args.owner,
136
+ permissions: args.permissions,
137
+ merge: args.merge,
138
+ }
139
+ : {}
140
+ );
141
+ })
142
+ );
143
+ }
@@ -0,0 +1,23 @@
1
+ import { ToolCallback } from "@modelcontextprotocol/sdk/server/mcp";
2
+ import { ZodRawShape } from "zod";
3
+
4
+ export const errorMiddleware = <Args extends ZodRawShape>(
5
+ cb: ToolCallback<Args>
6
+ ): ToolCallback<Args> => {
7
+ return (async (args, extra) => {
8
+ try {
9
+ return await cb(args, extra);
10
+ } catch (err) {
11
+ return {
12
+ content: [
13
+ {
14
+ type: "text",
15
+ text: JSON.stringify({
16
+ error: err instanceof Error ? err.message : String(err),
17
+ }),
18
+ },
19
+ ],
20
+ };
21
+ }
22
+ }) as ToolCallback<Args>;
23
+ };
@@ -0,0 +1,9 @@
1
+ export function buildQueryString(args: Record<string, any>): string {
2
+ const query = new URLSearchParams();
3
+ for (const key in args) {
4
+ if (args[key] !== undefined && args[key] !== null) {
5
+ query.set(key, args[key].toString());
6
+ }
7
+ }
8
+ return query.toString();
9
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,108 @@
1
+ {
2
+ "compilerOptions": {
3
+ /* Visit https://aka.ms/tsconfig to read more about this file */
4
+ /* Projects */
5
+ // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
6
+ // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
7
+ // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
8
+ // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
9
+ // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
10
+ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
11
+ /* Language and Environment */
12
+ "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
13
+ "lib": [
14
+ "es2016",
15
+ "ES2015"
16
+ ],
17
+ // "jsx": "preserve", /* Specify what JSX code is generated. */
18
+ // "libReplacement": true, /* Enable lib replacement. */
19
+ // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
20
+ // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
21
+ // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
22
+ // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
23
+ // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
24
+ // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
25
+ // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
26
+ // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
27
+ // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
28
+ /* Modules */
29
+ "module": "CommonJS",
30
+ "moduleResolution": "node",
31
+ // "rootDir": "./", /* Specify the root folder within your source files. */
32
+ // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
33
+ // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
34
+ // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
35
+ // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
36
+ // "types": [], /* Specify type package names to be included without being referenced in a source file. */
37
+ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
38
+ // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
39
+ // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */
40
+ // "rewriteRelativeImportExtensions": true, /* Rewrite '.ts', '.tsx', '.mts', and '.cts' file extensions in relative import paths to their JavaScript equivalent in output files. */
41
+ // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */
42
+ // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */
43
+ // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */
44
+ // "noUncheckedSideEffectImports": true, /* Check side effect imports. */
45
+ // "resolveJsonModule": true, /* Enable importing .json files. */
46
+ // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
47
+ // "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
48
+ /* JavaScript Support */
49
+ // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
50
+ // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
51
+ // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
52
+ /* Emit */
53
+ // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
54
+ // "declarationMap": true, /* Create sourcemaps for d.ts files. */
55
+ // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
56
+ // "sourceMap": true, /* Create source map files for emitted JavaScript files. */
57
+ // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
58
+ // "noEmit": true, /* Disable emitting files from a compilation. */
59
+ // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
60
+ "outDir": "build",
61
+ // "removeComments": true, /* Disable emitting comments. */
62
+ // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
63
+ // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
64
+ // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
65
+ // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
66
+ // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
67
+ // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
68
+ // "newLine": "crlf", /* Set the newline character for emitting files. */
69
+ // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
70
+ // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
71
+ // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
72
+ // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
73
+ // "declarationDir": "./", /* Specify the output directory for generated declaration files. */
74
+ /* Interop Constraints */
75
+ // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
76
+ // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */
77
+ // "isolatedDeclarations": true, /* Require sufficient annotation on exports so other tools can trivially generate declaration files. */
78
+ // "erasableSyntaxOnly": true, /* Do not allow runtime constructs that are not part of ECMAScript. */
79
+ // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
80
+ "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
81
+ // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
82
+ "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
83
+ /* Type Checking */
84
+ "strict": true, /* Enable all strict type-checking options. */
85
+ "noImplicitAny": false, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
86
+ // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
87
+ // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
88
+ // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
89
+ // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
90
+ // "strictBuiltinIteratorReturn": true, /* Built-in iterators are instantiated with a 'TReturn' type of 'undefined' instead of 'any'. */
91
+ // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
92
+ // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
93
+ // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
94
+ // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
95
+ // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
96
+ // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
97
+ // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
98
+ // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
99
+ // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
100
+ // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
101
+ // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
102
+ // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
103
+ // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
104
+ /* Completeness */
105
+ // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
106
+ "skipLibCheck": true /* Skip type checking all .d.ts files. */
107
+ }
108
+ }