strict ts + fixes
This commit is contained in:
parent
1b406899e0
commit
d45207342c
9 changed files with 15 additions and 12 deletions
|
|
@ -5,7 +5,7 @@ export type CodePointIndex = number; // index into array of code-points
|
|||
export type CodePoint = number; // could also name it `UnicodeCodePoint`. Basically for `s: string` we have `s.codePointAt(i: index): char`.
|
||||
|
||||
export function char(c: string): CodePoint {
|
||||
return c.codePointAt(0)
|
||||
return c.codePointAt(0) as CodePoint;
|
||||
}
|
||||
|
||||
export type CodePointRef = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue