Skip to content

Instantly share code, notes, and snippets.

@jkao
Last active September 9, 2019 16:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jkao/ce5e0cda2abaa5fba8e4528f0afab4c5 to your computer and use it in GitHub Desktop.
Save jkao/ce5e0cda2abaa5fba8e4528f0afab4c5 to your computer and use it in GitHub Desktop.
Demo-ing TypeScript checks for S2
import s2 = require('@radarlabs/s2');
// an arbitrary point in the East Village in New York City
const cell = s2.CellId.fromToken('89c25977e5d62c4b')
cell.id().charAt(0); // compilation error - bigint doesn't have charAt method
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment