Skip to content

Commit

Permalink
add TypeScript types
Browse files Browse the repository at this point in the history
  • Loading branch information
bengry committed Oct 8, 2021
1 parent e81a31c commit 2687bd0
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dist/commonjs/index.d.ts
@@ -0,0 +1,3 @@
import multiavatar from "../esm";

export = multiavatar;
34 changes: 34 additions & 0 deletions dist/esm/index.d.ts
@@ -0,0 +1,34 @@
interface AvatarVersion {
part?:
| "00"
| "01"
| "02"
| "03"
| "04"
| "05"
| "06"
| "07"
| "08"
| "09"
| "10"
| "11"
| "12"
| "13"
| "14"
| "15";
theme?: "A" | "B" | "C";
}

/**
*
* @param string The text string that will be converted into the avatar.
* @param sansEnv If this is true, the script returns the final avatar without the circle background (environment part)
* @param ver An optional object to force a specific initial version
*/
declare function multiavatar(
string: string,
sansEnv?: boolean,
ver?: AvatarVersion
): string;

export default multiavatar;

0 comments on commit 2687bd0

Please sign in to comment.