Skip to content

Commit

Permalink
rm useless ts-ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
hiyuki committed Oct 8, 2024
1 parent 139de3c commit e84b7fe
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 12 deletions.
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ module.exports = {
'@typescript-eslint/ban-types': 0,
'@typescript-eslint/no-empty-interface': 0,
'@typescript-eslint/no-unused-vars': 0,
'@typescript-eslint/ban-ts-comment': 0,
camelcase: 0,
}
}
Expand Down
7 changes: 3 additions & 4 deletions packages/api-proxy/@types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,18 @@ type AddParam<O, V extends (...args: any) => any> =
Parameters<V> extends [{ success?: (res: infer R) => any }, ...any[]]
? (options: O) => ReturnType<V> & Promise<R>
: (options: O) => ReturnType<V>
// @ts-ignore

type PickApiValue<T extends keyof WechatMiniprogram.Wx> = Pick<WechatMiniprogram.Wx, T>[T]
// @ts-ignore

interface GetLocationInterface extends WechatMiniprogram.GetLocationOption {
aliType?: number
}
// @ts-ignore

interface RequestPaymentInterface extends WechatMiniprogram.RequestPaymentOption {
tradeNO?: string
}

declare module '@mpxjs/core' {
// @ts-ignore
interface Mpx extends AddPromise<WechatMiniprogram.Wx> {
getLocation: AddParam<GetLocationInterface, PickApiValue<'getLocation'>>
requestPayment: AddParam<RequestPaymentInterface, PickApiValue<'requestPayment'>>
Expand Down
2 changes: 0 additions & 2 deletions packages/core/@types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@
/// <reference path="./global.d.ts" />
/// <reference path="./node.d.ts" />

// @ts-ignore
import { GetComputedType } from '@mpxjs/store'

// @ts-ignore
export * from '@mpxjs/store'

// utils
Expand Down
2 changes: 0 additions & 2 deletions packages/core/@types/node.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// @ts-ignore
declare let global: Record<string, any> // in web, we use global varible to do some things, here to declare

type Dict<T> = {
Expand All @@ -7,7 +6,6 @@ type Dict<T> = {

type EnvType = Dict<string>

// @ts-ignore
declare let process: {
env: EnvType
}
Expand Down
2 changes: 0 additions & 2 deletions packages/fetch/@types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ interface CancelTokenClass {
}
}

// @ts-ignore
export interface fetchOption extends WechatMiniprogram.RequestOption {
params?: object
cancelToken?: InstanceType<CancelTokenClass>['token']
Expand All @@ -18,7 +17,6 @@ interface CreateOption {
ratio?: number
}

// @ts-ignore
type fetchT = <T>(option: fetchOption, priority?: 'normal' | 'low') => Promise<WechatMiniprogram.RequestSuccessCallbackResult<T> & { requestConfig: fetchOption }>
type addLowPriorityWhiteListT = (rules: string | RegExp | Array<string | RegExp>) => void
type createT = (option?: CreateOption) => xfetch
Expand Down
1 change: 0 additions & 1 deletion packages/store/@types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// @ts-ignore
import type { ComputedRef } from '@mpxjs/core'

type UnboxDepField<D, F> = F extends keyof D ? D[F] : {}
Expand Down

0 comments on commit e84b7fe

Please sign in to comment.