• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/// A [codepoint] is a Unicode code point, such as `a`, or `��`.
2///
3/// The recommended way to obtain a `codepoint` is to create it from a
4/// `String`, which is conceptually a list of `codepoint`s. For example,
5/// `'a'.codePointAt(0)` is equal to the `char` `a`.
6///
7/// JS does not have a character/codepoint literal, so integer literals
8/// need to be used. For example the Unicode code point U+1F4A1, `��`,
9/// can be represented by `0x1F4A1`. Note that only values in the ranges
10/// `0x0..0xD7FF` and `0xE000..0x10FFFF` (both inclusive) are Unicode
11/// code points, and hence valid `codepoint`s.
12///
13/// A `String` can be constructed from a `codepoint` using `String.fromCodePoint()`.
14export type codepoint = number;
15export type pointer = number;