Convert index to TS
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>pull/21833/head
parent
e2b6c2cbd6
commit
de44b3aacc
|
@ -25,9 +25,9 @@
|
|||
"bin": {
|
||||
"reskindex": "scripts/reskindex.js"
|
||||
},
|
||||
"main": "./src/index.js",
|
||||
"matrix_src_main": "./src/index.js",
|
||||
"matrix_lib_main": "./lib/index.js",
|
||||
"main": "./src/index.ts",
|
||||
"matrix_src_main": "./src/index.ts",
|
||||
"matrix_lib_main": "./lib/index.ts",
|
||||
"matrix_lib_typings": "./lib/index.d.ts",
|
||||
"scripts": {
|
||||
"prepublishOnly": "yarn build",
|
||||
|
|
|
@ -15,20 +15,21 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
import Skinner from './Skinner';
|
||||
import Skinner, { ISkinObject } from './Skinner';
|
||||
|
||||
export function loadSkin(skinObject) {
|
||||
export function loadSkin(skinObject: ISkinObject): void {
|
||||
Skinner.load(skinObject);
|
||||
}
|
||||
|
||||
export function resetSkin() {
|
||||
export function resetSkin(): void {
|
||||
Skinner.reset();
|
||||
}
|
||||
|
||||
export function getComponent(componentName) {
|
||||
export function getComponent(componentName: string): any {
|
||||
return Skinner.getComponent(componentName);
|
||||
}
|
||||
|
||||
// Import the js-sdk so the proper `request` object can be set. This does some
|
||||
// magic with the browser injection to make all subsequent imports work fine.
|
||||
import "matrix-js-sdk";
|
||||
|
Loading…
Reference in New Issue