rtc.io-server 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/dist/index.js ADDED
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.addDefaultListeners = exports.Socket = exports.Namespace = exports.Server = void 0;
4
+ const socket_io_1 = require("socket.io");
5
+ Object.defineProperty(exports, "Socket", { enumerable: true, get: function () { return socket_io_1.Socket; } });
6
+ Object.defineProperty(exports, "Namespace", { enumerable: true, get: function () { return socket_io_1.Namespace; } });
7
+ const defaulthandlers_1 = require("./lib/defaulthandlers");
8
+ Object.defineProperty(exports, "addDefaultListeners", { enumerable: true, get: function () { return defaulthandlers_1.addDefaultListeners; } });
9
+ const whip_whep_1 = require("./lib/whip-whep");
10
+ class Server extends socket_io_1.Server {
11
+ constructor(opts) {
12
+ super(opts);
13
+ }
14
+ listen(port, opts) {
15
+ const options = {
16
+ rtcHttpServerPort: port || 3000,
17
+ socketIoServerOptions: {},
18
+ };
19
+ const server = (0, whip_whep_1.whipManager)(options);
20
+ this.attach(server);
21
+ return this;
22
+ }
23
+ }
24
+ exports.Server = Server;
25
+ exports.default = Server;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.addDefaultListeners = void 0;
4
+ function rtcOfferHandler(socket, data) {
5
+ socket.to(data.target).emit("#offer", data);
6
+ }
7
+ function rtcAnswerHandler(socket, data) {
8
+ socket.to(data.target).emit("#answer", data);
9
+ }
10
+ function rtcCandiateHandler(socket, data) {
11
+ socket.to(data.target).emit("#candidate", data);
12
+ }
13
+ function rtcMessageHandler(socket, data) {
14
+ socket.to(data.target).emit("#rtc-message", data);
15
+ }
16
+ function addDefaultListeners(socket) {
17
+ socket.on("#offer", (data) => rtcOfferHandler(socket, data));
18
+ socket.on("#answer", (data) => rtcAnswerHandler(socket, data));
19
+ socket.on("#candidate", (data) => rtcCandiateHandler(socket, data));
20
+ socket.on("#rtc-message", (data) => rtcMessageHandler(socket, data));
21
+ }
22
+ exports.addDefaultListeners = addDefaultListeners;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,186 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.whipManager = void 0;
16
+ const express_1 = __importDefault(require("express"));
17
+ const http_1 = require("http");
18
+ const body_parser_1 = __importDefault(require("body-parser"));
19
+ const url = require("url");
20
+ const cors = require("cors");
21
+ const { RTCPeerConnection, RTCRtpCodecParameters, MediaStream } = require("werift");
22
+ const app = (0, express_1.default)();
23
+ app.use(body_parser_1.default.raw({ type: "application/sdp" }));
24
+ const peerConnections = new Map();
25
+ const tracks = [];
26
+ const rooms = new Map();
27
+ function whipManager(options = {}) {
28
+ const { rtcHttpServerPort, socketIoServerOptions = {} } = options;
29
+ app.use(cors());
30
+ app.get("/", (req, res) => {
31
+ res.status(405).end();
32
+ });
33
+ app.post("/:id?", (req, res) => __awaiter(this, void 0, void 0, function* () {
34
+ var _a;
35
+ const id = req.params.id || "";
36
+ const body = req.body;
37
+ const authorizationHeader = req.headers["authorization"];
38
+ const servers = {
39
+ iceServers: [
40
+ {
41
+ urls: ["stun:stun1.l.google.com:19302", "stun:stun2.l.google.com:19302"],
42
+ },
43
+ ],
44
+ };
45
+ const peerConnection = new RTCPeerConnection({
46
+ codecs: {
47
+ audio: [
48
+ new RTCRtpCodecParameters({
49
+ mimeType: "audio/opus",
50
+ clockRate: 160,
51
+ channels: 2,
52
+ }),
53
+ ],
54
+ video: [
55
+ new RTCRtpCodecParameters({
56
+ mimeType: "video/H264",
57
+ clockRate: 90000,
58
+ channels: 2,
59
+ rtcpFeedback: [{ type: "nack" }, { type: "nack", parameter: "pli" }, { type: "goog-remb" }],
60
+ }),
61
+ ],
62
+ },
63
+ }, servers);
64
+ peerConnection.oniceconnectionstatechange = () => {
65
+ console.log(`Connection state has changed: ${peerConnection.iceConnectionState}`);
66
+ };
67
+ if (id !== "") {
68
+ //console.log("in first if")
69
+ // console.log(id)
70
+ if (!rooms.has(id))
71
+ rooms.set(id, []);
72
+ for (const track of rooms.get(id)) {
73
+ // console.log("id is not null")
74
+ // console.log(track.kind)
75
+ peerConnection.addTransceiver(track, { direction: "sendonly" });
76
+ }
77
+ }
78
+ else {
79
+ if (!authorizationHeader) {
80
+ return res.status(401).json({ error: "Authorization header missing" });
81
+ }
82
+ const streamRoom = ((_a = req.headers["authorization"]) === null || _a === void 0 ? void 0 : _a.split("Bearer ")[1]) || "";
83
+ peerConnection.ontrack = (event) => {
84
+ const track = event.track;
85
+ console.log("TRACK GELDİ");
86
+ //console.log("id in ontrack")
87
+ //console.log(streamRoom)
88
+ if (!rooms.has(streamRoom))
89
+ rooms.set(streamRoom, [track]);
90
+ else
91
+ rooms.get(streamRoom).push(track);
92
+ // console.log("check track streamID")
93
+ const trackIndex = rooms.get(streamRoom).indexOf(track);
94
+ track.onended = () => {
95
+ console.log("TRACK ON ENDDD");
96
+ rooms.get(streamRoom).splice(trackIndex, 1);
97
+ };
98
+ const stream = new MediaStream();
99
+ stream.addTrack(track);
100
+ };
101
+ }
102
+ const gatherComplete = new Promise((resolve) => {
103
+ peerConnection.onicegatheringstatechange = (event) => {
104
+ if (event.target.iceGatheringState === "complete") {
105
+ resolve();
106
+ }
107
+ };
108
+ });
109
+ if (body.length > 0) {
110
+ //console.log(body);
111
+ const offer = { type: "offer", sdp: body.toString() };
112
+ yield peerConnection.setRemoteDescription(offer);
113
+ const answer = yield peerConnection.createAnswer();
114
+ yield peerConnection.setLocalDescription(answer);
115
+ }
116
+ else {
117
+ const offer = yield peerConnection.createOffer();
118
+ yield peerConnection.setLocalDescription(offer);
119
+ }
120
+ const pcid = generateUUID();
121
+ res.setHeader("Content-Type", "application/sdp");
122
+ peerConnections.set(pcid, peerConnection);
123
+ if (id !== "")
124
+ res.status(201)
125
+ .set("Content-Type", "application/sdp")
126
+ .set("Access-Control-Allow-Origin", "*")
127
+ .set("Access-Control-Allow-Headers", "*")
128
+ .set("Location", `http://${req.headers.host}/${pcid}`)
129
+ .json({ answer: peerConnection.localDescription.sdp, location: `http://${req.headers.host}/${pcid}` });
130
+ else {
131
+ res.status(201)
132
+ .set("Content-Type", "application/sdp")
133
+ .set("Access-Control-Allow-Origin", "*")
134
+ .set("Access-Control-Allow-Headers", "*")
135
+ .set("Location", `http://${req.headers.host}/${pcid}`)
136
+ .end(peerConnection.localDescription.sdp);
137
+ }
138
+ //console.log("END OF REQUEST")
139
+ }));
140
+ app.patch("/:id", (req, res) => {
141
+ if (req.get("Content-Type") !== "application/sdp") {
142
+ res.status(400).end();
143
+ return;
144
+ }
145
+ const id = req.params.id;
146
+ const peerConnection = peerConnections.get(id);
147
+ //console.log("patch geldi")
148
+ if (!peerConnection) {
149
+ // console.log("hata aldım pc yok")
150
+ res.status(400).end();
151
+ return;
152
+ }
153
+ const body = [];
154
+ req.on("data", (chunk) => {
155
+ body.push(chunk);
156
+ }).on("end", () => __awaiter(this, void 0, void 0, function* () {
157
+ const answer = { type: "answer", sdp: Buffer.concat(body).toString() };
158
+ yield peerConnection.setRemoteDescription(answer);
159
+ res.end();
160
+ }));
161
+ });
162
+ app.delete("/:id", (req, res) => {
163
+ const id = req.params.id;
164
+ const peerConnection = peerConnections.get(id);
165
+ if (!peerConnection) {
166
+ res.status(404).end();
167
+ return;
168
+ }
169
+ peerConnection.close();
170
+ peerConnections.delete(id);
171
+ res.end();
172
+ });
173
+ const server = (0, http_1.createServer)(app);
174
+ server.listen(rtcHttpServerPort, () => {
175
+ console.log(`RTC HTTP server listening on port ${rtcHttpServerPort}`);
176
+ });
177
+ return server;
178
+ }
179
+ exports.whipManager = whipManager;
180
+ // Helper function to generate UUID
181
+ function generateUUID() {
182
+ return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) {
183
+ const r = (Math.random() * 16) | 0, v = c === "x" ? r : (r & 0x3) | 0x8;
184
+ return v.toString(16);
185
+ });
186
+ }
package/index.ts ADDED
@@ -0,0 +1,34 @@
1
+ import {
2
+ Server as RootServer,
3
+ Socket,
4
+ DisconnectReason,
5
+ ServerOptions as RootServerOptions,
6
+ Namespace,
7
+ BroadcastOperator,
8
+ RemoteSocket,
9
+ Event,
10
+ } from "socket.io";
11
+ import { addDefaultListeners } from "./lib/defaulthandlers";
12
+ import { RtcioEvents } from "./lib/events";
13
+
14
+ interface ServerOptions extends RootServerOptions {}
15
+
16
+ export class Server extends RootServer {
17
+ constructor(opts?: Partial<ServerOptions>) {
18
+ super(opts);
19
+ super.on("connection", (socket: Socket) => addDefaultListeners(socket));
20
+ }
21
+ }
22
+
23
+ export {
24
+ ServerOptions,
25
+ BroadcastOperator,
26
+ RemoteSocket,
27
+ Event,
28
+ Namespace,
29
+ DisconnectReason,
30
+ Socket,
31
+ addDefaultListeners,
32
+ RtcioEvents,
33
+ };
34
+ export default Server;
@@ -0,0 +1,34 @@
1
+ import { Socket } from "socket.io";
2
+ import { MessagePayload } from "./payload";
3
+ import { RtcioEvents } from "./events";
4
+
5
+ function rtcOfferHandler(socket: Socket, data: MessagePayload<RTCSessionDescriptionInit>) {
6
+ socket.to(data.target).emit(RtcioEvents.OFFER, data);
7
+ }
8
+
9
+ function rtcAnswerHandler(socket: Socket, data: MessagePayload<RTCSessionDescriptionInit>) {
10
+ socket.to(data.target).emit(RtcioEvents.ANSWER, data);
11
+ }
12
+
13
+ function rtcCandidateHandler(socket: Socket, data: MessagePayload<RTCIceCandidate>) {
14
+ socket.to(data.target).emit(RtcioEvents.CANDIDATE, data);
15
+ }
16
+
17
+ function rtcMessageHandler(socket: Socket, data: MessagePayload<string>) {
18
+ socket.to(data.target).emit(RtcioEvents.MESSAGE, data);
19
+ }
20
+
21
+ function rtcStreamMetaHandler(socket: Socket, data: MessagePayload<unknown>) {
22
+ socket.to(data.target).emit(RtcioEvents.STREAM_META, data);
23
+ }
24
+
25
+ function addDefaultListeners(socket: Socket) {
26
+ socket.on(RtcioEvents.OFFER, (data: MessagePayload<RTCSessionDescriptionInit>) => rtcOfferHandler(socket, data));
27
+ socket.on(RtcioEvents.ANSWER, (data: MessagePayload<RTCSessionDescriptionInit>) => rtcAnswerHandler(socket, data));
28
+ socket.on(RtcioEvents.CANDIDATE, (data: MessagePayload<RTCIceCandidate>) => rtcCandidateHandler(socket, data));
29
+ socket.on(RtcioEvents.MESSAGE, (data: MessagePayload<string>) => rtcMessageHandler(socket, data));
30
+ socket.on(RtcioEvents.STREAM_META, (data: MessagePayload<unknown>) => rtcStreamMetaHandler(socket, data));
31
+ }
32
+
33
+ export { addDefaultListeners };
34
+
package/lib/events.ts ADDED
@@ -0,0 +1,8 @@
1
+ export const RtcioEvents = {
2
+ OFFER: "#rtcio:offer",
3
+ ANSWER: "#rtcio:answer",
4
+ CANDIDATE: "#rtcio:candidate",
5
+ MESSAGE: "#rtcio:message",
6
+ STREAM_META: "#rtcio:stream-meta",
7
+ INIT_OFFER: "#rtcio:init-offer",
8
+ } as const;
package/lib/payload.ts ADDED
@@ -0,0 +1,8 @@
1
+ type BasePayload = {
2
+ source: string;
3
+ target: string;
4
+ };
5
+
6
+ export type MessagePayload<T> = {
7
+ data: T;
8
+ } & BasePayload;
package/package.json ADDED
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "rtc.io-server",
3
+ "version": "1.0.0",
4
+ "description": "A simple rtc.io server implementation",
5
+ "main": "dist/index.js",
6
+ "directories": {
7
+ "lib": "lib"
8
+ },
9
+ "scripts": {
10
+ "build": "tsc",
11
+ "dev": "nodemon --watch '*/.ts' --exec 'ts-node' ./index.ts"
12
+ },
13
+ "author": "",
14
+ "license": "ISC",
15
+ "dependencies": {
16
+ "socket.io": "^4.7.3",
17
+ "typescript": "^5.3.3"
18
+ },
19
+ "devDependencies": {
20
+ "@types/node": "^20.11.0"
21
+ }
22
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,109 @@
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": "./dist", /* 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
+ // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */
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
+ // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
75
+
76
+ /* Interop Constraints */
77
+ // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
78
+ // "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. */
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
+
84
+ /* Type Checking */
85
+ "strict": true, /* Enable all strict type-checking options. */
86
+ "noImplicitAny": false, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
87
+ // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
88
+ // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
89
+ // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
90
+ // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
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
+
105
+ /* Completeness */
106
+ // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
107
+ "skipLibCheck": true /* Skip type checking all .d.ts files. */
108
+ }
109
+ }