Skip to content

Commit

Permalink
[util] fix: better definition of mix, implementationOf and getInterfa…
Browse files Browse the repository at this point in the history
…ce mixin functions
  • Loading branch information
alekitto committed Feb 23, 2024
1 parent d546430 commit 996d4c1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion types/Ulid.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
declare namespace Jymfony.Component.Uid {
import AbstractUid = Jymfony.Component.Uid.AbstractUid;
import UidInterface = Jymfony.Contracts.Uid.UidInterface;

/**
* A ULID is lexicographically sortable and contains a 48-bit timestamp and 80-bit of crypto-random entropy.
Expand All @@ -20,7 +21,7 @@ declare namespace Jymfony.Component.Uid {
/**
* @inheritdoc
*/
static fromString(ulid: string): Ulid;
static fromString<T extends UidInterface>(uid: string): T extends Ulid ? T : never;

toBuffer(): Buffer;
toBase32(): string;
Expand Down

0 comments on commit 996d4c1

Please sign in to comment.