Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dist/types.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { CSSProperties, ForwardRefExoticComponent, ReactHTML, RefAttributes } from "react";
import Sortable, { MoveEvent, Options, SortableEvent } from "sortablejs";
import { ReactSortable } from "./react-sortable";
import { Omit } from './util';
export interface ItemInterface {
/** The unique id associated with your item. It's recommended this is the same as the key prop for your list item. */
id: string | number;
Expand Down
2 changes: 1 addition & 1 deletion dist/types.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions dist/util.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,9 @@ export interface Normalized<T> extends Input {
* @param props `ReactSortable.Props`
*/
export declare function destructurePropsForOptions<T>(props: PropsWithChildren<ReactSortableProps<T>>): Exclude<Options, AllMethodNames>;
/**
* Construct a type with the properties of T except for those in type K.
* Including this allows for backwards compatibility with earlier versions of TS.
*/
export declare type Omit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>;
//# sourceMappingURL=util.d.ts.map
2 changes: 1 addition & 1 deletion dist/util.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"email": "waynevanson@gmail.com"
},
"license": "MIT",
"version": "2.0.10",
"version": "2.0.11",
"private": false,
"main": "dist/index.js",
"module": "dist/index.es.js",
Expand Down
1 change: 1 addition & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
} from "react";
import Sortable, { MoveEvent, Options, SortableEvent } from "sortablejs";
import { ReactSortable } from "./react-sortable";
import { Omit } from './util';

// @todo: remove dynamic types and create declarative types instead for readability of user.
// add these in docs as well
Expand Down
6 changes: 6 additions & 0 deletions src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,3 +187,9 @@ export function destructurePropsForOptions<T>(
} = props;
return options;
}

/**
* Construct a type with the properties of T except for those in type K.
* Including this allows for backwards compatibility with earlier versions of TS.
*/
export type Omit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>;