Skip to content

Commit d6d4222

Browse files
committed
ag-grid-vue - Fix for vuejs/vue-class-component#294
1 parent e97b9cc commit d6d4222

File tree

6 files changed

+18
-12
lines changed

6 files changed

+18
-12
lines changed

packages/ag-grid-vue/src/AgGridVue.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export class AgGridVue extends Vue {
6262
},
6363
};
6464

65-
new Grid(this.$el, gridOptions, gridParams);
65+
new Grid(this.$el as HTMLElement, gridOptions, gridParams);
6666

6767
this.isInitialised = true;
6868
}

packages/ag-grid-vue/src/VueComponentFactory.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import Vue, { VueConstructor } from 'vue';
2-
import { AgGridVue } from "./AgGridVue";
2+
import { AgGridVue } from './AgGridVue';
33

44
export class VueComponentFactory {
55

packages/ag-grid-vue/src/VueFrameworkComponentWrapper.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { BaseComponentWrapper, Bean, WrapableInterface } from 'ag-grid-community';
2-
import { AgGridVue } from "./AgGridVue";
3-
import { VueComponentFactory } from "./VueComponentFactory";
2+
import { AgGridVue } from './AgGridVue';
3+
import { VueComponentFactory } from './VueComponentFactory';
44

55
@Bean('frameworkComponentWrapper')
66
export class VueFrameworkComponentWrapper extends BaseComponentWrapper<WrapableInterface> {
@@ -12,8 +12,8 @@ export class VueFrameworkComponentWrapper extends BaseComponentWrapper<WrapableI
1212
this.parent = parent;
1313
}
1414

15-
createWrapper(component: any): WrapableInterface {
16-
let that = this;
15+
public createWrapper(component: any): WrapableInterface {
16+
const that = this;
1717

1818
class DynamicComponent extends VueComponent<any, any> implements WrapableInterface {
1919
public init(params: any): void {
@@ -24,18 +24,18 @@ export class VueFrameworkComponentWrapper extends BaseComponentWrapper<WrapableI
2424
return that.createComponent(component, params);
2525
}
2626

27-
hasMethod(name: string): boolean {
27+
public hasMethod(name: string): boolean {
2828
return wrapper.getFrameworkComponentInstance()[name] != null;
2929
}
3030

31-
callMethod(name: string, args: IArguments): void {
31+
public callMethod(name: string, args: IArguments): void {
3232
const componentInstance = this.getFrameworkComponentInstance();
33-
return wrapper.getFrameworkComponentInstance()[name].apply(componentInstance, args)
33+
return wrapper.getFrameworkComponentInstance()[name].apply(componentInstance, args);
3434

3535
}
3636

37-
addMethod(name: string, callback: Function): void {
38-
(wrapper as any)[name] = callback
37+
public addMethod(name: string, callback: () => void): void {
38+
(wrapper as any)[name] = callback;
3939
}
4040
}
4141

packages/ag-grid-vue/tsconfig-lib.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"declaration": true,
99
"rootDir": "src",
1010
"outDir": "lib",
11+
"strictFunctionTypes": false,
1112
"lib": [
1213
"esnext",
1314
"dom",

packages/ag-grid-vue/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"esModuleInterop": true,
1212
"allowSyntheticDefaultImports": true,
1313
"sourceMap": true,
14+
"strictFunctionTypes": false,
1415
"types": [
1516
"webpack-env"
1617
],

packages/ag-grid-vue/tslint.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
"ordered-imports": false,
1717
"object-literal-sort-keys": false,
1818
"no-consecutive-blank-lines": false,
19-
"no-unused-expression": false
19+
"no-unused-expression": false,
20+
"member-ordering": false,
21+
"max-classes-per-file": false,
22+
"trailing-comma": false,
23+
"arrow-parens": false
2024
}
2125
}

0 commit comments

Comments
 (0)