diff --git a/components/affix/index.tsx b/components/affix/index.tsx index 4093080455..1bd409d4f9 100644 --- a/components/affix/index.tsx +++ b/components/affix/index.tsx @@ -60,7 +60,8 @@ export default class Affix extends React.Component { scrollEvent: any; resizeEvent: any; refs: { - fixedNode: any; + [key: string]: any; + fixedNode: HTMLElement; }; constructor(props) { diff --git a/custom-typings.d.ts b/custom-typings.d.ts new file mode 100644 index 0000000000..b6be73e9af --- /dev/null +++ b/custom-typings.d.ts @@ -0,0 +1,35 @@ +declare module 'classnames' { + export default function({}): string; +} + +declare module 'gregorian-calendar' { + export default function({}): string; +} + +declare module "object-assign" { + export default function(target: any, ...sources: any[]): any; +} + +declare module "object.omit" { + export default function(target: any, ...sources: any[]): any; +} + +declare module 'rc-animate' { + export default function(): any; +} + +declare module 'rc-util/lib/Dom/addEventListener' { + export default function(domNode: any, event: string, handler: Function): any; +} + +declare module 'shallowequal' { + export default function(source: any, target: any): boolean; +} + +declare module 'warning' { + export default function(condition: boolean, message: string): void; +} + +declare module 'css-animation' { + export default function(...any): any; +} diff --git a/custom-typings/classnames.d.ts b/custom-typings/classnames.d.ts deleted file mode 100644 index beb6a1e884..0000000000 --- a/custom-typings/classnames.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare module 'classnames' { - export default function({}): string; -} diff --git a/custom-typings/object-assign.d.ts b/custom-typings/object-assign.d.ts deleted file mode 100644 index 78bf2ee639..0000000000 --- a/custom-typings/object-assign.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare module "object-assign" { - export default function(target: any, ...sources: any[]): any; -} diff --git a/custom-typings/object.omit.d.ts b/custom-typings/object.omit.d.ts deleted file mode 100644 index 5869d4d347..0000000000 --- a/custom-typings/object.omit.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare module "object.omit" { - export default function(target: any, ...sources: any[]): any; -} diff --git a/custom-typings/rc-animate.d.ts b/custom-typings/rc-animate.d.ts deleted file mode 100644 index 93fee3a33b..0000000000 --- a/custom-typings/rc-animate.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare module 'rc-animate' { - export default function(): any; -} diff --git a/custom-typings/rc-util.d.ts b/custom-typings/rc-util.d.ts deleted file mode 100644 index 99ec189342..0000000000 --- a/custom-typings/rc-util.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare module 'rc-util/lib/Dom/addEventListener' { - export default function(domNode: any, event: string, handler: Function): any; -} diff --git a/custom-typings/shallowequal.d.ts b/custom-typings/shallowequal.d.ts deleted file mode 100644 index caecb5b31f..0000000000 --- a/custom-typings/shallowequal.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare module 'shallowequal' { - export default function(source: any, target: any): boolean; -} diff --git a/custom-typings/warning.d.ts b/custom-typings/warning.d.ts deleted file mode 100644 index 19714209e7..0000000000 --- a/custom-typings/warning.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare module 'warning' { - export default function(condition: boolean, message: string): void; -}