Skip to content

Commit

Permalink
chore: remove __EXAMPLE__
Browse files Browse the repository at this point in the history
  • Loading branch information
SegaraRai committed Jan 13, 2025
1 parent 93c538b commit 082ff42
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
5 changes: 5 additions & 0 deletions .changeset/little-suns-flash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"fraci": minor
---

Remove **EXAMPLE** type only hint.
14 changes: 0 additions & 14 deletions src/factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,10 @@ import { createDigitBaseMap, createIntegerLengthBaseMap } from "./lib/utils.js";
export const DEFAULT_MAX_LENGTH = 50;
export const DEFAULT_MAX_RETRIES = 5;

/**
* Fractional index pattern for demonstration.
*/
type IndexPattern<D extends string, L extends string> = `${L}${D}...`;

/**
* A helper type to convert a string to a union of characters.
*/
type StringToUnion<T extends string> = T extends `${infer First}${infer Rest}`
? First | StringToUnion<Rest>
: never;

/**
* Fractional indexing utility.
*/
export interface Fraci<D extends string, L extends string, X> {
readonly __EXAMPLE__?: IndexPattern<StringToUnion<D>, StringToUnion<L>>;

readonly digitBase: D;
readonly lengthBase: L;
generateKeyBetween(
Expand Down

0 comments on commit 082ff42

Please sign in to comment.