From 9bf30cc5e30c590ae6b7abef95bd6092952c4ba5 Mon Sep 17 00:00:00 2001 From: Chen Mingliang Date: Fri, 29 Nov 2024 14:14:07 +0800 Subject: [PATCH] Fixed the type check error --- package.json | 3 ++- src/index.js | 7 +++++++ yarn.lock | 12 ++++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index f5047f77..690781c3 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "license": "Apache-2.0", "devDependencies": { "@eslint/js": "^9.15.0", + "@types/node": "^22.10.1", "eslint": "^9.15.0", "eslint-plugin-jsdoc": "50.6.0", "globals": "^15.12.0" @@ -27,4 +28,4 @@ "http2-express-bridge": "^1.0.7", "nanoid": "^5.0.9" } -} \ No newline at end of file +} diff --git a/src/index.js b/src/index.js index 0b96064b..fd4795d0 100644 --- a/src/index.js +++ b/src/index.js @@ -1,3 +1,10 @@ +// @ts-check +// +// Created by Chen Mingliang on 24/11/28. +// illuspas@msn.com +// Copyright (c) 2024 NodeMedia. All rights reserved. +// + import NodeHttpServer from "./server/http_server.js"; import NodeRtmpServer from "./server/rtmp_server.js"; import { createRequire } from "module"; diff --git a/yarn.lock b/yarn.lock index 1fc4e3e4..48ac81f6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -112,6 +112,13 @@ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== +"@types/node@^22.10.1": + version "22.10.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.10.1.tgz#41ffeee127b8975a05f8c4f83fb89bcb2987d766" + integrity sha512-qKgsUwfHZV2WCWLAnVP1JqnpE6Im6h3Y0+fYgMTasNQ7V++CBX5OT1as0g0f+OyubbFqhf6XVNIsmN4IIhEgGQ== + dependencies: + undici-types "~6.20.0" + accepts@~1.3.8: version "1.3.8" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" @@ -1156,6 +1163,11 @@ type-is@~1.6.18: media-typer "0.3.0" mime-types "~2.1.24" +undici-types@~6.20.0: + version "6.20.0" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.20.0.tgz#8171bf22c1f588d1554d55bf204bc624af388433" + integrity sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg== + unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"