Skip to content

Commit

Permalink
refactor: clean typing and struct
Browse files Browse the repository at this point in the history
  • Loading branch information
ci010 committed Jul 20, 2020
1 parent b7581dd commit 96e5075
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/main/service/LaunchService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ export default class LaunchService extends Service {
@Inject('ExternalAuthSkinService')
private externalAuthSkinService!: ExternalAuthSkinService;

private launchedProcess: ChildProcess | undefined;

@Inject('InstanceResourceService')
private instanceResourceService!: InstanceResourceService;

private launchedProcess: ChildProcess | undefined;

/**
* Launch the current selected instance. This will return a boolean promise indeicate whether launch is success.
* @param force
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/hooks/useInstance.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { computed, onMounted, reactive, toRefs } from '@/vue';
import { computed, onMounted, reactive, toRefs } from '@vue/composition-api';
import { CloneSaveOptions, DeleteSaveOptions, ImportSaveOptions } from '@main/service/InstanceSavesService';
import { CreateOption } from '@main/service/InstanceService';
import { InstanceConfig } from '@universal/store/modules/instance';
Expand Down
3 changes: 1 addition & 2 deletions src/renderer/hooks/useMissingMods.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { computed, Ref, ref, nextTick } from '@/vue';
import { computed, Ref, ref, nextTick } from '@vue/composition-api';
import { Forge } from '@xmcl/mod-parser';
import { useStore } from './useStore';
import { useService } from './useService';

export type ModStatus = 'existed' | 'absent' | 'founded' | 'not-found' | 'loading' | 'downloading' | 'unknown';

Expand Down
1 change: 0 additions & 1 deletion src/renderer/vue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import VueCompositionApi, { h } from '@vue/composition-api';
Vue.use(VueCompositionApi);

export * from '@vue/composition-api';
export const nextTick = Vue.nextTick;

export const remove = Vue.delete;
export const set = Vue.set;
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/windows/main/components/SearchBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</template>

<script lang=ts>
import { defineComponent, inject, ref, onMounted, onUnmounted, Ref, nextTick } from '@/vue';
import { defineComponent, inject, ref, onMounted, onUnmounted, Ref, nextTick } from '@vue/composition-api';
import { useSearch, useSearchToggle } from '../hooks';
export default defineComponent({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
</template>

<script lang=ts>
import { defineComponent, reactive, toRefs, onMounted, watch, nextTick } from '@/vue';
import { defineComponent, reactive, toRefs, onMounted, watch, nextTick } from '@vue/composition-api';
import { useStore, useI18n } from '@/hooks';
const HTTP_EXP = /(https?:\/\/)?(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/;
Expand Down
6 changes: 3 additions & 3 deletions types/vue.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
/* eslint-disable */


import { ComponentInstance } from '@vue/composition-api/dist/component/component';
// import { ComponentInstance } from '@vue/composition-api/dist/component/component';

declare module '@vue/composition-api' {
}
// declare module '@vue/composition-api' {
// }

0 comments on commit 96e5075

Please sign in to comment.