Skip to content

Commit

Permalink
Merge pull request #278 from murat-dogan/typescript
Browse files Browse the repository at this point in the history
Convert Code base to Typescript
  • Loading branch information
murat-dogan authored Sep 29, 2024
2 parents f3128fe + 1fe355a commit ff5b73d
Show file tree
Hide file tree
Showing 121 changed files with 24,121 additions and 10,938 deletions.
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

0 comments on commit ff5b73d

Please sign in to comment.