Peek shows what a value is. TypeScript shows what it should be.
In TypeScript, the editor knows your types.
Pick TypeScript for a Snippet, with no tsconfig and no build step. The editor checks it as you type, and the code still runs.
Types on hover, mistakes underlined
Hover a name or a call to see its type. A type error is underlined as you type, and by default the code still runs, so you see what it does.
- Argument of type 'string' is not assignable to parameter of type 'number'.
Or hold the Run
Turn on “Don’t run with type errors”, and a TypeScript Snippet with an error shows the error instead of running.
JavaScript or TypeScript, per Snippet
Each Snippet has its own Language. A type in JavaScript is an error until you pick TypeScript.
- Type aliases can only be used in TypeScript files.
Completions
Names that fit appear as you type, with each one’s type and notes beside it, in JavaScript and TypeScript.
- repeat
- replace
- replaceAll
Format Code
One key formats the code on screen with Prettier, built in, so it works offline.
Vim keys
Switch the editor to Vim’s modes and motions. ⌘↵ and every other shortcut still work.
Your format style JSpark+
Choose Prettier’s options or use a .prettierrc, format each time you press Run, and get Tailwind class suggestions as you type.
Code colors
Font
Fira Code and JetBrains Mono come with the app. Other monospace fonts appear here once installed.
Off: a long line runs on and the editor scrolls sideways. On: it continues on the next row.
A faint square grid behind the code, one square per line, like squared paper.
Modes, motions and operators, with the mode shown in the bar along the bottom. ⌘↵ and the app’s other shortcuts work in every mode.
Show a list of names as you type. Off, press ⌃Space to ask for it.
Rest the pointer on a name to see its type. Values in the Timeline always show.
Format style
On: (x) => x. Off: x => x.
A .prettierrc in the Working Folder wins over these.
Tidy the code when you press Run or open the Timeline. Never while Auto-run runs as you type.
Good to know
- No tsconfig, no build step
- TypeScript is checked in the app and compiled with esbuild.
- Offline
- The editor, its types and Prettier are inside the app.
- New Snippets start in JavaScript
- Change it in Settings → Running → Language for new Snippets.
- Vue and Svelte, typed
- A Vue or Svelte Snippet is one component file. With lang="ts", it is type-checked too.
Read about JavaScript and TypeScript Read the editor docs All features
Next time a type puzzles you, hover it.
Not a trial: it doesn’t expire.
Windows: coming later