diff --git a/CHANGES.md b/CHANGES.md index 3b55144..6b0d823 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,7 +1,8 @@ ## 1.1.1 (2020-??-??) - Bump highlight.js from 9.18.1 to 9.18.5 #19 -- Bump ini from 1.3.5 to 1.3.8 #20 +- Bump ini from 1.3.5 to 1.3.8 #20 +- #13 Add TypeScript support ## 1.1.0 (2020-08-27) diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..5f3d071 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,3 @@ +{ + "typeRoots": ["./node_modules/@types", "types"] +} diff --git a/types/index.d.ts b/types/index.d.ts new file mode 100644 index 0000000..7a868ad --- /dev/null +++ b/types/index.d.ts @@ -0,0 +1,38 @@ +/** + * Copyright 2020 Bruno P. Kinoshita + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { VueConstructor } from 'vue' +import { Message } from '@lumino/messaging/types' +import { Widget } from "@lumino/widgets"; + +declare module "tupilabs/vue-lumino" { + const Lumino : VueConstructor + + interface LuminoWidget extends Widget { + $id: string; + $name: string; + closable: boolean; + + constructor(id: string, name: string, closable: boolean); + createNode(id: string): HTMLElement; + _getEventDetails(); + } + + export default Lumino; + export { + Lumino, + LuminoWidget + } +}