@continuedev/fetch 1.0.0

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.
package/jest.config.ts ADDED
@@ -0,0 +1,199 @@
1
+ /**
2
+ * For a detailed explanation regarding each configuration property, visit:
3
+ * https://jestjs.io/docs/configuration
4
+ */
5
+
6
+ import type {Config} from 'jest';
7
+
8
+ const config: Config = {
9
+ // All imported modules in your tests should be mocked automatically
10
+ // automock: false,
11
+
12
+ // Stop running tests after `n` failures
13
+ // bail: 0,
14
+
15
+ // The directory where Jest should store its cached dependency information
16
+ // cacheDirectory: "/private/var/folders/n_/c3r8w0s95xl271j98y2lzhz80000gn/T/jest_dx",
17
+
18
+ // Automatically clear mock calls, instances, contexts and results before every test
19
+ clearMocks: true,
20
+
21
+ // Indicates whether the coverage information should be collected while executing the test
22
+ collectCoverage: true,
23
+
24
+ // An array of glob patterns indicating a set of files for which coverage information should be collected
25
+ // collectCoverageFrom: undefined,
26
+
27
+ // The directory where Jest should output its coverage files
28
+ coverageDirectory: "coverage",
29
+
30
+ // An array of regexp pattern strings used to skip coverage collection
31
+ // coveragePathIgnorePatterns: [
32
+ // "/node_modules/"
33
+ // ],
34
+
35
+ // Indicates which provider should be used to instrument code for coverage
36
+ coverageProvider: "v8",
37
+
38
+ // A list of reporter names that Jest uses when writing coverage reports
39
+ // coverageReporters: [
40
+ // "json",
41
+ // "text",
42
+ // "lcov",
43
+ // "clover"
44
+ // ],
45
+
46
+ // An object that configures minimum threshold enforcement for coverage results
47
+ // coverageThreshold: undefined,
48
+
49
+ // A path to a custom dependency extractor
50
+ // dependencyExtractor: undefined,
51
+
52
+ // Make calling deprecated APIs throw helpful error messages
53
+ // errorOnDeprecated: false,
54
+
55
+ // The default configuration for fake timers
56
+ // fakeTimers: {
57
+ // "enableGlobally": false
58
+ // },
59
+
60
+ // Force coverage collection from ignored files using an array of glob patterns
61
+ // forceCoverageMatch: [],
62
+
63
+ // A path to a module which exports an async function that is triggered once before all test suites
64
+ // globalSetup: undefined,
65
+
66
+ // A path to a module which exports an async function that is triggered once after all test suites
67
+ // globalTeardown: undefined,
68
+
69
+ // A set of global variables that need to be available in all test environments
70
+ // globals: {},
71
+
72
+ // The maximum amount of workers used to run your tests. Can be specified as % or a number. E.g. maxWorkers: 10% will use 10% of your CPU amount + 1 as the maximum worker number. maxWorkers: 2 will use a maximum of 2 workers.
73
+ // maxWorkers: "50%",
74
+
75
+ // An array of directory names to be searched recursively up from the requiring module's location
76
+ // moduleDirectories: [
77
+ // "node_modules"
78
+ // ],
79
+
80
+ // An array of file extensions your modules use
81
+ // moduleFileExtensions: [
82
+ // "js",
83
+ // "mjs",
84
+ // "cjs",
85
+ // "jsx",
86
+ // "ts",
87
+ // "tsx",
88
+ // "json",
89
+ // "node"
90
+ // ],
91
+
92
+ // A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module
93
+ // moduleNameMapper: {},
94
+
95
+ // An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
96
+ // modulePathIgnorePatterns: [],
97
+
98
+ // Activates notifications for test results
99
+ // notify: false,
100
+
101
+ // An enum that specifies notification mode. Requires { notify: true }
102
+ // notifyMode: "failure-change",
103
+
104
+ // A preset that is used as a base for Jest's configuration
105
+ // preset: undefined,
106
+
107
+ // Run tests from one or more projects
108
+ // projects: undefined,
109
+
110
+ // Use this configuration option to add custom reporters to Jest
111
+ // reporters: undefined,
112
+
113
+ // Automatically reset mock state before every test
114
+ // resetMocks: false,
115
+
116
+ // Reset the module registry before running each individual test
117
+ // resetModules: false,
118
+
119
+ // A path to a custom resolver
120
+ // resolver: undefined,
121
+
122
+ // Automatically restore mock state and implementation before every test
123
+ // restoreMocks: false,
124
+
125
+ // The root directory that Jest should scan for tests and modules within
126
+ // rootDir: undefined,
127
+
128
+ // A list of paths to directories that Jest should use to search for files in
129
+ // roots: [
130
+ // "<rootDir>"
131
+ // ],
132
+
133
+ // Allows you to use a custom runner instead of Jest's default test runner
134
+ // runner: "jest-runner",
135
+
136
+ // The paths to modules that run some code to configure or set up the testing environment before each test
137
+ // setupFiles: [],
138
+
139
+ // A list of paths to modules that run some code to configure or set up the testing framework before each test
140
+ // setupFilesAfterEnv: [],
141
+
142
+ // The number of seconds after which a test is considered as slow and reported as such in the results.
143
+ // slowTestThreshold: 5,
144
+
145
+ // A list of paths to snapshot serializer modules Jest should use for snapshot testing
146
+ // snapshotSerializers: [],
147
+
148
+ // The test environment that will be used for testing
149
+ // testEnvironment: "jest-environment-node",
150
+
151
+ // Options that will be passed to the testEnvironment
152
+ // testEnvironmentOptions: {},
153
+
154
+ // Adds a location field to test results
155
+ // testLocationInResults: false,
156
+
157
+ // The glob patterns Jest uses to detect test files
158
+ // testMatch: [
159
+ // "**/__tests__/**/*.[jt]s?(x)",
160
+ // "**/?(*.)+(spec|test).[tj]s?(x)"
161
+ // ],
162
+
163
+ // An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
164
+ // testPathIgnorePatterns: [
165
+ // "/node_modules/"
166
+ // ],
167
+
168
+ // The regexp pattern or array of patterns that Jest uses to detect test files
169
+ // testRegex: [],
170
+
171
+ // This option allows the use of a custom results processor
172
+ // testResultsProcessor: undefined,
173
+
174
+ // This option allows use of a custom test runner
175
+ // testRunner: "jest-circus/runner",
176
+
177
+ // A map from regular expressions to paths to transformers
178
+ // transform: undefined,
179
+
180
+ // An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
181
+ // transformIgnorePatterns: [
182
+ // "/node_modules/",
183
+ // "\\.pnp\\.[^\\/]+$"
184
+ // ],
185
+
186
+ // An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them
187
+ // unmockedModulePathPatterns: undefined,
188
+
189
+ // Indicates whether each individual test should be reported during the run
190
+ // verbose: undefined,
191
+
192
+ // An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode
193
+ // watchPathIgnorePatterns: [],
194
+
195
+ // Whether to use watchman for file crawling
196
+ // watchman: true,
197
+ };
198
+
199
+ export default config;
package/package.json ADDED
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "@continuedev/fetch",
3
+ "version": "1.0.0",
4
+ "description": "",
5
+ "main": "src/index.ts",
6
+ "scripts": {
7
+ "test": "jest"
8
+ },
9
+ "author": "Nate Sesti and Ty Dunn",
10
+ "license": "Apache-2.0",
11
+ "dependencies": {
12
+ "@continuedev/config-types": "^1.0.4",
13
+ "follow-redirects": "^1.15.6",
14
+ "http-proxy-agent": "^7.0.2",
15
+ "https-proxy-agent": "^7.0.5",
16
+ "node-fetch": "^3.3.2"
17
+ },
18
+ "devDependencies": {
19
+ "@types/follow-redirects": "^1.14.4",
20
+ "jest": "^29.7.0"
21
+ }
22
+ }
package/src/fetch.ts ADDED
@@ -0,0 +1,117 @@
1
+ import { RequestOptions } from "@continuedev/config-types/src/index";
2
+ import * as followRedirects from "follow-redirects";
3
+ import { HttpProxyAgent } from "http-proxy-agent";
4
+ import { globalAgent } from "https";
5
+ import { HttpsProxyAgent } from "https-proxy-agent";
6
+ import fetch, { RequestInit, Response } from "node-fetch";
7
+ import * as fs from "node:fs";
8
+ import tls from "node:tls";
9
+
10
+ const { http, https } = (followRedirects as any).default;
11
+
12
+ export function fetchwithRequestOptions(
13
+ url_: URL | string,
14
+ init?: RequestInit,
15
+ requestOptions?: RequestOptions,
16
+ ): Promise<Response> {
17
+ let url = url_;
18
+ if (typeof url === "string") {
19
+ url = new URL(url);
20
+ }
21
+
22
+ const TIMEOUT = 7200; // 7200 seconds = 2 hours
23
+
24
+ let globalCerts: string[] = [];
25
+ if (process.env.IS_BINARY) {
26
+ if (Array.isArray(globalAgent.options.ca)) {
27
+ globalCerts = [...globalAgent.options.ca.map((cert) => cert.toString())];
28
+ } else if (typeof globalAgent.options.ca !== "undefined") {
29
+ globalCerts.push(globalAgent.options.ca.toString());
30
+ }
31
+ }
32
+ const ca = Array.from(new Set([...tls.rootCertificates, ...globalCerts]));
33
+ const customCerts =
34
+ typeof requestOptions?.caBundlePath === "string"
35
+ ? [requestOptions?.caBundlePath]
36
+ : requestOptions?.caBundlePath;
37
+ if (customCerts) {
38
+ ca.push(
39
+ ...customCerts.map((customCert) => fs.readFileSync(customCert, "utf8")),
40
+ );
41
+ }
42
+
43
+ const timeout = (requestOptions?.timeout ?? TIMEOUT) * 1000; // measured in ms
44
+
45
+ const agentOptions: { [key: string]: any } = {
46
+ ca,
47
+ rejectUnauthorized: requestOptions?.verifySsl,
48
+ timeout,
49
+ sessionTimeout: timeout,
50
+ keepAlive: true,
51
+ keepAliveMsecs: timeout,
52
+ };
53
+
54
+ // Handle ClientCertificateOptions
55
+ if (requestOptions?.clientCertificate) {
56
+ agentOptions.cert = fs.readFileSync(
57
+ requestOptions.clientCertificate.cert,
58
+ "utf8",
59
+ );
60
+ agentOptions.key = fs.readFileSync(
61
+ requestOptions.clientCertificate.key,
62
+ "utf8",
63
+ );
64
+ if (requestOptions.clientCertificate.passphrase) {
65
+ agentOptions.passphrase = requestOptions.clientCertificate.passphrase;
66
+ }
67
+ }
68
+
69
+ const proxy = requestOptions?.proxy;
70
+
71
+ // Create agent
72
+ const protocol = url.protocol === "https:" ? https : http;
73
+ const agent =
74
+ proxy && !requestOptions?.noProxy?.includes(url.hostname)
75
+ ? protocol === https
76
+ ? new HttpsProxyAgent(proxy, agentOptions)
77
+ : new HttpProxyAgent(proxy, agentOptions)
78
+ : new protocol.Agent(agentOptions);
79
+
80
+ let headers: { [key: string]: string } = {};
81
+ for (const [key, value] of Object.entries(init?.headers || {})) {
82
+ headers[key] = value as string;
83
+ }
84
+ headers = {
85
+ ...headers,
86
+ ...requestOptions?.headers,
87
+ };
88
+
89
+ // Replace localhost with 127.0.0.1
90
+ if (url.hostname === "localhost") {
91
+ url.hostname = "127.0.0.1";
92
+ }
93
+
94
+ // add extra body properties if provided
95
+ let updatedBody: string | undefined = undefined;
96
+ try {
97
+ if (requestOptions?.extraBodyProperties && typeof init?.body === "string") {
98
+ const parsedBody = JSON.parse(init.body);
99
+ updatedBody = JSON.stringify({
100
+ ...parsedBody,
101
+ ...requestOptions.extraBodyProperties,
102
+ });
103
+ }
104
+ } catch (e) {
105
+ console.log("Unable to parse HTTP request body: ", e);
106
+ }
107
+
108
+ // fetch the request with the provided options
109
+ const resp = fetch(url, {
110
+ ...init,
111
+ body: updatedBody ?? init?.body,
112
+ headers: headers,
113
+ agent: agent,
114
+ });
115
+
116
+ return resp;
117
+ }
package/src/index.ts ADDED
@@ -0,0 +1,8 @@
1
+ export {
2
+ streamJSON,
3
+ streamResponse,
4
+ streamSse,
5
+ toAsyncIterable,
6
+ } from "./stream";
7
+
8
+ export { fetchwithRequestOptions } from "./fetch";
package/src/stream.ts ADDED
@@ -0,0 +1,113 @@
1
+ export async function* toAsyncIterable(
2
+ nodeReadable: NodeJS.ReadableStream,
3
+ ): AsyncGenerator<Uint8Array> {
4
+ for await (const chunk of nodeReadable) {
5
+ yield chunk as Uint8Array;
6
+ }
7
+ }
8
+
9
+ export async function* streamResponse(
10
+ response: Response,
11
+ ): AsyncGenerator<string> {
12
+ if (response.status !== 200) {
13
+ throw new Error(await response.text());
14
+ }
15
+
16
+ if (!response.body) {
17
+ throw new Error("No response body returned.");
18
+ }
19
+
20
+ // Get the major version of Node.js
21
+ const nodeMajorVersion = parseInt(process.versions.node.split(".")[0], 10);
22
+
23
+ if (nodeMajorVersion >= 20) {
24
+ // Use the new API for Node 20 and above
25
+ const stream = (ReadableStream as any).from(response.body);
26
+ for await (const chunk of stream.pipeThrough(
27
+ new TextDecoderStream("utf-8"),
28
+ )) {
29
+ yield chunk;
30
+ }
31
+ } else {
32
+ // Fallback for Node versions below 20
33
+ // Streaming with this method doesn't work as version 20+ does
34
+ const decoder = new TextDecoder("utf-8");
35
+ const nodeStream = response.body as unknown as NodeJS.ReadableStream;
36
+ for await (const chunk of toAsyncIterable(nodeStream)) {
37
+ yield decoder.decode(chunk, { stream: true });
38
+ }
39
+ }
40
+ }
41
+
42
+ function parseDataLine(line: string): any {
43
+ const json = line.startsWith("data: ")
44
+ ? line.slice("data: ".length)
45
+ : line.slice("data:".length);
46
+
47
+ try {
48
+ const data = JSON.parse(json);
49
+ if (data.error) {
50
+ throw new Error(`Error streaming response: ${data.error}`);
51
+ }
52
+
53
+ return data;
54
+ } catch (e) {
55
+ throw new Error(`Malformed JSON sent from server: ${json}`);
56
+ }
57
+ }
58
+
59
+ function parseSseLine(line: string): { done: boolean; data: any } {
60
+ if (line.startsWith("data: [DONE]")) {
61
+ return { done: true, data: undefined };
62
+ }
63
+ if (line.startsWith("data:")) {
64
+ return { done: false, data: parseDataLine(line) };
65
+ }
66
+ if (line.startsWith(": ping")) {
67
+ return { done: true, data: undefined };
68
+ }
69
+ return { done: false, data: undefined };
70
+ }
71
+
72
+ export async function* streamSse(response: Response): AsyncGenerator<any> {
73
+ let buffer = "";
74
+ for await (const value of streamResponse(response)) {
75
+ buffer += value;
76
+
77
+ let position: number;
78
+ while ((position = buffer.indexOf("\n")) >= 0) {
79
+ const line = buffer.slice(0, position);
80
+ buffer = buffer.slice(position + 1);
81
+
82
+ const { done, data } = parseSseLine(line);
83
+ if (done) {
84
+ break;
85
+ }
86
+ if (data) {
87
+ yield data;
88
+ }
89
+ }
90
+ }
91
+
92
+ if (buffer.length > 0) {
93
+ const { done, data } = parseSseLine(buffer);
94
+ if (!done && data) {
95
+ yield data;
96
+ }
97
+ }
98
+ }
99
+
100
+ export async function* streamJSON(response: Response): AsyncGenerator<any> {
101
+ let buffer = "";
102
+ for await (const value of streamResponse(response)) {
103
+ buffer += value;
104
+
105
+ let position;
106
+ while ((position = buffer.indexOf("\n")) >= 0) {
107
+ const line = buffer.slice(0, position);
108
+ const data = JSON.parse(line);
109
+ yield data;
110
+ buffer = buffer.slice(position + 1);
111
+ }
112
+ }
113
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,108 @@
1
+ {
2
+ "compilerOptions": {
3
+ /* Visit https://aka.ms/tsconfig to read more about this file */
4
+
5
+ /* Projects */
6
+ // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
7
+ // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
8
+ // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
9
+ // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
10
+ // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
11
+ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
12
+
13
+ /* Language and Environment */
14
+ "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
15
+ // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
16
+ // "jsx": "preserve", /* Specify what JSX code is generated. */
17
+ // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
18
+ // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
19
+ // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
20
+ // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
21
+ // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
22
+ // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
23
+ // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
24
+ // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
25
+ // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
26
+
27
+ /* Modules */
28
+ "module": "commonjs", /* Specify what module code is generated. */
29
+ // "rootDir": "./", /* Specify the root folder within your source files. */
30
+ // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
31
+ // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
32
+ // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
33
+ // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
34
+ // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
35
+ // "types": [], /* Specify type package names to be included without being referenced in a source file. */
36
+ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
37
+ // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
38
+ // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */
39
+ // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */
40
+ // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */
41
+ // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */
42
+ // "resolveJsonModule": true, /* Enable importing .json files. */
43
+ // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
44
+ // "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
45
+
46
+ /* JavaScript Support */
47
+ // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
48
+ // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
49
+ // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
50
+
51
+ /* Emit */
52
+ // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
53
+ // "declarationMap": true, /* Create sourcemaps for d.ts files. */
54
+ // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
55
+ // "sourceMap": true, /* Create source map files for emitted JavaScript files. */
56
+ // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
57
+ // "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. */
58
+ // "outDir": "./", /* Specify an output folder for all emitted files. */
59
+ // "removeComments": true, /* Disable emitting comments. */
60
+ // "noEmit": true, /* Disable emitting files from a compilation. */
61
+ // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
62
+ // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
63
+ // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
64
+ // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
65
+ // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
66
+ // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
67
+ // "newLine": "crlf", /* Set the newline character for emitting files. */
68
+ // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
69
+ // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
70
+ // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
71
+ // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
72
+ // "declarationDir": "./", /* Specify the output directory for generated declaration files. */
73
+
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
+ // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
79
+ "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
80
+ // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
81
+ "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
82
+
83
+ /* Type Checking */
84
+ "strict": true, /* Enable all strict type-checking options. */
85
+ // "noImplicitAny": true, /* 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
+ // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
91
+ // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
92
+ // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
93
+ // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
94
+ // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
95
+ // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
96
+ // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
97
+ // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
98
+ // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
99
+ // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
100
+ // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
101
+ // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
102
+ // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
103
+
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
+ }