mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 03:48:13 +08:00
先切成 typescript@3.8.x
This commit is contained in:
parent
ec740469c6
commit
46ad21ff94
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@ -1,3 +1,4 @@
|
|||||||
{
|
{
|
||||||
"editor.formatOnSave": true
|
"editor.formatOnSave": true,
|
||||||
|
"typescript.tsdk": "node_modules/typescript/lib"
|
||||||
}
|
}
|
||||||
|
@ -81,7 +81,7 @@
|
|||||||
"@types/classnames": "^2.2.3",
|
"@types/classnames": "^2.2.3",
|
||||||
"@types/dom-helpers": "^3.4.1",
|
"@types/dom-helpers": "^3.4.1",
|
||||||
"@types/history": "^4.6.0",
|
"@types/history": "^4.6.0",
|
||||||
"@types/hoist-non-react-statics": "^3.0.1",
|
"@types/hoist-non-react-statics": "^3.3.1",
|
||||||
"@types/jest": "^24.0.11",
|
"@types/jest": "^24.0.11",
|
||||||
"@types/jquery": "^3.3.1",
|
"@types/jquery": "^3.3.1",
|
||||||
"@types/lodash": "^4.14.76",
|
"@types/lodash": "^4.14.76",
|
||||||
@ -89,7 +89,7 @@
|
|||||||
"@types/pretty-bytes": "^4.0.0",
|
"@types/pretty-bytes": "^4.0.0",
|
||||||
"@types/prop-types": "^15.5.2",
|
"@types/prop-types": "^15.5.2",
|
||||||
"@types/qs": "^6.5.1",
|
"@types/qs": "^6.5.1",
|
||||||
"@types/react": "^16.8.1",
|
"@types/react": "^16.9.35",
|
||||||
"@types/react-addons-update": "^0.14.19",
|
"@types/react-addons-update": "^0.14.19",
|
||||||
"@types/react-color": "^2.13.3",
|
"@types/react-color": "^2.13.3",
|
||||||
"@types/react-cropper": "^0.10.1",
|
"@types/react-cropper": "^0.10.1",
|
||||||
@ -139,7 +139,7 @@
|
|||||||
"react-testing-library": "6.0.4",
|
"react-testing-library": "6.0.4",
|
||||||
"strip-json-comments": "^2.0.1",
|
"strip-json-comments": "^2.0.1",
|
||||||
"ts-jest": "^24.0.0",
|
"ts-jest": "^24.0.0",
|
||||||
"typescript": "^3.9.2"
|
"typescript": "^3.8.3"
|
||||||
},
|
},
|
||||||
"jest": {
|
"jest": {
|
||||||
"testEnvironment": "jsdom",
|
"testEnvironment": "jsdom",
|
||||||
|
@ -11,7 +11,7 @@ rm -rf lib/node_modules
|
|||||||
rm -rf sdk && fis3 release publish-sdk -c
|
rm -rf sdk && fis3 release publish-sdk -c
|
||||||
|
|
||||||
# 生成 .d.ts 文件
|
# 生成 .d.ts 文件
|
||||||
tsc --allowJs --declaration
|
./node_modules/.bin/tsc --allowJs --declaration
|
||||||
|
|
||||||
cd output
|
cd output
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ export class AssociatedCheckboxes extends Checkboxes<
|
|||||||
const selectdOption = ListRadios.resolveSelected(
|
const selectdOption = ListRadios.resolveSelected(
|
||||||
leftValue,
|
leftValue,
|
||||||
options,
|
options,
|
||||||
option => option.ref
|
(option: Option) => option.ref
|
||||||
);
|
);
|
||||||
|
|
||||||
if (selectdOption && onDeferLoad && selectdOption.defer) {
|
if (selectdOption && onDeferLoad && selectdOption.defer) {
|
||||||
@ -80,7 +80,7 @@ export class AssociatedCheckboxes extends Checkboxes<
|
|||||||
const selectdOption = ListRadios.resolveSelected(
|
const selectdOption = ListRadios.resolveSelected(
|
||||||
value,
|
value,
|
||||||
options,
|
options,
|
||||||
option => option.ref
|
(option: Option) => option.ref
|
||||||
);
|
);
|
||||||
|
|
||||||
if (selectdOption && onDeferLoad && selectdOption.defer) {
|
if (selectdOption && onDeferLoad && selectdOption.defer) {
|
||||||
@ -111,7 +111,7 @@ export class AssociatedCheckboxes extends Checkboxes<
|
|||||||
const selectdOption = ListRadios.resolveSelected(
|
const selectdOption = ListRadios.resolveSelected(
|
||||||
this.state.leftValue,
|
this.state.leftValue,
|
||||||
options,
|
options,
|
||||||
option => option.ref
|
(option: Option) => option.ref
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -24,7 +24,7 @@ export interface ListRadiosProps extends ThemeProps {
|
|||||||
|
|
||||||
export class ListRadios<
|
export class ListRadios<
|
||||||
T extends ListRadiosProps = ListRadiosProps,
|
T extends ListRadiosProps = ListRadiosProps,
|
||||||
S = any
|
S = {}
|
||||||
> extends React.Component<T, S> {
|
> extends React.Component<T, S> {
|
||||||
selected: Option | undefined | null;
|
selected: Option | undefined | null;
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ import Spinner from './Spinner';
|
|||||||
import {ListRadiosProps, ListRadios} from './ListRadios';
|
import {ListRadiosProps, ListRadios} from './ListRadios';
|
||||||
|
|
||||||
export interface TreeRadiosProps extends ListRadiosProps {
|
export interface TreeRadiosProps extends ListRadiosProps {
|
||||||
expand?: 'all' | 'first' | 'root' | 'none';
|
expand: 'all' | 'first' | 'root' | 'none';
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface TreeRadiosState {
|
export interface TreeRadiosState {
|
||||||
|
9
types/uncontrollable/index.d.ts
vendored
9
types/uncontrollable/index.d.ts
vendored
@ -1,7 +1,10 @@
|
|||||||
declare module 'uncontrollable' {
|
declare module 'uncontrollable' {
|
||||||
function uncontrollable<T extends React.ComponentType<any>, P extends {
|
function uncontrollable<
|
||||||
[propName:string]: any
|
T extends Raect.ComponentType<any>,
|
||||||
}>(arg:T, config:P):T;
|
P extends {
|
||||||
|
[propName: string]: any;
|
||||||
|
}
|
||||||
|
>(arg: T, config: P): T;
|
||||||
|
|
||||||
export = uncontrollable;
|
export = uncontrollable;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user