Skip to content

Commit

Permalink
Meta tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Apr 29, 2024
1 parent ef7b580 commit 4a40404
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ updates:
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'weekly'
interval: 'monthly'
versioning-strategy: 'increase-if-necessary'
groups:
development-dependencies:
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@
"generics"
],
"devDependencies": {
"expect-type": "^0.15.0",
"expect-type": "^0.19.0",
"npm-run-all2": "^6.1.2",
"tsd": "^0.31.0",
"typescript": "~5.4.3",
"typescript": "~5.4.5",
"xo": "^0.58.0"
},
"xo": {
Expand Down
3 changes: 2 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,8 @@ type ShouldBeNever = IfAny<'not any', 'not never', 'never'>;
- `RequireOnlyOne` - See [`RequireExactlyOne`](source/require-exactly-one.d.ts)
- `AtMostOne` - See [`RequireOneOrNone`](source/require-one-or-none.d.ts)
- `AllKeys` - See [`KeysOfUnion`](source/keys-of-union.d.ts)
- `Branded`, `Opaque` - See [`Tagged`](source/opaque.d.ts)
- `Branded` - See [`Tagged`](source/opaque.d.ts)
- `Opaque` - See [`Tagged`](source/opaque.d.ts)

## Tips

Expand Down
6 changes: 6 additions & 0 deletions test-d/required-deep.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ type FooRequired = {
type FooBar = Exclude<Foo['bar'], undefined>;
type FooRequiredBar = FooRequired['bar'];

// TODO: Fix this case: https://github.com/mmkal/expect-type/issues/34
// @ts-expect-error
expectTypeOf<RequiredDeep<Foo>>().toEqualTypeOf<FooRequired>();
expectTypeOf<RequiredDeep<FooBar['function']>>().toEqualTypeOf<FooRequiredBar['function']>();
expectTypeOf<RequiredDeep<FooBar['functionFixedArity']>>().toEqualTypeOf<FooRequiredBar['functionFixedArity']>();
Expand All @@ -107,7 +109,11 @@ expectTypeOf<RequiredDeep<FooBar['readonlyTuple']>>().toEqualTypeOf<FooRequiredB
expectTypeOf<RequiredDeep<FooBar['weakMap']>>().toEqualTypeOf<FooRequiredBar['weakMap']>();
expectTypeOf<RequiredDeep<FooBar['weakSet']>>().toEqualTypeOf<FooRequiredBar['weakSet']>();
expectTypeOf<RequiredDeep<FooBar['promise']>>().toEqualTypeOf<FooRequiredBar['promise']>();

// TODO: Fix this case: https://github.com/mmkal/expect-type/issues/34
// @ts-expect-error
expectTypeOf<RequiredDeep<FooBar['namespace']>>().toEqualTypeOf<FooRequiredBar['namespace']>();

expectTypeOf<RequiredDeep<FooBar['undefined']>>().toBeNever();
expectTypeOf<RequiredDeep<FooBar['null']>>().toEqualTypeOf<FooRequiredBar['null']>();

Expand Down

0 comments on commit 4a40404

Please sign in to comment.