@powfix/core-js 0.9.24 → 0.9.26

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.
@@ -1,62 +0,0 @@
1
- export class RandomUtils {
2
- static randomNumber(min: number, max: number): number {
3
- min = Math.ceil(min);
4
- max = Math.floor(max);
5
- return Math.floor(Math.random() * (max - min + 1) + min);
6
- }
7
-
8
- static randomLatinStrings(length: number) {
9
- const strings = [];
10
- for (let i = 0; i < length; ++i) {
11
- const isLowerCase = RandomUtils.randomNumber(0, 1);
12
- if (isLowerCase) {
13
- strings.push(String.fromCharCode(RandomUtils.randomNumber(97, 122)));
14
- } else {
15
- strings.push(String.fromCharCode(RandomUtils.randomNumber(65, 90)));
16
- }
17
- }
18
- return strings.join('');
19
- }
20
-
21
- static randomLatinLowercaseStrings(length: number) {
22
- const strings = [];
23
- for (let i = 0; i < length; ++i) {
24
- strings.push(String.fromCharCode(RandomUtils.randomNumber(97, 122)));
25
- }
26
- return strings.join('');
27
- }
28
-
29
- static randomLatinUppercaseStrings(length: number) {
30
- const strings = [];
31
- for (let i = 0; i < length; ++i) {
32
- strings.push(String.fromCharCode(RandomUtils.randomNumber(65, 90)));
33
- }
34
- return strings.join('');
35
- }
36
-
37
- static randomNumberStrings(length: number) {
38
- const strings = [];
39
- for (let i = 0; i < length; ++i) {
40
- strings.push(String.fromCharCode(RandomUtils.randomNumber(48, 57)));
41
- }
42
- return strings.join('');
43
- }
44
-
45
- static randomStrings(length: number) {
46
- const strings = [];
47
- for (let i = 0; i < length; ++i) {
48
- const isNumber = RandomUtils.randomNumber(0, 1);
49
- if (isNumber) {
50
- strings.push(String.fromCharCode(RandomUtils.randomNumber(48, 57)));
51
- } else {
52
- const isLowerCase = RandomUtils.randomNumber(0, 1);
53
- if (isLowerCase) {
54
- strings.push(String.fromCharCode(RandomUtils.randomNumber(97, 122)));
55
- } else {
56
- strings.push(String.fromCharCode(RandomUtils.randomNumber(65, 90)));
57
- }
58
- }
59
- }
60
- return strings.join('');
61
- }
62
- }
@@ -1,178 +0,0 @@
1
- import moment from "moment/moment";
2
- import EventEmitter3 from 'eventemitter3';
3
-
4
- export interface Sequence {
5
- key: string; // 고유키값
6
- required?: boolean; // 오류를 무시할건지
7
- minimumExecutionTime?: number; // 최소실행 시간
8
- task: Function; // Promise 작업
9
- description?: string; // 설명
10
- }
11
-
12
- export enum SequencerStatus {
13
- IDLE,
14
- RUNNING,
15
- ERROR,
16
- DONE,
17
- }
18
-
19
- export interface SequencerOption {
20
- sequences?: Sequence[];
21
- minimumExecutionTime?: number;
22
- }
23
-
24
- export enum SequencerEvent {
25
- START = 'START',
26
- END = 'END',
27
-
28
- SEQUENCE_START = 'SEQUENCE_START',
29
- SEQUENCE_END = 'SEQUENCE_END',
30
- }
31
-
32
- export class Sequencer {
33
- protected readonly sequences: Sequence[] = [];
34
- protected status: SequencerStatus = SequencerStatus.IDLE;
35
- protected minimumExecutionTime: number = 0;
36
-
37
- // Reset variables task is done
38
- currentSequence: Sequence | null = null;
39
- startTimestamp: number | null = null;
40
- endTimestamp: number | null = null;
41
-
42
- // Emitter
43
- eventEmitter = new EventEmitter3();
44
-
45
- constructor(option?: SequencerOption) {
46
- if (option?.sequences) {
47
- this.sequences.push(...option.sequences);
48
- }
49
- }
50
-
51
- get getCurrentTimeStamp(): number {
52
- return parseInt(moment().format('x'), 10);
53
- }
54
-
55
- get executionTime(): number | null {
56
- if (this.status === SequencerStatus.IDLE) {
57
- return null;
58
- }
59
-
60
- if (!this.startTimestamp) {
61
- return null;
62
- }
63
-
64
- if (this.startTimestamp && this.endTimestamp) {
65
- return this.endTimestamp - this.startTimestamp;
66
- }
67
-
68
- return this.getCurrentTimeStamp - this.startTimestamp;
69
- }
70
-
71
- pushSequence = (sequence: Sequence) => {
72
- this.sequences.push(sequence);
73
- }
74
-
75
- start = async () => {
76
- if (this.status === SequencerStatus.RUNNING) {
77
- console.warn('Sequencer status is', this.status);
78
- return;
79
- }
80
-
81
- this.status = SequencerStatus.RUNNING;
82
- this.currentSequence = null;
83
- this.startTimestamp = this.getCurrentTimeStamp;
84
- this.endTimestamp = null;
85
-
86
- console.log(`Sequence started, started at ${this.startTimestamp}, MINIMUM_EXECUTION_TIME is ${this.minimumExecutionTime}`);
87
-
88
- for (let sequence of this.sequences) {
89
- console.log('Currently total execution time', this.executionTime);
90
-
91
- const sequenceStartTimeStamp = this.getCurrentTimeStamp;
92
-
93
- this.currentSequence = sequence;
94
-
95
- // Emitter
96
- this.eventEmitter.emit(SequencerEvent.SEQUENCE_START, sequence);
97
-
98
- try {
99
- await new Promise<void>(async (resolve, reject) => {
100
- try {
101
- console.log(`Sequence ${sequence.key} start`);
102
-
103
- await sequence.task?.();
104
-
105
- const sequenceEndTimeStamp = this.getCurrentTimeStamp;
106
- const sequenceExecutionTime = sequenceEndTimeStamp - sequenceStartTimeStamp;
107
-
108
- console.log(`✅ Sequence ${sequence.key} done at`, sequenceEndTimeStamp);
109
- console.log('Sequence execution time', sequenceExecutionTime, 'ms');
110
-
111
- if (sequence.minimumExecutionTime) {
112
- console.log(`Sequence has minimumExecutionTime`, sequence.minimumExecutionTime, 'ms');
113
-
114
- if (sequenceExecutionTime < sequence.minimumExecutionTime) {
115
- const delay = sequence.minimumExecutionTime - sequenceExecutionTime;
116
- console.log(`Sequence will delay`, delay, 'ms');
117
-
118
- let dotInterpreterBlocked = false;
119
- const dotInterpreter = setInterval(() => {
120
- if (dotInterpreterBlocked) {
121
- console.log('!');
122
- return;
123
- }
124
-
125
- console.log('.');
126
- }, 100);
127
-
128
- setTimeout(() => {
129
- dotInterpreterBlocked = true;
130
- clearInterval(dotInterpreter);
131
- console.log('done');
132
- resolve();
133
- }, delay);
134
- return;
135
- }
136
-
137
- console.log('Sequence execution time is greater than minimum execution time');
138
- resolve();
139
- return;
140
- }
141
-
142
- resolve();
143
- } catch (e) {
144
- reject(e);
145
- }
146
- });
147
-
148
- console.log('Out of Promise');
149
-
150
- // Emitter
151
- this.eventEmitter.emit(SequencerEvent.SEQUENCE_END, sequence);
152
- } catch (e) {
153
- if (sequence.required) {
154
- console.error(`🚫 Sequence ${sequence.key} failed`, e);
155
-
156
- this.status = SequencerStatus.ERROR;
157
- this.currentSequence = null;
158
- this.endTimestamp = this.currentSequence;
159
-
160
- // IMPORTANT
161
- return Promise.reject({
162
- sequence,
163
- reason: e,
164
- });
165
- }
166
-
167
- console.log(`Sequence ${sequence.key} failed`, e);
168
-
169
- // Emitter
170
- this.eventEmitter.emit(SequencerEvent.SEQUENCE_END, sequence);
171
- }
172
- }
173
-
174
- this.status = SequencerStatus.DONE;
175
- this.currentSequence = null;
176
- this.endTimestamp = this.currentSequence;
177
- };
178
- }
@@ -1,43 +0,0 @@
1
- export class StringUtils {
2
- public static numberWithCommas(x: string | any): string {
3
- return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
4
- }
5
-
6
- public static getByte(s: string): number {
7
- const getByteLength = (decimal: number) => {
8
- const LINE_FEED = 10;
9
- return (decimal >> 7) || (LINE_FEED === decimal) ? 2 : 1
10
- };
11
-
12
- return s
13
- .split('')
14
- .map((s) => s.charCodeAt(0))
15
- .reduce((prev, unicodeDecimalValue) => prev + getByteLength(unicodeDecimalValue), 0)
16
- }
17
-
18
- public static levenshteinDistance = (str1: string = '', str2: string = ''): number => {
19
- const track = Array(str2.length + 1).fill(null).map(() =>
20
- Array(str1.length + 1).fill(null));
21
-
22
- for (let i = 0; i <= str1.length; i += 1) {
23
- track[0][i] = i;
24
- }
25
-
26
- for (let j = 0; j <= str2.length; j += 1) {
27
- track[j][0] = j;
28
- }
29
-
30
- for (let j = 1; j <= str2.length; j += 1) {
31
- for (let i = 1; i <= str1.length; i += 1) {
32
- const indicator = str1[i - 1] === str2[j - 1] ? 0 : 1;
33
- track[j][i] = Math.min(
34
- track[j][i - 1] + 1, // deletion
35
- track[j - 1][i] + 1, // insertion
36
- track[j - 1][i - 1] + indicator, // substitution
37
- );
38
- }
39
- }
40
-
41
- return track[str2.length][str1.length];
42
- };
43
- }
@@ -1,46 +0,0 @@
1
- const uuid = require('uuid');
2
-
3
- function binaryToString(binary: Buffer): string {
4
- return Buffer.from(binary).toString('hex');
5
- }
6
-
7
- export class UuidUtils {
8
- static v4(): string {
9
- return uuid.v4();
10
- }
11
-
12
- static format(uuid: string) {
13
- if (uuid.length === 32) {
14
- // Without dash: ca23c587d7f84c76be59f53bbc9f91f8
15
- return `${uuid.substring(0, 8)}-${uuid.substring(8, 12)}-${uuid.substring(12, 16)}-${uuid.substring(16, 20)}-${uuid.substring(20, 32)}`.toUpperCase();
16
- } else if (uuid.length === 36) {
17
- // With dash: ca23c587-d7f8-4c76-be59-f53bbc9f91f8
18
- return uuid.toUpperCase();
19
- } else {
20
- // Unexpected uuid
21
- console.warn('Unexpected uuid length', uuid);
22
- return uuid;
23
- }
24
- }
25
-
26
- /**
27
- * (UUID: Buffer) to (UUID: string)
28
- * @param binary UUID
29
- * @returns {string|null} When binary not exists return null
30
- */
31
- static toString(binary?: Buffer): string | null {
32
- if (!binary) return null;
33
- return UuidUtils.format(binaryToString(binary));
34
- }
35
-
36
- /** (UUID: string) to (UUID: Buffer) */
37
- static toBuffer(uuid: string): Buffer {
38
- return Buffer.from(uuid.replace(/-/g, ''), 'hex');
39
- }
40
-
41
- static isValidUUID(uuid: string): boolean {
42
- if (!uuid) return false;
43
- if (typeof uuid !== 'string') return false;
44
- return RegExp(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/i).test(uuid);
45
- }
46
- }
@@ -1,162 +0,0 @@
1
- export class Validator {
2
- public static validate(value: string | null | undefined, options: Validator.Options): {result: boolean, validations: Validator.VALIDATION[], passes: Validator.VALIDATION[], errors: Validator.VALIDATION[]} {
3
- value = value || '';
4
-
5
- const validations: Validator.VALIDATION[] = [];
6
- const errors: Validator.VALIDATION[] = [];
7
-
8
- const {length} = value;
9
- const spaceCount = (value.match(/\s/g) || []).length;
10
- const numberCount = (value.match(/\d/g) || []).length;
11
- const alphabetCount = (value.match(/[A-Za-z]/g) || []).length;
12
- const alphabetLowerCaseCount = (value.match(/[a-z]/g) || []).length;
13
- const alphabetUpperCaseCount = (value.match(/[A-Z]/g) || []).length;
14
- const specialCount = (value.match(/[~`!@#$%^&*()\-+={[}\]|\\:;"'<,>.?/]/g) || []).length;
15
- const startsWithNumber = /^\d/.test(value);
16
- const startsWithAlphabet = /^[A-Za-z]/.test(value);
17
- const startsWithSpecialCharacter = /^[~`!@#$%^&*()\-+={[}\]|\\:;"'<,>.?/]/.test(value);
18
-
19
- // 최소 길이
20
- if (options.minLength !== undefined && options.minLength > -1) {
21
- validations.push(Validator.VALIDATION.MIN_LENGTH);
22
- if (length < options.minLength) {
23
- errors.push(Validator.VALIDATION.MIN_LENGTH);
24
- }
25
- }
26
-
27
- // 최대 길이
28
- if (options.maxLength !== undefined && options.maxLength > -1) {
29
- validations.push(Validator.VALIDATION.MAX_LENGTH);
30
- if (length > options.maxLength) {
31
- errors.push(Validator.VALIDATION.MAX_LENGTH);
32
- }
33
- }
34
-
35
- const validateMin = (option: number | undefined, value: number, validation: Validator.VALIDATION) => {
36
- if (option !== undefined && option > -1) {
37
- validations.push(validation);
38
- if (value < option) {
39
- errors.push(validation);
40
- }
41
- }
42
- };
43
-
44
- const validateMax = (option: number | undefined, value: number, validation: Validator.VALIDATION) => {
45
- if (option !== undefined && option > -1) {
46
- validations.push(validation);
47
- if (value > option) {
48
- errors.push(validation);
49
- }
50
- }
51
- }
52
-
53
- // 공백 개수
54
- validateMin(options.spaceMinCount, spaceCount, Validator.VALIDATION.SPACE_MIN_COUNT);
55
- validateMax(options.spaceMaxCount, spaceCount, Validator.VALIDATION.SPACE_MAX_COUNT);
56
-
57
- // 숫자 개수
58
- validateMin(options.numberMinCount, numberCount, Validator.VALIDATION.NUMBER_MIN_COUNT);
59
- validateMax(options.numberMaxCount, numberCount, Validator.VALIDATION.NUMBER_MAX_COUNT);
60
-
61
- // 알파벳 개수
62
- validateMin(options.alphabetMinCount, alphabetCount, Validator.VALIDATION.ALPHABET_MIN_COUNT);
63
- validateMax(options.alphabetMaxCount, alphabetCount, Validator.VALIDATION.ALPHABET_MAX_COUNT);
64
- // 알파벳(소문자) 개수
65
- validateMin(options.alphabetLowerCaseMinCount, alphabetLowerCaseCount, Validator.VALIDATION.ALPHABET_LOWER_CASE_MIN_COUNT);
66
- validateMax(options.alphabetLowerCaseMaxCount, alphabetLowerCaseCount, Validator.VALIDATION.ALPHABET_LOWER_CASE_MAX_COUNT);
67
- // 알파벳(대문자) 개수
68
- validateMin(options.alphabetUpperCaseMinCount, alphabetUpperCaseCount, Validator.VALIDATION.ALPHABET_UPPER_CASE_MIN_COUNT);
69
- validateMax(options.alphabetUpperCaseMaxCount, alphabetUpperCaseCount, Validator.VALIDATION.ALPHABET_UPPER_CASE_MAX_COUNT);
70
-
71
- // 특수문자 개수
72
- validateMin(options.specialCharacterMinCount, specialCount, Validator.VALIDATION.SPECIAL_CHARACTER_MIN_COUNT);
73
- validateMax(options.specialCharacterMaxCount, specialCount, Validator.VALIDATION.SPECIAL_CHARACTER_MAX_COUNT);
74
-
75
- // 숫자로 시작
76
- if (options.startsWithNumber) {
77
- validations.push(Validator.VALIDATION.STARTS_WITH_NUMBER);
78
- if (!startsWithNumber) {
79
- errors.push(Validator.VALIDATION.STARTS_WITH_NUMBER);
80
- }
81
- }
82
-
83
- // 영문으로 시작
84
- if (options.startsWithAlphabet) {
85
- validations.push(Validator.VALIDATION.STARTS_WITH_ALPHABET);
86
- if (!startsWithAlphabet) {
87
- errors.push(Validator.VALIDATION.STARTS_WITH_ALPHABET);
88
- }
89
- }
90
-
91
- // 특수문자로 시작
92
- if (options.startsWithSpecialCharacter) {
93
- validations.push(Validator.VALIDATION.STARTS_WITH_SPECIAL_CHARACTER);
94
- if (!startsWithSpecialCharacter) {
95
- errors.push(Validator.VALIDATION.STARTS_WITH_SPECIAL_CHARACTER);
96
- }
97
- }
98
-
99
- return {
100
- result: errors.length === 0,
101
- validations,
102
- passes: validations.filter(e => !errors.includes(e)),
103
- errors,
104
- };
105
- }
106
- }
107
-
108
- export namespace Validator {
109
- export enum VALIDATION {
110
- MIN_LENGTH = 'MIN_LENGTH',
111
- MAX_LENGTH = 'MAX_LENGTH',
112
-
113
- SPACE_MIN_COUNT = 'SPACE_MIN_COUNT',
114
- SPACE_MAX_COUNT = 'SPACE_MAX_COUNT',
115
-
116
- NUMBER_MIN_COUNT = 'NUMBER_MIN_COUNT',
117
- NUMBER_MAX_COUNT = 'NUMBER_MAX_COUNT',
118
-
119
- ALPHABET_MIN_COUNT = 'ALPHABET_MIN_COUNT',
120
- ALPHABET_MAX_COUNT = 'ALPHABET_MAX_COUNT',
121
-
122
- ALPHABET_LOWER_CASE_MIN_COUNT = 'ALPHABET_LOWER_CASE_MIN_COUNT',
123
- ALPHABET_LOWER_CASE_MAX_COUNT = 'ALPHABET_LOWER_CASE_MAX_COUNT',
124
-
125
- ALPHABET_UPPER_CASE_MIN_COUNT = 'ALPHABET_UPPER_CASE_MIN_COUNT',
126
- ALPHABET_UPPER_CASE_MAX_COUNT = 'ALPHABET_UPPER_CASE_MAX_COUNT',
127
-
128
- SPECIAL_CHARACTER_MIN_COUNT = 'SPECIAL_CHARACTER_MIN_COUNT',
129
- SPECIAL_CHARACTER_MAX_COUNT = 'SPECIAL_CHARACTER_MAX_COUNT',
130
-
131
- STARTS_WITH_ALPHABET = 'STARTS_WITH_ALPHABET',
132
- STARTS_WITH_NUMBER = 'STARTS_WITH_NUMBER',
133
- STARTS_WITH_SPECIAL_CHARACTER = 'STARTS_WITH_SPECIAL_CHARACTER',
134
- }
135
-
136
- export interface Options {
137
- minLength?: number; // 최소 길이
138
- maxLength?: number; // 최대 길이
139
-
140
- spaceMinCount?: number; // 공백 최소 개수
141
- spaceMaxCount?: number; // 공백 최대 개수
142
-
143
- numberMinCount?: number; // 숫자 최소 개수
144
- numberMaxCount?: number; // 숫자 최대 개수
145
-
146
- alphabetMinCount?: number; // 알파벳 최소 개수
147
- alphabetMaxCount?: number; // 알파벳 최대 개수
148
-
149
- alphabetLowerCaseMinCount?: number; // 알파벳(소문자) 최소 개수
150
- alphabetLowerCaseMaxCount?: number; // 알페벳(소문자) 최대 개수
151
-
152
- alphabetUpperCaseMinCount?: number; // 알파벳(대문자) 최소 개수
153
- alphabetUpperCaseMaxCount?: number; // 알파벳(대문자) 최대 개수
154
-
155
- specialCharacterMinCount?: number; // 특수문자 최소 개수
156
- specialCharacterMaxCount?: number; // 특수문자 최대 개수
157
-
158
- startsWithNumber?: boolean; // 숫자로 시작해야하는가
159
- startsWithAlphabet?: boolean; // 알파벳으로 시작해야하는가
160
- startsWithSpecialCharacter?: boolean; // 툭수문자로 시작해야하는가
161
- }
162
- }
@@ -1,3 +0,0 @@
1
- export const between = (value: number, from: number, to: number): boolean => {
2
- return value >= from && value <= to;
3
- };
@@ -1,6 +0,0 @@
1
- export const sleep = async (delayInMilliseconds: number, callback?: (...args: any) => void, ...args: any): Promise<any[]> => new Promise((resolve) => {
2
- setTimeout(() => {
3
- callback?.(...args);
4
- resolve(args);
5
- }, delayInMilliseconds);
6
- });
package/tsconfig.json DELETED
@@ -1,103 +0,0 @@
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 TC39 stage 2 draft 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": "node", /* 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
- // "resolveJsonModule": true, /* Enable importing .json files. */
39
- // "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
40
-
41
- /* JavaScript Support */
42
- // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
43
- // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
44
- // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
45
-
46
- /* Emit */
47
- "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
48
- // "declarationMap": true, /* Create sourcemaps for d.ts files. */
49
- // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
50
- // "sourceMap": true, /* Create source map files for emitted JavaScript files. */
51
- // "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. */
52
- "outDir": "./dist", /* Specify an output folder for all emitted files. */
53
- // "removeComments": true, /* Disable emitting comments. */
54
- // "noEmit": true, /* Disable emitting files from a compilation. */
55
- // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
56
- // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */
57
- // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
58
- // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
59
- // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
60
- // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
61
- // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
62
- // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
63
- // "newLine": "crlf", /* Set the newline character for emitting files. */
64
- // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
65
- // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
66
- // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
67
- // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
68
- // "declarationDir": "./", /* Specify the output directory for generated declaration files. */
69
- // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
70
-
71
- /* Interop Constraints */
72
- // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
73
- // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
74
- "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
75
- // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
76
- "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
77
-
78
- /* Type Checking */
79
- "strict": true, /* Enable all strict type-checking options. */
80
- // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
81
- // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
82
- // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
83
- // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
84
- // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
85
- // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
86
- // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
87
- // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
88
- // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
89
- // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
90
- // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
91
- // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
92
- // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
93
- // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
94
- // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
95
- // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
96
- // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
97
- // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
98
-
99
- /* Completeness */
100
- // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
101
- "skipLibCheck": true /* Skip type checking all .d.ts files. */
102
- }
103
- }