Skip to content

Commit 249d538

Browse files
authored
fix(core): restrict ConstraintFunction type parameter to string
1 parent a02c486 commit 249d538

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/core/src/types/constraint.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* @template T - The union type of allowed string values. Just a marker type to help with inference.
55
*/
66
// eslint-disable-next-line unused-imports/no-unused-vars
7-
export interface ConstraintFunction<T = string> {
7+
export interface ConstraintFunction<T extends string = string> {
88
(value: string): void;
99
display?: string;
1010
}

0 commit comments

Comments
 (0)