-
-
Notifications
You must be signed in to change notification settings - Fork 60
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
Conversation
src/polyfill/RTCDataChannel.ts
Outdated
import * as exceptions from './Exception'; | ||
import { DataChannel } from '../lib/index'; | ||
|
||
export default class RTCDataChannel extends EventTarget { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd do:
npm i @types/webrtc -D
and
/// <reference types="@types/webrtc" />
export default class RTCDataChannel extends EventTarget implements globalThis.RTCDataChannel {
and use this implements
keyword in all other W3C spec compliant classes, probably the best way to go around making sure the types are correct
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will check that when I have time for this PR.
"strictNullChecks": false, | ||
"noUnusedLocals": true, | ||
"alwaysStrict": true, | ||
"outDir": "./dist", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"outDir": "./dist", | |
"outDir": "./dist", | |
"types": ["@types/webrtc"], |
"rollup-plugin-esbuild": "^6.1.1", | ||
"ts-api-utils": "^1.3.0", | ||
"ts-jest": "^29.2.3", | ||
"ts-node": "^10.9.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tsx was the right choice, ts-node has massive memory overhead
No description provided.