モジュール
ESMインポート
Section titled “ESMインポート”import express from ///express///import [useState, useEffect] from ///react///import React, [Component] from ///react///import all as fs from ///fs///Use(ドットパスインポート)
Section titled “Use(ドットパスインポート)”use std.mathfrom std.math use sin, cosimport * as math from "std/math";import { sin, cos } from "std/math";エクスポート
Section titled “エクスポート”pub fn helper to 42pub const VERSION be ///1.0///export default fn main console.log[///hi///]モジュール名前空間
Section titled “モジュール名前空間”namespace utils fn helper to 42const utils = (() => { function helper() { return 42; }})();CommonJS
Section titled “CommonJS”const fs be require[///fs///]const fs = require("fs");