Migrate index.js to use Typescript (#129)
* Migrate index.js to use Typescript * Fix tests
This commit is contained in:
parent
18d30b50bc
commit
d9532472eb
9 changed files with 326 additions and 101 deletions
23
webapp/src/index.tsx
Normal file
23
webapp/src/index.tsx
Normal file
|
@ -0,0 +1,23 @@
|
|||
import {Store, Action} from 'redux';
|
||||
|
||||
import {GlobalState} from 'mattermost-redux/types/store';
|
||||
|
||||
import manifest from './manifest';
|
||||
|
||||
// eslint-disable-next-line import/no-unresolved
|
||||
import {PluginRegistry} from './types/mattermost-webapp';
|
||||
|
||||
export default class Plugin {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function
|
||||
public async initialize(registry: PluginRegistry, store: Store<GlobalState, Action<Record<string, unknown>>>) {
|
||||
// @see https://developers.mattermost.com/extend/plugins/webapp/reference/
|
||||
}
|
||||
}
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
registerPlugin(id: string, plugin: Plugin): void
|
||||
}
|
||||
}
|
||||
|
||||
window.registerPlugin(manifest.id, new Plugin());
|
Reference in a new issue