Skip to content

Commit 82f3d24

Browse files
committed
refactor: partial import lodash
1 parent 330825a commit 82f3d24

8 files changed

+9
-8
lines changed

demo/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class Count extends Ayanami<State> {
3232
count: 0,
3333
}
3434

35-
otherProps: string = ''
35+
otherProps = ''
3636

3737
constructor(private readonly tips: Tips) {
3838
super()

src/core/ikari.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { merge, Observable, Subject, Subscription, NEVER } from 'rxjs'
22
import { map, catchError, takeUntil, filter } from 'rxjs/operators'
3-
import { mapValues } from 'lodash'
3+
import mapValues from 'lodash/mapValues'
44
import produce from 'immer'
55

66
import {

src/hooks/use-ayanami-instance.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as React from 'react'
2-
import { get } from 'lodash'
2+
import get from 'lodash/get'
33

44
import { ActionMethodOfAyanami, Ayanami, combineWithIkari } from '../core'
55
import { useSubscribeAyanamiState } from './use-subscribe-ayanami-state'
@@ -10,7 +10,7 @@ export interface UseAyanamiInstanceConfig {
1010

1111
export type UseAyanamiInstanceResult<M extends Ayanami<S>, S> = [
1212
Readonly<S>,
13-
ActionMethodOfAyanami<M, S>
13+
ActionMethodOfAyanami<M, S>,
1414
]
1515

1616
type Config = UseAyanamiInstanceConfig

src/hooks/use-ayanami.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as React from 'react'
2-
import { get } from 'lodash'
2+
import get from 'lodash/get'
33

44
import {
55
Ayanami,

src/redux-devtools-extension.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { noop } from 'lodash'
1+
import noop from 'lodash/noop'
22

33
interface DevTools {
44
send(action: { type: string }, state?: Partial<GlobalState>): void

src/ssr/run.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const skipFn = () => SKIP_SYMBOL
3333
export const emitSSREffects = (
3434
req: Request,
3535
modules: ModuleMeta[],
36-
timeout: number = 3,
36+
timeout = 3,
3737
): Promise<{ state: any; cleanup: () => void }> => {
3838
const stateToSerialize: any = {}
3939
const cleanup = () => {

src/ssr/ssr-module.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { InjectableConfig, Injectable } from '@asuka/di'
2-
import { omit } from 'lodash'
2+
import omit from 'lodash/omit'
33

44
const configSets = new Set<string>()
55

tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"importHelpers": true,
1515
"noEmitHelpers": true,
1616
"noImplicitAny": true,
17+
"esModuleInterop": true,
1718
"noImplicitReturns": true,
1819
"moduleResolution": "node",
1920
"lib": ["dom", "es2015"],

0 commit comments

Comments
 (0)