Here is how you can implement chunk function in TypeScript:

```ts
export function chunk<T>(items: readonly T[], size: number): T[][] {
    if (size <= 0) throw new Error('Size must be a positive integer');
    const result = [];
    for(let i=0 ; i< items.length;i+=size){
        result.push(items.slice(i,i+size))
    }
  return result;
}
```