Skip to content

Commit 5f03e16

Browse files
authored
fix: tsc --noEmit error (#862)
* fix: tsc --noEmit error * [fix]workflow add npm run tsc
1 parent 2bcc6e6 commit 5f03e16

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

docs/examples/custom-tags.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
import React from 'react';
33
import Select, { Option } from 'rc-select';
44
import '../../assets/index.less';
5-
import type { CustomTagProps } from '../src/interface/generator';
5+
import type { CustomTagProps } from '@/BaseSelect';
6+
67

78
const children = [];
89
for (let i = 10; i < 36; i += 1) {

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434
"build": "dumi build",
3535
"compile": "father build",
3636
"prepublishOnly": "npm run compile && np --yolo --no-publish",
37-
"lint": "eslint src/ docs/examples/ --ext .tsx,.ts,.jsx,.js",
37+
"lint":"npm run tsc && npm run lint:script",
38+
"lint:script": "eslint src/ docs/examples/ --ext .tsx,.ts,.jsx,.js",
3839
"test": "rc-test",
3940
"tsc": "tsc --noEmit",
4041
"now-build": "npm run build"

src/OptionList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function isTitleType(content: any) {
3232
* Using virtual list of option display.
3333
* Will fallback to dom if use customize render.
3434
*/
35-
const OptionList: React.ForwardRefRenderFunction<RefOptionListProps, OptionListProps> = (
35+
const OptionList: React.ForwardRefRenderFunction<RefOptionListProps, {}> = (
3636
_,
3737
ref,
3838
) => {

src/utils/valueUtil.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export function flattenOptions<OptionType extends BaseOptionType = DefaultOption
8989
/**
9090
* Inject `props` into `option` for legacy usage
9191
*/
92-
export function injectPropsWithOption<T>(option: T): T {
92+
export function injectPropsWithOption<T extends object>(option: T): T {
9393
const newOption = { ...option };
9494
if (!('props' in newOption)) {
9595
Object.defineProperty(newOption, 'props', {

0 commit comments

Comments
 (0)