This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* `Char` represents a single-byte character. | |
*/ | |
// prettier-ignore | |
export type Char = | |
| "\x00" | "\x01" | "\x02" | "\x03" | "\x04" | "\x05" | "\x06" | "\x07" | |
| "\x08" | "\x09" | "\x0A" | "\x0B" | "\x0C" | "\x0D" | "\x0E" | "\x0F" | |
| "\x10" | "\x11" | "\x12" | "\x13" | "\x14" | "\x15" | "\x16" | "\x17" | |
| "\x18" | "\x19" | "\x1A" | "\x1B" | "\x1C" | "\x1D" | "\x1E" | "\x1F" | |
| "\x20" | "\x21" | "\x22" | "\x23" | "\x24" | "\x25" | "\x26" | "\x27" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type CountTo<N extends number, S extends 0[] = []> = S["length"] extends N | |
? S | |
: CountTo<N, [...S, 0]>; | |
type Inc<N extends number> = [...CountTo<N>, 0]["length"]; | |
type Dec<N extends number> = CountTo<N> extends [infer _H, ...infer T] | |
? T["length"] | |
: 0; | |
type Before< | |
Memory extends number[], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"main": "node_modules/expo/AppEntry.js", | |
"scripts": { | |
"start": "expo start", | |
"android": "expo start --android", | |
"ios": "expo start --ios", | |
"web": "expo start --web", | |
"eject": "expo eject", | |
"lint": "eslint --ext .ts,.tsx . --max-warnings 0", | |
"tsc": "tsc", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Animated, {Easing} from 'react-native-reanimated'; | |
// These are functions that we should ship from redash normally | |
// But we are not able to because the reanimated version supported by | |
// redash has bugs in proc() when used with clocks. | |
const { | |
Clock, | |
Value, | |
block, | |
clockRunning, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Animated, {Easing} from 'react-native-reanimated'; | |
// These are functions that we should ship from redash normally | |
// But we are not able to because the reanimated version supported by | |
// redash has bugs in proc() when used with clocks. | |
const { | |
Clock, | |
Value, | |
block, | |
clockRunning, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { atan2, cos, sin, sqrt } = Math; | |
export interface Point { | |
x: number; | |
y: number; | |
} | |
export interface PolarPoint { | |
alpha: number; | |
radius: number; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useEffect, useState } from "react"; | |
import { Asset } from "expo-asset"; | |
import { AppLoading } from "expo"; | |
export const usePromiseAll = <T extends any>( | |
promises: Promise<T>[], | |
cb: () => void | |
) => | |
useEffect(() => { | |
(async () => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"compilerOptions": { | |
/* Basic Options */ | |
"target": "es2017", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */ | |
// "module": "es2015", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ | |
"lib": ["es6"], /* Specify library files to be included in the compilation. */ | |
// "allowJs": true, /* Allow javascript files to be compiled. */ | |
// "checkJs": true, /* Report errors in .js files. */ | |
"jsx": "react-native", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ | |
// "declaration": true, /* Generates corresponding '.d.ts' file. */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"🏻": { | |
"de": "Hautfarbe", | |
"it": "colore della pelle", | |
"fr": "peau", | |
"es": "piel", | |
"en": "light skin tone", | |
"pt": "modificador de emoji", | |
"zh_Hant": "白皮膚", | |
"ko": "피부 타입 일 다시 이", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require("fs"); | |
const languages = ["de", "it", "fr", "es", "en", "pt", "zh_Hant", "ko", "ja"]; | |
const results = languages.map(lang => { | |
const result = {}; | |
const txt = fs.readFileSync(`./synonyms/cldr-emoji-annotation-synonyms-${lang}.txt`, { encoding: "UTF-8"}); | |
txt.split("\n") | |
.map(line => line.split("=>").map(token => token.trim())) | |
.filter(([emoji, metadata]) => metadata !== undefined) | |
.forEach(([emoji, metadata]) => { |