Open martin-henz opened 3 years ago
Is 'sicp' a module here? If yes then we can write something like import {xxx} from '../sicp/index.ts';
Has this been adequately addressed by #192?
Has this been adequately addressed by #192?
I think yes. But is this documented anywhere?
I am unsure if this has since been documented somewhere, but developers should now be able to see how to use real js-slang types and functions by referring to existing modules which have since adopted the new technology.
import {
head,
list,
tail,
type List,
is_list,
} from 'js-slang/dist/stdlib/list';
It is worth noting that if a file uses js-slang functions (excluding types - types appear to be ok), then that file must not be imported by any tab, or building will fail. This may or may not get addressed down the line, removed as a limitation via updates to the build system. Longer explanation:
Feature
How can I use Source functions in the implementation of a module?
Maybe
import { array_length } from "sicp";
Checklist