Skip to content
Open
Changes from 1 commit
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
9cda493
feat: init `Filter` type
benzaria Jun 10, 2025
a56ed2c
feat: add extra tests, refactor type for readability, add extra condi…
benzaria Jun 10, 2025
c100e9c
Merge branch 'sindresorhus:main' into Filter
benzaria Jun 10, 2025
80404b5
refactor: improve JSDoc links and clean up test cases for ArrayFilter
benzaria Jun 10, 2025
20dffe3
Merge branch 'origin/Filter' into Filter
benzaria Jun 10, 2025
640cb4f
feat: fix `IsLeadingRestElement` & add `IsTrailingRestElement`
benzaria Jun 10, 2025
26e2b0c
Remake the `ArrayFilter` type and cleanup unused types
benzaria Jun 20, 2025
416d35a
fix: test errors
benzaria Jun 20, 2025
d10b19e
Merge branch 'main' into Filter
benzaria Jun 20, 2025
d4b89c2
Merge branch 'main' into Filter
benzaria Jun 20, 2025
c00320b
reverte: changes on `IsUnion`
benzaria Jun 24, 2025
691b9a1
feat: add `strict` option to `Filter`
benzaria Jun 24, 2025
d4fb6ae
improve: added types for `Filter`
benzaria Jun 24, 2025
f32aed0
test: fix test errors
benzaria Jun 24, 2025
67ae5b8
improve: `ObjectFilter`
benzaria Jun 24, 2025
8b13bea
Update array.d.ts
sindresorhus Aug 24, 2025
3d2baa7
Update filter.d.ts
sindresorhus Aug 24, 2025
d8e2a57
Merge remote-tracking branch 'upstream/main' into Filter
benzaria Sep 23, 2025
2eb53d0
Merge branch 'origin/Filter' into Filter
benzaria Sep 23, 2025
97969ae
feat: improve `Filter` type, test and docs, add test and docs for `Ob…
benzaria Sep 23, 2025
022e082
doc: add examples for `strict` option
benzaria Sep 23, 2025
6498c01
Merge branch 'main' into Filter
benzaria Sep 27, 2025
c24f3a7
add `export {}` to `Filter`
benzaria Sep 27, 2025
af04729
add `export {}` to `ObjectFilter`
benzaria Sep 27, 2025
ed8646f
fix: export errors
benzaria Sep 27, 2025
5dcaa2b
refactor: `ObjectFIlter` test
benzaria Sep 27, 2025
2502eef
Update readme.md
sindresorhus Oct 10, 2025
9c29c46
Update filter.d.ts
sindresorhus Oct 10, 2025
92aba18
Update type.d.ts
sindresorhus Oct 10, 2025
b88b1e1
Update object-filter.d.ts
sindresorhus Oct 10, 2025
29eb5e5
`Filter`: add preserve readonly modifier, fix JsDoc example, add some…
benzaria Oct 10, 2025
7b2cd09
`FilterObject`: rename type, some refactoring
benzaria Oct 10, 2025
9cb21a0
minor changes
benzaria Oct 10, 2025
3c606dd
Merge branch 'origin/Filter' into Filter
benzaria Oct 10, 2025
a89d8bd
fix `CleanEmpty` error
benzaria Oct 10, 2025
b2dc2be
Merge branch 'main' into Filter
benzaria Oct 17, 2025
9984532
feat: merge `FilterObject` to `Filter`
benzaria Oct 19, 2025
58654b0
docs: fix JsDoc examples
benzaria Oct 21, 2025
10477ba
Update filter.d.ts
sindresorhus Oct 24, 2025
11a0b22
Fix grammar in FilterObject and FilterArray comments
sindresorhus Oct 24, 2025
2f5541f
Update array.d.ts
sindresorhus Oct 24, 2025
6a9b4b7
Update filter.d.ts
sindresorhus Oct 24, 2025
bd1a9bb
Fix duplicate lines in Extends type documentation
sindresorhus Oct 24, 2025
3a4b48b
Update type.d.ts
sindresorhus Oct 24, 2025
9d80cf1
minor comments change
benzaria Oct 24, 2025
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
Prev Previous commit
Next Next commit
Update filter.d.ts
  • Loading branch information
sindresorhus authored Oct 10, 2025
commit 9c29c4654b98ac6307e7a99032dd8f2e47f06741
4 changes: 2 additions & 2 deletions source/filter.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ export type FilterOptions = {
type T2 = Filter<[1, 2, 3 | 4, 3?, 4?], 3, {strict: true}>;
//=> [3?]

type T3 = Filter<{a: 1; b: 2; c: 3 | 4; d: 3?; e: 4?}; 3>;
type T3 = Filter<{a: 1; b: 2; c: 3 | 4; d: 3?; e: 4?}, 3>;
//=> {c: 3 | 4; d: 3?}

type T4 = Filter<{a: 1; b: 2; c: 3 | 4; d: 3?; e: 4?}; 3, {strict: true}>;
type T4 = Filter<{a: 1; b: 2; c: 3 | 4; d: 3?; e: 4?}, 3, {strict: true}>;
//=> {c: 3?}
```
*/
Expand Down