Feature Request
Type Expectation
There is no dedicated test file for src/types/ExpandGlob.ts. Currently it is only verified indirectly through DeepStrictPick's glob tests, so dedicated tests are needed to directly verify ExpandGlob's edge cases.
Example Type
import { ExpandGlob, Equal } from '../../src';
// Basic: top-level glob
type Q1 = ExpandGlob<{ a: 1; b: 2; c: 3 }, "*">;
type A1 = Equal<Q1, "a" | "b" | "c">;
// Nested glob
type Q2 = ExpandGlob<{ a: { b: 1; c: 2 } }, "a.*">;
type A2 = Equal<Q2, "a.b" | "a.c">;
// Array inner glob
type Q3 = ExpandGlob<{ items: { id: number; name: string }[] }, "items[*].*">;
type A3 = Equal<Q3, "items[*].id" | "items[*].name">;
// Non-glob passthrough
type Q4 = ExpandGlob<{ a: { b: 1 } }, "a.b">;
type A4 = Equal<Q4, "a.b">;
Proposed Solution
Create a new test/features/ExpandGlob.ts file to test the following scenarios.
Test Requirements
All changes must include the following tests:
-
Backward Compatibility
- All existing tests must pass
- Add tests to verify that existing type behavior remains unchanged
-
Feature Verification
* (top-level glob)
a.* (nested glob)
a[*].* (array inner glob)
- Non-glob regular key passthrough
- Mixed glob + regular key (when passed as union)
-
Complex Type Stability
- 3+ levels of nested glob (
a.b.*)
- Array within array glob (
items[*].sub[*].*)
- Glob applied to empty object
- Glob on objects with branded type properties
- Glob applied to tuple elements (
[{ a: 1 }, { b: 2 }])
- Glob applied to readonly arrays
How to verify:
npm run build:test && npm run test
npm run prettier
Feature Request
Type Expectation
There is no dedicated test file for
src/types/ExpandGlob.ts. Currently it is only verified indirectly throughDeepStrictPick's glob tests, so dedicated tests are needed to directly verifyExpandGlob's edge cases.Example Type
Proposed Solution
Create a new
test/features/ExpandGlob.tsfile to test the following scenarios.Test Requirements
All changes must include the following tests:
Backward Compatibility
Feature Verification
*(top-level glob)a.*(nested glob)a[*].*(array inner glob)Complex Type Stability
a.b.*)items[*].sub[*].*)[{ a: 1 }, { b: 2 }])How to verify: