mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-18 12:08:59 +08:00
fix for wrong method signature in params of WindowScroller render-prop (#24953)
* typings update to catch up with current version of react-virtualized * fixed lint errors * fixed ts version * fixed void return type of defaultProps functions * changed interface to type for better consistency * fixed signature of onChildScroll params in WindowScroller * Auto stash before merge of "enable-strict-mode" and "master" * removed unimportant line from test file * replaced strict with explicit options * updated TS version * ts version set to 2.7 * back to ts 2.6 * changed autogenerated relative import to global import
This commit is contained in:
committed by
Mohamed Hegazy
parent
3a647d4f0e
commit
4ac43f6061
@@ -29,15 +29,15 @@ export class CellMeasurerCache implements CellMeasurerCacheInterface {
|
||||
constructor(params?: CellMeasurerCacheParams);
|
||||
clear(rowIndex: number, columnIndex: number): void;
|
||||
clearAll(): void;
|
||||
columnWidth: (params: { index: number }) => number | undefined;
|
||||
columnWidth: (params: { index: number }) => number;
|
||||
readonly defaultHeight: number;
|
||||
readonly defaultWidth: number;
|
||||
hasFixedHeight(): boolean;
|
||||
hasFixedWidth(): boolean;
|
||||
getHeight(rowIndex: number, columnIndex: number): number | undefined;
|
||||
getWidth(rowIndex: number, columnIndex: number): number | undefined;
|
||||
getHeight(rowIndex: number, columnIndex: number): number;
|
||||
getWidth(rowIndex: number, columnIndex: number): number;
|
||||
has(rowIndex: number, columnIndex: number): boolean;
|
||||
rowHeight: (params: { index: number }) => number | undefined;
|
||||
rowHeight: (params: { index: number }) => number;
|
||||
set(
|
||||
rowIndex: number,
|
||||
columnIndex: number,
|
||||
|
||||
@@ -29,8 +29,9 @@ export type CollectionCellGroupRenderer = (
|
||||
) => React.ReactNode[];
|
||||
export type CollectionCellRendererParams = {
|
||||
index: number;
|
||||
key: string;
|
||||
style?: React.CSSProperties;
|
||||
isScrolling: boolean;
|
||||
key: number;
|
||||
style: React.CSSProperties;
|
||||
};
|
||||
export type CollectionCellRenderer = (
|
||||
params: CollectionCellRendererParams
|
||||
|
||||
7
types/react-virtualized/dist/es/Grid.d.ts
vendored
7
types/react-virtualized/dist/es/Grid.d.ts
vendored
@@ -54,12 +54,7 @@ export type ScrollParams = {
|
||||
scrollTop: number;
|
||||
scrollWidth: number;
|
||||
};
|
||||
export type SectionRenderedParams = {
|
||||
columnStartIndex: number;
|
||||
columnStopIndex: number;
|
||||
rowStartIndex: number;
|
||||
rowStopIndex: number;
|
||||
};
|
||||
export type SectionRenderedParams = RenderedSection;
|
||||
export type SCROLL_DIRECTION_HORIZONTAL = "horizontal";
|
||||
export type SCROLL_DIRECTION_VERTICAL = "vertical";
|
||||
export type OverscanIndicesGetterParams = {
|
||||
|
||||
6
types/react-virtualized/dist/es/Table.d.ts
vendored
6
types/react-virtualized/dist/es/Table.d.ts
vendored
@@ -208,9 +208,7 @@ export type TableProps = GridCoreProps & {
|
||||
*/
|
||||
autoHeight?: boolean;
|
||||
/** One or more Columns describing the data displayed in this row */
|
||||
children?:
|
||||
| React.ReactElement<ColumnProps>[]
|
||||
| React.ReactElement<ColumnProps>;
|
||||
children?: React.ReactNode;
|
||||
/** Optional CSS class name */
|
||||
className?: string;
|
||||
/** Disable rendering the header at all */
|
||||
@@ -372,7 +370,7 @@ export const SortDirection: SortDirectionStatic;
|
||||
export type SortDirectionType = "ASC" | "DESC";
|
||||
|
||||
export const SortIndicator: React.StatelessComponent<{
|
||||
sortDirection: SortDirectionType;
|
||||
sortDirection?: SortDirectionType;
|
||||
}>;
|
||||
|
||||
/**
|
||||
|
||||
@@ -22,7 +22,7 @@ export type WindowScrollerProps = {
|
||||
*/
|
||||
children: (
|
||||
params: {
|
||||
onChildScroll: ({ scrollTop: number }) => void;
|
||||
onChildScroll: (params: { scrollTop: number }) => void;
|
||||
registerChild: (params?: Element) => void;
|
||||
height: number;
|
||||
isScrolling: boolean;
|
||||
|
||||
3
types/react-virtualized/index.d.ts
vendored
3
types/react-virtualized/index.d.ts
vendored
@@ -118,7 +118,8 @@ export {
|
||||
TableHeaderRowRenderer,
|
||||
TableProps,
|
||||
TableRowProps,
|
||||
TableRowRenderer
|
||||
TableRowRenderer,
|
||||
SortParams
|
||||
} from "./dist/es/Table";
|
||||
export {
|
||||
WindowScroller,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,13 +2,13 @@
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": ["es6", "dom"],
|
||||
"noImplicitAny": false,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": false,
|
||||
"strictFunctionTypes": false,
|
||||
"jsx": "react",
|
||||
"baseUrl": "../",
|
||||
"typeRoots": ["../"],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
|
||||
Reference in New Issue
Block a user