Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert Code base to Typescript #278

Merged
merged 22 commits into from
Sep 29, 2024
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
node_modules
build
build
/**/*.js
jest.config.ts
rollup.config.mjs
test/wpt-tests/wpt
8 changes: 0 additions & 8 deletions .eslintrc.cjs

This file was deleted.

27 changes: 27 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"env": {
"browser": false,
"es6": true,
"node": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.json",
"sourceType": "module",
"ecmaVersion": 2020
},
"plugins": ["@typescript-eslint", "jest"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:jest/recommended",
"prettier"
],
"rules": {
// The following rule is enabled only to supplement the inline suppression
// examples, and because it is not a recommended rule, you should either
// disable it, or understand what it enforces.
// https://typescript-eslint.io/rules/explicit-function-return-type/
"@typescript-eslint/explicit-function-return-type": "warn"
}
}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
build
dist
prebuilds
node_modules
.vscode
tmp
coverage
11 changes: 11 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
build
prebuilds
node_modules
.vscode
tmp
coverage
test
.github
build-containers
examples
cmake
12 changes: 12 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"singleQuote": true,
"trailingComma": "all",
"overrides": [
{
"files": ["*.ts", "*.mts"],
"options": {
"parser": "typescript"
}
}
]
}
8 changes: 0 additions & 8 deletions .prettierrc.cjs

This file was deleted.

24 changes: 12 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,18 @@ if(NOT libdatachannel)
endif()

add_library(${PROJECT_NAME} SHARED
src/rtc-wrapper.cpp
src/media-direction.cpp
src/media-rtcpreceivingsession-wrapper.cpp
src/media-track-wrapper.cpp
src/media-audio-wrapper.cpp
src/media-video-wrapper.cpp
src/data-channel-wrapper.cpp
src/peer-connection-wrapper.cpp
src/thread-safe-callback.cpp
src/web-socket-wrapper.cpp
src/web-socket-server-wrapper.cpp
src/main.cpp
src/cpp/rtc-wrapper.cpp
src/cpp/media-direction.cpp
src/cpp/media-rtcpreceivingsession-wrapper.cpp
src/cpp/media-track-wrapper.cpp
src/cpp/media-audio-wrapper.cpp
src/cpp/media-video-wrapper.cpp
src/cpp/data-channel-wrapper.cpp
src/cpp/peer-connection-wrapper.cpp
src/cpp/thread-safe-callback.cpp
src/cpp/web-socket-wrapper.cpp
src/cpp/web-socket-server-wrapper.cpp
src/cpp/main.cpp
${CMAKE_JS_SRC}
)

Expand Down
Loading