mirror of https://github.com/OpenVidu/openvidu.git
openvidu-browser: update TS version. Fix "signal:X" event typings
parent
4e304b18d4
commit
695c13769c
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
SEARCH_STRING_1="<K extends keyof SessionEventMap>(type: K,"
|
||||
REPLACE_STRING_1="<K extends keyof SessionEventMap>(type: K | string,"
|
||||
SEARCH_STRING_2='\[key: `signal:\${string}`\]: SignalEvent;'
|
||||
sed -i "s~${SEARCH_STRING_1}~${REPLACE_STRING_1}~g" ts4.4/lib/OpenVidu/Session.d.ts
|
||||
sed -i "/${SEARCH_STRING_2}/d" ts4.4/lib/OpenViduInternal/Events/EventMap/SessionEventMap.d.ts
|
|
@ -11,8 +11,8 @@
|
|||
},
|
||||
"description": "OpenVidu Browser",
|
||||
"devDependencies": {
|
||||
"@types/node": "15.12.2",
|
||||
"@types/platform": "1.3.3",
|
||||
"@types/node": "17.0.8",
|
||||
"@types/platform": "1.3.4",
|
||||
"browserify": "17.0.0",
|
||||
"grunt": "1.4.1",
|
||||
"grunt-cli": "1.4.3",
|
||||
|
@ -23,11 +23,11 @@
|
|||
"grunt-postcss": "0.9.0",
|
||||
"grunt-string-replace": "1.3.1",
|
||||
"grunt-ts": "6.0.0-beta.22",
|
||||
"terser": "5.7.0",
|
||||
"terser": "5.10.0",
|
||||
"tsify": "5.0.4",
|
||||
"tslint": "6.1.3",
|
||||
"typedoc": "0.19.2",
|
||||
"typescript": "4.0.7"
|
||||
"typescript": "4.5.4"
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"main": "lib/index.js",
|
||||
|
@ -39,9 +39,16 @@
|
|||
"scripts": {
|
||||
"browserify": "VERSION=${VERSION:-dev}; mkdir -p static/js/ && cd src && ../node_modules/browserify/bin/cmd.js Main.ts -p [ tsify ] --exclude kurento-browser-extensions --debug -o ../static/js/openvidu-browser-$VERSION.js -v",
|
||||
"browserify-prod": "VERSION=${VERSION:-dev}; mkdir -p static/js/ && cd src && ../node_modules/browserify/bin/cmd.js --debug Main.ts -p [ tsify ] --exclude kurento-browser-extensions | ../node_modules/terser/bin/terser --source-map content=inline --output ../static/js/openvidu-browser-$VERSION.min.js",
|
||||
"build": "cd src/OpenVidu && ./../../node_modules/typescript/bin/tsc && cd ../.. && ./node_modules/typescript/bin/tsc --declaration src/index.ts --outDir ./lib --sourceMap --target es5 --lib dom,es5,es2015.promise,scripthost",
|
||||
"build": "cd src/OpenVidu && ./../../node_modules/typescript/bin/tsc && cd ../.. && ./node_modules/typescript/bin/tsc --declaration src/index.ts --outDir ./lib --sourceMap --target es5 --lib dom,es5,es2015.promise,scripthost && rm -rf ./ts4.4 && mkdir -p ./ts4.4/lib && cp -r ./lib ./ts4.4 && find ./ts4.4/lib -type f ! -iname '*.d.ts' -delete && ./config/replace_for_ts44.sh",
|
||||
"docs": "./generate-docs.sh"
|
||||
},
|
||||
"types": "lib/index.d.ts",
|
||||
"typesVersions": {
|
||||
"<4.4": {
|
||||
"*": [
|
||||
"ts4.4/*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"version": "2.20.0"
|
||||
}
|
||||
|
|
|
@ -19,6 +19,10 @@ export interface SessionEventMap {
|
|||
streamPropertyChanged: StreamPropertyChangedEvent;
|
||||
publisherStartSpeaking: PublisherSpeakingEvent;
|
||||
publisherStopSpeaking: PublisherSpeakingEvent;
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
[key: `signal:${string}`]: SignalEvent;
|
||||
signal: SignalEvent;
|
||||
recordingStarted: RecordingEvent;
|
||||
recordingStopped: RecordingEvent;
|
||||
|
|
Loading…
Reference in New Issue