Skip to content

Commit 928b19e

Browse files
committed
feat(head): delete deprecated function
BREAKING CHANGE: The deprecated function `head` has been deleted. Use `first` instead.
1 parent 110ae6a commit 928b19e

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

index.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,6 @@ export function first<T>(array: ArrayLike<T>): T | null {
6767
return array.length === 0 ? null : (array[0] as T);
6868
}
6969

70-
/** @deprecated Use {@link first} instead. */
71-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
72-
// @ts-ignore duplicate identifier: This is the exported declaration, the implementation is below.
73-
export function head<T>(array: ArrayLike<T>): T | null;
74-
75-
/** @internal This implementation is for internal use only, the exported declaration is above */
76-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
77-
// @ts-ignore duplicate identifier: This is the actual implementation, the exported declaration is above.
78-
export const head = first;
79-
8070
export function tail<T>(array: ArrayLike<T>): T[] {
8171
return nativeSlice.call(array, 1) as T[];
8272
}

0 commit comments

Comments
 (0)