mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
[vue-ls] 'export default' restored / bugfix (#38884)
* vue-ls * authors corrected * vue-ls: tsconfig updated * default removed * [vue-ls] 'export default' restored / bugfix
This commit is contained in:
parent
032146d3ef
commit
b725b63d06
9
types/vue-ls/index.d.ts
vendored
9
types/vue-ls/index.d.ts
vendored
@ -5,7 +5,7 @@
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 3.6
|
||||
|
||||
import _Vue, { PluginFunction } from 'vue';
|
||||
import _Vue, { PluginObject } from 'vue';
|
||||
|
||||
declare module 'vue/types/vue' {
|
||||
interface Vue {
|
||||
@ -43,6 +43,7 @@ export class WebStorage {
|
||||
setOptions(options?: Options): void;
|
||||
}
|
||||
|
||||
export const VueStorage: {
|
||||
install: PluginFunction<Options>;
|
||||
};
|
||||
declare const VueStorage: PluginObject<Options>;
|
||||
|
||||
// forced to use deault export, the reason is discussed on https://github.com/DefinitelyTyped/DefinitelyTyped/pull/38653#discussion_r331455390
|
||||
export default VueStorage;
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
import Vue from 'vue';
|
||||
import { VueStorage, Options, Types } from 'vue-ls';
|
||||
import VueStoragePlugin, * as VueStorage from 'vue-ls';
|
||||
|
||||
const storageOptions: Options = {
|
||||
const storageOptions: VueStorage.Options = {
|
||||
namespace: 'my_project',
|
||||
name: 'ls',
|
||||
storage: Types.Local,
|
||||
storage: VueStorage.Types.Local,
|
||||
};
|
||||
|
||||
Vue.use(VueStorage, storageOptions);
|
||||
Vue.use(VueStoragePlugin, storageOptions);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user