(count: number)
| 16 | } |
| 17 | |
| 18 | function createMockPosts(count: number): Array<Post> { |
| 19 | const posts: Array<Post> = [] |
| 20 | for (let i = 1; i <= count; i++) { |
| 21 | posts.push({ |
| 22 | id: `${i}`, |
| 23 | title: `Post ${i}`, |
| 24 | content: `Content ${i}`, |
| 25 | createdAt: 1000000 - i * 1000, // Descending order |
| 26 | category: i % 2 === 0 ? `tech` : `life`, |
| 27 | }) |
| 28 | } |
| 29 | return posts |
| 30 | } |
| 31 | |
| 32 | type OnDemandCollectionOptions = { |
| 33 | id: string |
no outgoing calls
no test coverage detected
searching dependent graphs…