@audiowalk/sdk 1.0.2 → 1.2.1
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/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -17
- package/dist/player/player-controller.d.ts +4 -3
- package/dist/player/player-controller.d.ts.map +1 -1
- package/dist/player/player-controller.js +29 -31
- package/dist/storage/local-storage.d.ts +11 -0
- package/dist/storage/local-storage.d.ts.map +1 -0
- package/dist/storage/local-storage.js +19 -0
- package/package.json +11 -3
- package/.prettierrc.yml +0 -1
- package/tsconfig.json +0 -108
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,17 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./player/player-controller"), exports);
|
|
1
|
+
export * from "./player/player-controller";
|
|
2
|
+
export * from "./storage/local-storage";
|
|
@@ -20,14 +20,15 @@ export declare class PlayerController {
|
|
|
20
20
|
readonly status: BehaviorSubject<PlayerStatus | null>;
|
|
21
21
|
readonly playing: import("rxjs").Observable<boolean>;
|
|
22
22
|
private file?;
|
|
23
|
+
private localStorage;
|
|
23
24
|
constructor(playerElement: HTMLAudioElement, options?: PlayerControllerOptions);
|
|
24
|
-
open(file: string, metadata: MediaMetadataInit): void
|
|
25
|
+
open(file: string, metadata: MediaMetadataInit): Promise<void>;
|
|
25
26
|
close(): void;
|
|
26
27
|
play(): void;
|
|
27
28
|
pause(): void;
|
|
28
29
|
seekTo(seconds: number): void;
|
|
29
|
-
back(): void;
|
|
30
|
-
forward(): void;
|
|
30
|
+
back(seconds?: number): void;
|
|
31
|
+
forward(seconds?: number): void;
|
|
31
32
|
private savePosition;
|
|
32
33
|
private log;
|
|
33
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"player-controller.d.ts","sourceRoot":"","sources":["../../src/player/player-controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAsB,OAAO,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"player-controller.d.ts","sourceRoot":"","sources":["../../src/player/player-controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAsB,OAAO,EAAE,MAAM,MAAM,CAAC;AAGpE,MAAM,WAAW,uBAAuB;IACtC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,oBAAY,YAAY;IACtB,SAAS,YAAY;IACrB,QAAQ,WAAW;IACnB,OAAO,UAAU;CAClB;AAED,qBAAa,gBAAgB;IAmBf,OAAO,CAAC,QAAQ,CAAC,aAAa;IAAoB,OAAO,CAAC,OAAO;IAlB7E,SAAgB,MAAM,gBAAuB;IAC7C,SAAgB,OAAO,gBAAuB;IAC9C,SAAgB,MAAM,gBAAuB;IAE7C,SAAgB,WAAW,0BAAkC;IAC7D,SAAgB,SAAS,0BAAkC;IAC3D,SAAgB,QAAQ,oCAEtB;IAEF,SAAgB,MAAM,uCAAkD;IAExE,SAAgB,OAAO,qCAA2D;IAElF,OAAO,CAAC,IAAI,CAAC,CAAS;IAEtB,OAAO,CAAC,YAAY,CAAsB;gBAEb,aAAa,EAAE,gBAAgB,EAAU,OAAO,GAAE,uBAA4B;IAmErG,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,iBAAiB;IAWpD,KAAK;IAaL,IAAI;IAOJ,KAAK;IAML,MAAM,CAAC,OAAO,EAAE,MAAM;IAOtB,IAAI,CAAC,OAAO,GAAE,MAAW;IAOzB,OAAO,CAAC,OAAO,GAAE,MAAW;YAQd,YAAY;IAK1B,OAAO,CAAC,GAAG;CAOZ"}
|
|
@@ -1,25 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
|
-
var PlayerStatus;
|
|
1
|
+
import { BehaviorSubject, combineLatest, map, Subject } from "rxjs";
|
|
2
|
+
import { LocalStorage } from "../storage/local-storage";
|
|
3
|
+
export var PlayerStatus;
|
|
6
4
|
(function (PlayerStatus) {
|
|
7
5
|
PlayerStatus["playing"] = "playing";
|
|
8
6
|
PlayerStatus["paused"] = "paused";
|
|
9
7
|
PlayerStatus["ended"] = "ended";
|
|
10
|
-
})(PlayerStatus || (
|
|
11
|
-
class PlayerController {
|
|
8
|
+
})(PlayerStatus || (PlayerStatus = {}));
|
|
9
|
+
export class PlayerController {
|
|
10
|
+
playerElement;
|
|
11
|
+
options;
|
|
12
|
+
onPlay = new Subject();
|
|
13
|
+
onPause = new Subject();
|
|
14
|
+
onStop = new Subject();
|
|
15
|
+
currentTime = new BehaviorSubject(0);
|
|
16
|
+
totalTime = new BehaviorSubject(0);
|
|
17
|
+
progress = combineLatest([this.currentTime, this.totalTime]).pipe(map(([currentTime, totalTime]) => currentTime / totalTime));
|
|
18
|
+
status = new BehaviorSubject(null);
|
|
19
|
+
playing = this.status.pipe(map((status) => status === "playing"));
|
|
20
|
+
file;
|
|
21
|
+
localStorage = new LocalStorage();
|
|
12
22
|
constructor(playerElement, options = {}) {
|
|
13
23
|
this.playerElement = playerElement;
|
|
14
24
|
this.options = options;
|
|
15
|
-
this.onPlay = new rxjs_1.Subject();
|
|
16
|
-
this.onPause = new rxjs_1.Subject();
|
|
17
|
-
this.onStop = new rxjs_1.Subject();
|
|
18
|
-
this.currentTime = new rxjs_1.BehaviorSubject(0);
|
|
19
|
-
this.totalTime = new rxjs_1.BehaviorSubject(0);
|
|
20
|
-
this.progress = (0, rxjs_1.combineLatest)([this.currentTime, this.totalTime]).pipe((0, rxjs_1.map)(([currentTime, totalTime]) => currentTime / totalTime));
|
|
21
|
-
this.status = new rxjs_1.BehaviorSubject(null);
|
|
22
|
-
this.playing = this.status.pipe((0, rxjs_1.map)((status) => status === "playing"));
|
|
23
25
|
navigator.mediaSession.setActionHandler("play", () => this.play());
|
|
24
26
|
navigator.mediaSession.setActionHandler("pause", () => this.pause());
|
|
25
27
|
navigator.mediaSession.setActionHandler("seekbackward", () => this.back());
|
|
@@ -76,14 +78,14 @@ class PlayerController {
|
|
|
76
78
|
this.savePosition(this.playerElement.currentTime);
|
|
77
79
|
});
|
|
78
80
|
}
|
|
79
|
-
open(file, metadata) {
|
|
81
|
+
async open(file, metadata) {
|
|
80
82
|
this.file = file;
|
|
81
83
|
navigator.mediaSession.metadata = new MediaMetadata(metadata);
|
|
82
|
-
const position = localStorage.
|
|
84
|
+
const position = await this.localStorage.get(`progress-${this.file}`);
|
|
83
85
|
if (position && this.options.autoSave)
|
|
84
86
|
this.playerElement.currentTime = parseFloat(position);
|
|
85
87
|
if (this.options.playOnInit)
|
|
86
|
-
this.playerElement.play();
|
|
88
|
+
await this.playerElement.play();
|
|
87
89
|
}
|
|
88
90
|
close() {
|
|
89
91
|
this.file = undefined;
|
|
@@ -97,18 +99,16 @@ class PlayerController {
|
|
|
97
99
|
navigator.mediaSession.metadata = null;
|
|
98
100
|
}
|
|
99
101
|
play() {
|
|
100
|
-
var _a;
|
|
101
102
|
if (!this.file)
|
|
102
103
|
throw new Error("No file opened");
|
|
103
104
|
this.log("Called play");
|
|
104
|
-
|
|
105
|
+
this.playerElement?.play();
|
|
105
106
|
}
|
|
106
107
|
pause() {
|
|
107
|
-
var _a;
|
|
108
108
|
if (!this.file)
|
|
109
109
|
throw new Error("No file opened");
|
|
110
110
|
this.log("Called pause");
|
|
111
|
-
|
|
111
|
+
this.playerElement?.pause();
|
|
112
112
|
}
|
|
113
113
|
seekTo(seconds) {
|
|
114
114
|
if (!this.file)
|
|
@@ -116,30 +116,28 @@ class PlayerController {
|
|
|
116
116
|
this.log("Called seekTo");
|
|
117
117
|
this.playerElement.currentTime = seconds;
|
|
118
118
|
}
|
|
119
|
-
back() {
|
|
119
|
+
back(seconds = 10) {
|
|
120
120
|
if (!this.file)
|
|
121
121
|
throw new Error("No file opened");
|
|
122
122
|
const position = this.playerElement.currentTime;
|
|
123
|
-
this.seekTo(Math.max(position -
|
|
123
|
+
this.seekTo(Math.max(position - seconds, 0));
|
|
124
124
|
}
|
|
125
|
-
forward() {
|
|
125
|
+
forward(seconds = 10) {
|
|
126
126
|
if (!this.file)
|
|
127
127
|
throw new Error("No file opened");
|
|
128
128
|
const position = this.playerElement.currentTime;
|
|
129
129
|
const duration = this.playerElement.duration;
|
|
130
|
-
this.seekTo(duration && duration > 0 ? Math.min(position +
|
|
130
|
+
this.seekTo(duration && duration > 0 ? Math.min(position + seconds, duration) : position + seconds);
|
|
131
131
|
}
|
|
132
|
-
savePosition(currentTime) {
|
|
132
|
+
async savePosition(currentTime) {
|
|
133
133
|
if (!this.file)
|
|
134
134
|
return;
|
|
135
|
-
localStorage.
|
|
135
|
+
await this.localStorage.set(`progress-${this.file}`, String(currentTime));
|
|
136
136
|
}
|
|
137
137
|
log(message) {
|
|
138
|
-
|
|
139
|
-
const time = ((_a = this.playerElement) === null || _a === void 0 ? void 0 : _a.currentTime) ? Math.round((_b = this.playerElement) === null || _b === void 0 ? void 0 : _b.currentTime) : null;
|
|
138
|
+
const time = this.playerElement?.currentTime ? Math.round(this.playerElement?.currentTime) : null;
|
|
140
139
|
if (time)
|
|
141
140
|
message += ` @${time}s`;
|
|
142
141
|
console.log(`[PlayerController] ${message}`);
|
|
143
142
|
}
|
|
144
143
|
}
|
|
145
|
-
exports.PlayerController = PlayerController;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface LocalStorageOptions {
|
|
2
|
+
prefix?: string;
|
|
3
|
+
}
|
|
4
|
+
export declare class LocalStorage {
|
|
5
|
+
private options;
|
|
6
|
+
constructor(options?: Partial<LocalStorageOptions>);
|
|
7
|
+
get(key: string): Promise<string | null>;
|
|
8
|
+
set(key: string, value: any): Promise<void>;
|
|
9
|
+
private getPrefixedKey;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=local-storage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local-storage.d.ts","sourceRoot":"","sources":["../../src/storage/local-storage.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,qBAAa,YAAY;IACX,OAAO,CAAC,OAAO;gBAAP,OAAO,GAAE,OAAO,CAAC,mBAAmB,CAAM;IAExD,GAAG,CAAC,GAAG,EAAE,MAAM;IAIf,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG;IAIjC,OAAO,CAAC,cAAc;CAQvB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export class LocalStorage {
|
|
2
|
+
options;
|
|
3
|
+
constructor(options = {}) {
|
|
4
|
+
this.options = options;
|
|
5
|
+
}
|
|
6
|
+
async get(key) {
|
|
7
|
+
return window.localStorage.getItem(this.getPrefixedKey(key));
|
|
8
|
+
}
|
|
9
|
+
async set(key, value) {
|
|
10
|
+
return window.localStorage.setItem(this.getPrefixedKey(key), value);
|
|
11
|
+
}
|
|
12
|
+
getPrefixedKey(key) {
|
|
13
|
+
const keyParts = ["audiowalk"];
|
|
14
|
+
if (this.options.prefix)
|
|
15
|
+
keyParts.push(this.options.prefix);
|
|
16
|
+
keyParts.push(key);
|
|
17
|
+
return keyParts.join("-");
|
|
18
|
+
}
|
|
19
|
+
}
|
package/package.json
CHANGED
|
@@ -1,20 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@audiowalk/sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/audiowalk-cz/components.git"
|
|
7
7
|
},
|
|
8
|
-
"
|
|
8
|
+
"exports": "./dist/index.js",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"angular/dist"
|
|
12
|
+
],
|
|
13
|
+
"type": "module",
|
|
9
14
|
"scripts": {
|
|
10
15
|
"dev": "tsc -w",
|
|
11
16
|
"build": "tsc",
|
|
12
17
|
"prepublishOnly": "npm run build",
|
|
13
|
-
"release:patch": "npm version patch && git
|
|
18
|
+
"release:patch": "git switch master && npm version patch && git switch release && git merge master --ff-only && git push --follow-tags && git switch master && git push",
|
|
19
|
+
"release:minor": "git switch master && npm version minor && git switch release && git merge master --ff-only && git push --follow-tags && git switch master && git push",
|
|
20
|
+
"release:major": "git switch master && npm version major && git switch release && git merge master --ff-only && git push --follow-tags && git switch master && git push"
|
|
14
21
|
},
|
|
15
22
|
"author": "",
|
|
16
23
|
"license": "ISC",
|
|
17
24
|
"devDependencies": {
|
|
25
|
+
"concurrently": "^9.0.1",
|
|
18
26
|
"typescript": "^5.6.2"
|
|
19
27
|
},
|
|
20
28
|
"dependencies": {
|
package/.prettierrc.yml
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
printWidth: 120
|
package/tsconfig.json
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
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
|
-
"ES2022",
|
|
15
|
-
"DOM"
|
|
16
|
-
], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
|
|
17
|
-
// "jsx": "preserve", /* Specify what JSX code is generated. */
|
|
18
|
-
// "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
|
|
19
|
-
// "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
|
|
20
|
-
// "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
|
|
21
|
-
// "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
|
|
22
|
-
// "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
|
|
23
|
-
// "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
|
|
24
|
-
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
|
|
25
|
-
// "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
|
|
26
|
-
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
|
|
27
|
-
/* Modules */
|
|
28
|
-
"module": "commonjs", /* Specify what module code is generated. */
|
|
29
|
-
"rootDir": "./src", /* 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
|
-
// "noUncheckedSideEffectImports": true, /* Check side effect imports. */
|
|
43
|
-
// "resolveJsonModule": true, /* Enable importing .json files. */
|
|
44
|
-
// "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
|
|
45
|
-
// "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
|
|
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
|
-
/* Emit */
|
|
51
|
-
"declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
|
|
52
|
-
"declarationMap": true, /* Create sourcemaps for d.ts files. */
|
|
53
|
-
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
|
|
54
|
-
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */
|
|
55
|
-
// "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
|
|
56
|
-
// "noEmit": true, /* Disable emitting files from a compilation. */
|
|
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": "./dist", /* Specify an output folder for all emitted files. */
|
|
59
|
-
// "removeComments": true, /* Disable emitting comments. */
|
|
60
|
-
// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
|
|
61
|
-
// "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
|
|
62
|
-
// "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
|
|
63
|
-
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
|
|
64
|
-
// "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
|
|
65
|
-
// "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
|
|
66
|
-
// "newLine": "crlf", /* Set the newline character for emitting files. */
|
|
67
|
-
// "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
|
|
68
|
-
// "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
|
|
69
|
-
// "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
|
|
70
|
-
// "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
|
|
71
|
-
// "declarationDir": "./", /* Specify the output directory for generated declaration files. */
|
|
72
|
-
/* Interop Constraints */
|
|
73
|
-
// "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
|
|
74
|
-
// "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. */
|
|
75
|
-
// "isolatedDeclarations": true, /* Require sufficient annotation on exports so other tools can trivially generate declaration files. */
|
|
76
|
-
// "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
|
|
77
|
-
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
|
|
78
|
-
// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
|
|
79
|
-
"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
|
|
80
|
-
/* Type Checking */
|
|
81
|
-
"strict": true, /* Enable all strict type-checking options. */
|
|
82
|
-
// "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
|
|
83
|
-
// "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
|
|
84
|
-
// "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
|
|
85
|
-
// "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
|
|
86
|
-
// "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
|
|
87
|
-
// "strictBuiltinIteratorReturn": true, /* Built-in iterators are instantiated with a 'TReturn' type of 'undefined' instead of 'any'. */
|
|
88
|
-
// "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
|
|
89
|
-
// "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
|
|
90
|
-
// "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
|
|
91
|
-
// "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
|
|
92
|
-
// "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
|
|
93
|
-
// "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
|
|
94
|
-
// "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
|
|
95
|
-
// "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
|
|
96
|
-
// "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
|
|
97
|
-
// "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
|
|
98
|
-
// "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
|
|
99
|
-
// "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
|
|
100
|
-
// "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
|
|
101
|
-
/* Completeness */
|
|
102
|
-
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
|
|
103
|
-
"skipLibCheck": true /* Skip type checking all .d.ts files. */
|
|
104
|
-
},
|
|
105
|
-
"include": [
|
|
106
|
-
"src/**/*.ts"
|
|
107
|
-
],
|
|
108
|
-
}
|