diff --git a/codes/typescript/module/ListNode.ts b/codes/typescript/module/ListNode.ts index a5e30340..ef7da663 100644 --- a/codes/typescript/module/ListNode.ts +++ b/codes/typescript/module/ListNode.ts @@ -20,7 +20,7 @@ export default class ListNode { * @param arr * @return */ - arrToLinkedList(arr: number[]) { + arrToLinkedList(arr: number[]): ListNode | null { const dum: ListNode = new ListNode(0); let head = dum; for (const val of arr) {