This repository was archived by the owner on Jul 10, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +9
-8
lines changed Expand file tree Collapse file tree 5 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 11import EnvDev from './env.dev'
22import EnvStg from './env.stg'
33import EnvProd from './env.prod'
4- import { EnvInterface } from '@/interface/EnvInterface '
4+ import { IEnv } from '@/interface/IEnv '
55
66console . log ( 'process.env.NODE_ENV: ' , process . env . NODE_ENV )
77
8- let Env : EnvInterface
8+ let Env : IEnv
99if ( process . env . NODE_ENV === 'production' ) {
1010 Env = EnvProd
1111} else if ( process . env . NODE_ENV === 'staging' ) {
Original file line number Diff line number Diff line change 11/**
22 * Api Payload インターフェイス
33 */
4- export interface ApiPayloadInterface {
4+ export interface IApiPayload {
55 hoge : string
66}
Original file line number Diff line number Diff line change 11/**
22 * Env インターフェイス
33 */
4- export interface EnvInterface {
4+ export interface IEnv {
55 envName : string
6+ url : string
67}
Original file line number Diff line number Diff line change 1010
1111<script lang="ts">
1212import { Component , Vue } from ' nuxt-property-decorator'
13- import { ApiPayloadInterface } from ' @/interface/ApiPayloadInterface '
13+ import { IApiPayload } from ' @/interface/IApiPayload '
1414import { ApiInterface } from ' @/store/api'
1515import { cancelToken } from ' @/utilities/'
1616
1717@Component
1818export default class Api extends Vue {
1919 // リクエスト用ペイロード
20- private payload: ApiPayloadInterface = {
20+ private payload: IApiPayload = {
2121 hoge: ' foo'
2222 }
2323
Original file line number Diff line number Diff line change 11import Vue from 'vue'
22import { AxiosRequestConfig } from 'axios'
3- import { ApiPayloadInterface } from '@/interface/ApiPayloadInterface '
3+ import { IApiPayload } from '@/interface/IApiPayload '
44import { 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
You can’t perform that action at this time.
0 commit comments