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
//@ts-check | |
const Component = ({ names }: { names: [string] }) => ( | |
<p>{names[0]}</p> | |
) | |
export default function App() { | |
return <div>Hello world</div> | |
} |
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 { Suspense } from "react"; | |
type CacheItem<T> = { | |
keys: any[] | |
promise: Promise<T> | |
error?: unknown | |
response?: T | |
} | |
const cache: CacheItem<any>[] = [] |
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 ACTIVATIONS = [ | |
/*'identity': */x => x, | |
/*'abs': */ x => Math.abs(x), | |
/*'clamped': */ x => Math.min(1, Math.max(-1, x)), | |
/*'cube': */ x => Math.pow(x, 3), | |
/*'exp': */ x => Math.exp(x), | |
/*'gauss': */ x => x, | |
/*'hat': */ x => Math.max(0, x < 0 ? 1 + x : 1 - x), | |
/*'inv': */ x => 1 / x, | |
/*'log': */ x => Math.log(x), |
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 { useEffect, useRef, useState } from 'react' | |
import parse from './ast.js' | |
import { mapCaretToAST } from './mapInputToAST.js' | |
import AstParser from './AstClass.js' | |
import { | |
constPlugin, | |
groupPlugin, | |
numberPlugin, | |
stringPlugin, | |
leftUnaryOperatorsPlugin, |
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
{ | |
"scripts": [], | |
"styles": [] | |
} |
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
{ | |
"scripts": [], | |
"styles": [] | |
} |
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
{ | |
"scripts": [], | |
"styles": [] | |
} |
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
{ | |
"scripts": [], | |
"styles": [], | |
"themePreview": false | |
} |
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
{ | |
"scripts": [], | |
"styles": [] | |
} |
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
{ | |
"scripts": [], | |
"styles": [] | |
} |
NewerOlder