商航

Results 40 comments of 商航

> 我还以为能解决问题,18年的,19年9月没人回答,没有发现大佬..... 我已经换轮播组件了

> 我把计时器的抽离到组件里面(问题解决),只要swiper和定时器同时存在一个组件里就会有问题... 这个项目貌似已经没人维护了

> 柯里化 是啥意思 函数返函数 () => () => () => ''

```js type SetOptional = { [P in keyof (Partial & Pick)]: T[P] } type SetRequired = { [P in keyof (Required & Pick)]: T[P] } ``` 测试通过

```js type RepeatString< T extends string, C extends number, A extends any[] = [] > = A['length'] extends C ? '' : `${T}${RepeatString}` type S0 = RepeatString; // '' type...

```js declare const config: Chainable type Chainable = { option(key: K, value: V): Chainable; get(): T; } const result = config .option('age', 7) .option('name', 'lolo') .option('address', { value: 'XiaMen' })...

```js type Replace< S extends string, From extends string, To extends string > = S extends `${infer A}${From}${infer B}` ? `${A}${To}${B}` : S type ReplaceAll< S extends string, From extends...

```js type ConditionalPick = { [K in keyof E as E[K] extends T ? K : never]: E[K] } ```

```js type RequireExactlyOne = Omit & ( K extends any ? Required & Partial : 1 ) ```

```js type Add = A['length'] extends T ? B['length'] extends R ? [...A, ...B]['length'] : Add : Add type A0 = Add; // 10 type A1 = Add // 28...