Skip to content

Commit

Permalink
Removed array-key constraint from ArrayType
Browse files Browse the repository at this point in the history
  • Loading branch information
vudaltsov committed Feb 23, 2024
1 parent f4f906f commit 8b44d36
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/ArrayType.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/**
* @internal
* @psalm-internal Typhoon\Type
* @template-covariant TKey of array-key
* @template-covariant TKey
* @template-covariant TValue
* @implements Type<array<TKey, TValue>>
*/
Expand Down
2 changes: 1 addition & 1 deletion src/TypeVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function alias(Type $type, string $class, string $name): mixed;
public function anyLiteral(Type $type, Type $innerType): mixed;

/**
* @template TKey of array-key
* @template TKey
* @template TValue
* @param Type<array<TKey, TValue>> $type
* @param Type<TKey> $keyType
Expand Down
4 changes: 2 additions & 2 deletions src/types.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public static function arg(string $name): Argument
}

/**
* @template TKey of array-key
* @template TKey
* @template TValue
* @param Type<TKey> $keyType
* @param Type<TValue> $valueType
Expand Down Expand Up @@ -298,7 +298,7 @@ public static function literal(bool|int|float|string $value): Type
}

/**
* @template TKey of array-key
* @template TKey
* @template TValue
* @param Type<TKey> $keyType
* @param Type<TValue> $valueType
Expand Down

0 comments on commit 8b44d36

Please sign in to comment.