Skip to content
This repository was archived by the owner on Jul 10, 2019. It is now read-only.

Commit 92cfbf5

Browse files
committed
refactor: change name of interface from EnvInterface to IEnv
1 parent 5cfee8a commit 92cfbf5

File tree

5 files changed

+9
-8
lines changed

5 files changed

+9
-8
lines changed

src/common/env/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import EnvDev from './env.dev'
22
import EnvStg from './env.stg'
33
import EnvProd from './env.prod'
4-
import { EnvInterface } from '@/interface/EnvInterface'
4+
import { IEnv } from '@/interface/IEnv'
55

66
console.log('process.env.NODE_ENV: ', process.env.NODE_ENV)
77

8-
let Env: EnvInterface
8+
let Env: IEnv
99
if (process.env.NODE_ENV === 'production') {
1010
Env = EnvProd
1111
} else if (process.env.NODE_ENV === 'staging') {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* Api Payload インターフェイス
33
*/
4-
export interface ApiPayloadInterface {
4+
export interface IApiPayload {
55
hoge: string
66
}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/**
22
* Env インターフェイス
33
*/
4-
export interface EnvInterface {
4+
export interface IEnv {
55
envName: string
6+
url: string
67
}

src/pages/example/api.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010

1111
<script lang="ts">
1212
import { Component, Vue } from 'nuxt-property-decorator'
13-
import { ApiPayloadInterface } from '@/interface/ApiPayloadInterface'
13+
import { IApiPayload } from '@/interface/IApiPayload'
1414
import { ApiInterface } from '@/store/api'
1515
import { cancelToken } from '@/utilities/'
1616
1717
@Component
1818
export default class Api extends Vue {
1919
// リクエスト用ペイロード
20-
private payload: ApiPayloadInterface = {
20+
private payload: IApiPayload = {
2121
hoge: 'foo'
2222
}
2323

src/store/api.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Vue from 'vue'
22
import { AxiosRequestConfig } from 'axios'
3-
import { ApiPayloadInterface } from '@/interface/ApiPayloadInterface'
3+
import { IApiPayload } from '@/interface/IApiPayload'
44
import { cancelToken } from '@/utilities/'
55

66
/**
@@ -72,7 +72,7 @@ export const actions = {
7272
this: Vue,
7373
// @ts-ignore
7474
{ state, commit }: any,
75-
payload: ApiPayloadInterface
75+
payload: IApiPayload
7676
): Promise<void> {
7777
console.log('payload:', payload)
7878

0 commit comments

Comments
 (0)