Skip to content
This repository has been archived by the owner on Aug 2, 2024. It is now read-only.

Commit

Permalink
fix: Fixes typescript version and related warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianKienle committed Apr 4, 2019
1 parent 421c38c commit e2d6e02
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 42 deletions.
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"markdown-loader": "^5.0.0",
"node-sass": "^4.11.0",
"sass-loader": "^7.1.0",
"typescript": "^3.3.3",
"typescript": ">=3.2.1 <3.4.0",
"vue": "^2.6.7",
"vue-loader": "^15.6.2",
"vue-template-compiler": "^2.6.7"
Expand Down
1 change: 1 addition & 0 deletions docs/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"compilerOptions": {
"allowJs": true,
"resolveJsonModule": true,
"target": "esnext",
"module": "esnext",
Expand Down
8 changes: 4 additions & 4 deletions docs/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8394,10 +8394,10 @@ typedarray@^0.0.6:
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=

typescript@^3.3.3:
version "3.3.3333"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.3.3333.tgz#171b2c5af66c59e9431199117a3bcadc66fdcfd6"
integrity sha512-JjSKsAfuHBE/fB2oZ8NxtRTk5iGcg6hkYXMnZ3Wc+b2RSqejEqTaem11mHASMnFilHrax3sLK0GDzcJrekZYLw==
"typescript@>=3.2.1 <3.4.0":
version "3.3.4000"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.3.4000.tgz#76b0f89cfdbf97827e1112d64f283f1151d6adf0"
integrity sha512-jjOcCZvpkl2+z7JFn0yBOoLQyLoIkNZAs/fYJkUG6VKy6zLPHJGfQJYFHzibB6GJaF/8QrcECtlQ5cpvRHSMEA==

uglify-js@3.4.x:
version "3.4.9"
Expand Down
2 changes: 1 addition & 1 deletion ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"chai": "^4.2.0",
"eslint": "^5.15.0",
"eslint-plugin-vue": "^5.2.2",
"typescript": "^3.3.3",
"typescript": ">=3.2.1 <3.4.0",
"vue": "^2.6.7",
"ts-jest": "^23.0.0",
"babel-core": "7.0.0-bridge.0",
Expand Down
31 changes: 14 additions & 17 deletions ui/src/components/SideNav/SideNavLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
</router-link>
</template>

<script lang="ts">
<script>
import { ModeType, Config, Store } from "./Model";
import { withTargetLocation, mixins } from "@/mixins";
export default mixins(withTargetLocation("#")).extend({
export default {
name: "FdSideNavLink",
mixins: [withTargetLocation("#")],
inject: {
sideNavStore: { default: null },
sideNavItem: { default: null },
Expand All @@ -37,36 +37,33 @@ export default mixins(withTargetLocation("#")).extend({
ariaSelected() {
return this.selected ? "true" : null;
},
parentItemId(): string {
// @ts-ignore
parentItemId() {
return this.sideNavItem.uid;
},
store(): Store {
// @ts-ignore
store() {
return this.sideNavStore;
},
config(): Config {
// @ts-ignore
config() {
return this.$config;
},
manualModeEnabled(): boolean {
manualModeEnabled() {
return this.mode === "manual";
},
mode(): ModeType {
mode() {
return this.config.mode;
},
hasChildren(): boolean {
hasChildren() {
return this.store.hasSubItems(this.parentItemId);
},
selected(): boolean {
selected() {
return this.store.selected(this.parentItemId);
},
routerLinkClasses() {
return {
"has-child": this.hasChildren
};
},
classes(): object {
classes() {
return {
"has-child": this.hasChildren,
"is-selected": this.selected
Expand All @@ -78,16 +75,16 @@ export default mixins(withTargetLocation("#")).extend({
this.store.selectedId = this.parentItemId;
this.store.toggleExpanded(this.parentItemId);
},
onRouterLinkClick(): void {
onRouterLinkClick() {
this.selectSelf();
this.pushLocation();
},
onClick(event: Event): void {
onClick(event) {
event.preventDefault();
event.stopPropagation();
this.selectSelf();
this.pushLocation();
}
}
});
};
</script>
29 changes: 14 additions & 15 deletions ui/src/components/SideNav/SideNavSubLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@
</router-link>
</template>

<script lang="ts">
import { withTargetLocation, mixins } from "@/mixins";
<script>
import { withTargetLocation } from "@/mixins";
import { Store, ModeType, Config } from "./Model";
// TODO: Refactor so that SideNavSubLink uses SideNavLink
export default mixins(withTargetLocation("#")).extend({
export default {
name: "FdSideNavSubLink",
mixins: [withTargetLocation("#")],
inject: {
sideNavStore: { default: null },
sideNavSubItem: { default: null },
Expand All @@ -37,42 +38,40 @@ export default mixins(withTargetLocation("#")).extend({
ariaSelected() {
return this.selected ? "true" : null;
},
selected(): boolean {
selected() {
return this.store.selected(this.parentId);
},
classes(): object {
classes() {
return { "is-selected": this.selected };
},
store(): Store {
// @ts-ignore
store() {
return this.sideNavStore;
},
parentId(): string {
// @ts-ignore
parentId() {
return this.sideNavSubItem.uid;
},
config(): Config {
config() {
// @ts-ignore
return this.$config;
},
manualModeEnabled(): boolean {
manualModeEnabled() {
return this.mode === "manual";
},
mode(): ModeType {
mode() {
return this.config.mode;
}
},
methods: {
onRouterLinkClick(): void {
onRouterLinkClick() {
this.store.selectedId = this.parentId;
this.pushLocation();
},
onClick(event: Event): void {
onClick(event) {
event.preventDefault();
event.stopPropagation();
this.store.selectedId = this.parentId;
this.pushLocation();
}
}
});
};
</script>
1 change: 1 addition & 0 deletions ui/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"compilerOptions": {
"allowJs": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"resolveJsonModule": true,
Expand Down
8 changes: 4 additions & 4 deletions ui/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9120,10 +9120,10 @@ typedarray@^0.0.6:
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=

typescript@^3.3.3:
version "3.3.3333"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.3.3333.tgz#171b2c5af66c59e9431199117a3bcadc66fdcfd6"
integrity sha512-JjSKsAfuHBE/fB2oZ8NxtRTk5iGcg6hkYXMnZ3Wc+b2RSqejEqTaem11mHASMnFilHrax3sLK0GDzcJrekZYLw==
"typescript@>=3.2.1 <3.4.0":
version "3.3.4000"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.3.4000.tgz#76b0f89cfdbf97827e1112d64f283f1151d6adf0"
integrity sha512-jjOcCZvpkl2+z7JFn0yBOoLQyLoIkNZAs/fYJkUG6VKy6zLPHJGfQJYFHzibB6GJaF/8QrcECtlQ5cpvRHSMEA==

uglify-js@3.4.x, uglify-js@^3.1.4:
version "3.4.9"
Expand Down

0 comments on commit e2d6e02

Please sign in to comment.