Copy disabled (too large)
Download .txt
Showing preview only (17,181K chars total). Download the full file to get everything.
Repository: AskingQuestions/Shadeup
Branch: main
Commit: 8b25bf92c1aa
Files: 402
Total size: 16.3 MB
Directory structure:
gitextract_91pjwq56/
├── .gitattributes
├── .gitignore
├── .vscode/
│ └── launch.json
├── README.md
├── cli/
│ ├── README.md
│ ├── cli.js
│ ├── compiler-dist/
│ │ ├── compiler.d.ts
│ │ ├── compiler.js
│ │ ├── readme.md
│ │ ├── shadeup-compiler.js
│ │ └── tree-sitter-shadeup.wasm
│ ├── electron/
│ │ ├── index.html
│ │ └── main.js
│ ├── index.js
│ ├── package.json
│ ├── test/
│ │ ├── main.d.ts
│ │ ├── main.js
│ │ ├── other.js
│ │ ├── other.shadeup
│ │ └── vite-project/
│ │ ├── .gitignore
│ │ ├── index.html
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── index.ts
│ │ │ ├── logoPath.shadeup
│ │ │ ├── main.d.ts
│ │ │ ├── main.js
│ │ │ ├── main.shadeup
│ │ │ ├── style.css
│ │ │ └── vite-env.d.ts
│ │ └── tsconfig.json
│ └── vite/
│ ├── .gitignore
│ ├── index.html
│ ├── main.js
│ ├── package.json
│ ├── runner.d.ts
│ ├── runner.js
│ ├── style.css
│ └── vite.config.js
├── extension/
│ └── vscode/
│ └── shadeup/
│ ├── .vscodeignore
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── Shadeup-tmLanguage.json
│ ├── client/
│ │ ├── package.json
│ │ ├── src/
│ │ │ └── extension.ts
│ │ ├── testFixture/
│ │ │ ├── completion.txt
│ │ │ └── diagnostics.txt
│ │ └── tsconfig.json
│ ├── lang.ts
│ ├── language-configuration.json
│ ├── package.json
│ ├── server/
│ │ ├── compiler-dist/
│ │ │ ├── compiler.d.ts
│ │ │ ├── compiler.js
│ │ │ ├── readme.md
│ │ │ ├── shadeup-compiler.umd.cjs
│ │ │ └── tree-sitter-shadeup.wasm
│ │ ├── package.json
│ │ ├── src/
│ │ │ └── server.ts
│ │ └── tsconfig.json
│ ├── shadeup.tmlanguage.json
│ ├── syntaxes/
│ │ └── shadeup.tmLanguage.json
│ └── tsconfig.json
├── lang/
│ ├── README.md
│ ├── shadeup/
│ │ ├── alert.ts
│ │ ├── compiler/
│ │ │ ├── assets.json
│ │ │ ├── assets.ts
│ │ │ ├── common.ts
│ │ │ ├── generateDocs.ts
│ │ │ ├── generateTsCache.ts
│ │ │ ├── interface.ts
│ │ │ ├── simple.ts
│ │ │ └── worker.ts
│ │ ├── engine/
│ │ │ ├── adapters/
│ │ │ │ ├── adapter.ts
│ │ │ │ ├── webgl.ts
│ │ │ │ └── webgpu.ts
│ │ │ ├── amd.ts
│ │ │ ├── engine-headless.ts
│ │ │ ├── engine.ts
│ │ │ ├── frame-embed.html
│ │ │ ├── frame-headless.html
│ │ │ ├── frame-preview.html
│ │ │ ├── frame.html
│ │ │ ├── gltf.js
│ │ │ ├── input/
│ │ │ │ ├── input.ts
│ │ │ │ └── keyboardKeys.ts
│ │ │ ├── requirejs.js
│ │ │ ├── setZero.ts
│ │ │ ├── shader.ts
│ │ │ ├── ui/
│ │ │ │ ├── components/
│ │ │ │ │ ├── Button.svelte
│ │ │ │ │ ├── Checkbox.svelte
│ │ │ │ │ ├── Combo.svelte
│ │ │ │ │ ├── FloatingPanel.svelte
│ │ │ │ │ ├── Group.svelte
│ │ │ │ │ ├── Host.svelte
│ │ │ │ │ ├── Label.svelte
│ │ │ │ │ ├── Slider.svelte
│ │ │ │ │ ├── Text.svelte
│ │ │ │ │ └── host.scss
│ │ │ │ ├── puck.ts
│ │ │ │ └── ui.ts
│ │ │ ├── util.ts
│ │ │ └── virtual-webgl2.js
│ │ ├── environment.ts
│ │ ├── environmentWorker.ts
│ │ ├── frame.html
│ │ ├── library/
│ │ │ ├── buffer.ts
│ │ │ ├── color.ts
│ │ │ ├── common.shadeup
│ │ │ ├── drawAttributes.ts
│ │ │ ├── drawCount.ts
│ │ │ ├── drawIndexed.ts
│ │ │ ├── examples/
│ │ │ │ ├── deferred.shadeup
│ │ │ │ ├── shadow-map.shadeup
│ │ │ │ └── transparency.shadeup
│ │ │ ├── files.ts
│ │ │ ├── geo.shadeup
│ │ │ ├── mesh.shadeup
│ │ │ ├── mesh.ts
│ │ │ ├── native.ts
│ │ │ ├── paint.ts
│ │ │ ├── physics.ts
│ │ │ ├── sdf.shadeup
│ │ │ ├── std.ts
│ │ │ ├── test.shadeup
│ │ │ ├── texture.ts
│ │ │ ├── textures.shadeup
│ │ │ ├── types.ts
│ │ │ └── ui.ts
│ │ ├── monaco/
│ │ │ └── connector.ts
│ │ ├── runner.ts
│ │ ├── symbol.ts
│ │ ├── vite.config.js
│ │ └── worker.ts
│ ├── shadeup-frontend/
│ │ ├── .gitignore
│ │ ├── f.js
│ │ ├── f.ts
│ │ ├── index.html
│ │ ├── lib/
│ │ │ ├── ariadne-ts/
│ │ │ │ └── src/
│ │ │ │ ├── _extensions.ts
│ │ │ │ ├── browser.ts
│ │ │ │ ├── data/
│ │ │ │ │ ├── Display.ts
│ │ │ │ │ ├── Formatter.ts
│ │ │ │ │ ├── Iter.ts
│ │ │ │ │ ├── Option.ts
│ │ │ │ │ ├── Range.ts
│ │ │ │ │ ├── Result.ts
│ │ │ │ │ ├── Show.ts
│ │ │ │ │ ├── Span.ts
│ │ │ │ │ └── Write.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── lib/
│ │ │ │ │ ├── Characters.ts
│ │ │ │ │ ├── Color.ts
│ │ │ │ │ ├── ColorGenerator.ts
│ │ │ │ │ ├── Config.ts
│ │ │ │ │ ├── Label.ts
│ │ │ │ │ ├── LabelInfo.ts
│ │ │ │ │ ├── Report.ts
│ │ │ │ │ ├── ReportBuilder.ts
│ │ │ │ │ ├── ReportKind.ts
│ │ │ │ │ ├── Source.ts
│ │ │ │ │ ├── SourceGroup.ts
│ │ │ │ │ └── chalk/
│ │ │ │ │ └── chalk/
│ │ │ │ │ ├── license
│ │ │ │ │ ├── readme.md
│ │ │ │ │ └── source/
│ │ │ │ │ ├── index.d.ts
│ │ │ │ │ ├── index.js
│ │ │ │ │ ├── utilities.js
│ │ │ │ │ └── vendor/
│ │ │ │ │ ├── ansi-styles/
│ │ │ │ │ │ ├── index.d.ts
│ │ │ │ │ │ └── index.js
│ │ │ │ │ └── supports-color/
│ │ │ │ │ ├── browser.d.ts
│ │ │ │ │ ├── browser.js
│ │ │ │ │ ├── index.d.ts
│ │ │ │ │ └── index.js
│ │ │ │ ├── stringFormat.ts
│ │ │ │ ├── utils/
│ │ │ │ │ ├── binary_search_by_key.ts
│ │ │ │ │ ├── include_str.ts
│ │ │ │ │ └── index.ts
│ │ │ │ └── write.ts
│ │ │ ├── environment/
│ │ │ │ ├── Errors.ts
│ │ │ │ ├── ShadeupEnvironment.ts
│ │ │ │ ├── TypescriptEnvironment.ts
│ │ │ │ ├── quickCache.json
│ │ │ │ ├── tagGraph.ts
│ │ │ │ └── validate.ts
│ │ │ ├── fast-diff/
│ │ │ │ └── diff.js
│ │ │ ├── generator/
│ │ │ │ ├── eval.js
│ │ │ │ ├── glsl.ts
│ │ │ │ ├── header.glsl
│ │ │ │ ├── header.wgsl
│ │ │ │ ├── root.ts
│ │ │ │ ├── toposort.ts
│ │ │ │ ├── transform.ts
│ │ │ │ ├── tsWalk.ts
│ │ │ │ ├── util.ts
│ │ │ │ └── wgsl.ts
│ │ │ ├── main.ts
│ │ │ ├── parser/
│ │ │ │ ├── AstContext.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── node.cjs
│ │ │ │ ├── tree-sitter-javascript.wasm
│ │ │ │ ├── tree-sitter-shadeup.wasm
│ │ │ │ ├── tree-sitter.wasm
│ │ │ │ ├── wasm.ts
│ │ │ │ └── web-tree-sitter/
│ │ │ │ └── tree-sitter.js
│ │ │ └── std/
│ │ │ ├── all.ts
│ │ │ ├── generate-static-math.ts
│ │ │ ├── global.d.ts
│ │ │ ├── math.ts
│ │ │ ├── static-math-db.ts
│ │ │ └── static-math.ts
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── index.ts
│ │ │ ├── main.ts
│ │ │ └── vite-env.d.ts
│ │ ├── test.js
│ │ ├── test.ts
│ │ ├── tsconfig.json
│ │ ├── vfs.js
│ │ └── vite.config.ts
│ └── tree-sitter/
│ ├── .gitignore
│ ├── .prettierrc
│ ├── Cargo.toml
│ ├── binding.gyp
│ ├── bindings/
│ │ ├── node/
│ │ │ ├── binding.cc
│ │ │ └── index.js
│ │ └── rust/
│ │ ├── build.rs
│ │ └── lib.rs
│ ├── build/
│ │ ├── Release/
│ │ │ ├── obj/
│ │ │ │ └── tree_sitter_shadeup_binding/
│ │ │ │ ├── bindings/
│ │ │ │ │ └── node/
│ │ │ │ │ └── binding.obj
│ │ │ │ ├── src/
│ │ │ │ │ ├── parser.obj
│ │ │ │ │ └── scanner.obj
│ │ │ │ ├── tree_sit.A95203FA.tlog/
│ │ │ │ │ ├── CL.command.1.tlog
│ │ │ │ │ ├── CL.read.1.tlog
│ │ │ │ │ ├── CL.write.1.tlog
│ │ │ │ │ ├── link.command.1.tlog
│ │ │ │ │ ├── link.read.1.tlog
│ │ │ │ │ ├── link.write.1.tlog
│ │ │ │ │ ├── tree_sitter_shadeup_binding.lastbuildstate
│ │ │ │ │ └── tree_sitter_shadeup_binding.write.1u.tlog
│ │ │ │ ├── tree_sitter_shadeup_binding.node.recipe
│ │ │ │ └── win_delay_load_hook.obj
│ │ │ ├── tree_sitter_shadeup_binding.exp
│ │ │ ├── tree_sitter_shadeup_binding.iobj
│ │ │ ├── tree_sitter_shadeup_binding.ipdb
│ │ │ ├── tree_sitter_shadeup_binding.lib
│ │ │ ├── tree_sitter_shadeup_binding.node
│ │ │ └── tree_sitter_shadeup_binding.pdb
│ │ ├── binding.sln
│ │ ├── config.gypi
│ │ ├── tree_sitter_shadeup_binding.vcxproj
│ │ └── tree_sitter_shadeup_binding.vcxproj.filters
│ ├── grammar.js
│ ├── grammer-fixed.js
│ ├── javascript.js
│ ├── package.json
│ ├── parser.exp
│ ├── parser.lib
│ ├── parser.obj
│ ├── readme.md
│ ├── scanner.obj
│ ├── shadeup-javascript.js
│ ├── src/
│ │ ├── grammar.json
│ │ ├── node-types.json
│ │ ├── parser.c
│ │ ├── scanner.c
│ │ └── tree_sitter/
│ │ └── parser.h
│ ├── test.shadeup
│ ├── tree-sitter-javascript.wasm
│ └── typescript.js
├── package/
│ ├── __lib.d.ts
│ ├── __lib.js
│ ├── __lib.shadeup
│ ├── engine-dist/
│ │ ├── DRACOLoader-4fcd2f44.js
│ │ ├── GLTFLoader-94b38cf6.js
│ │ ├── host-937690bb.js
│ │ ├── host-f3c963cd.js
│ │ ├── host-fa5c0296.js
│ │ ├── shadeup-engine.js
│ │ ├── style.css
│ │ ├── three.module-c8091b37.js
│ │ ├── ui-37189365.js
│ │ └── ui-f4b4a003.js
│ ├── engine.js
│ ├── index.js
│ ├── library.js
│ ├── main.d.ts
│ ├── math.d.ts
│ ├── package.json
│ └── util/
│ └── concat.js
├── package.json
└── unreal-engine/
├── .editorconfig
├── .gitattributes
├── .gitignore
├── .prettierignore
├── README.md
├── archive.js
├── archives/
│ └── CustomProxy_Plugin/
│ ├── ShadeupExamplePlugin.uplugin
│ ├── ShadeupExamplePlugin.uplugin.back
│ └── Source/
│ ├── CustomProxy/
│ │ ├── CustomProxy.Build.cs
│ │ ├── Private/
│ │ │ └── CustomProxy.cpp
│ │ └── Public/
│ │ └── CustomProxy.h
│ └── ShadeupTestPlugin/
│ ├── Private/
│ │ └── ShadeupExamplePlugin.cpp
│ ├── Public/
│ │ └── ShadeupExamplePlugin.h
│ └── ShadeupExamplePlugin.Build.cs
├── build/
│ └── grammar.js
├── cli.js
├── examples/
│ ├── pixel.shadeup
│ └── version2.shadeup
├── extension/
│ └── shadeup/
│ ├── .vscode/
│ │ └── launch.json
│ ├── .vscodeignore
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── language-configuration.json
│ ├── package.json
│ ├── syntaxes/
│ │ └── shadeup.tmLanguage.json
│ └── vsc-extension-quickstart.md
├── index.js
├── p.shadeup
├── package.json
├── src/
│ ├── file.js
│ ├── grammar.ne
│ ├── parse.js
│ ├── plugin_template/
│ │ ├── ShadeupExamplePlugin.uplugin
│ │ └── Source/
│ │ └── ShadeupTestPlugin/
│ │ ├── Private/
│ │ │ └── ShadeupExamplePlugin.cpp
│ │ ├── Public/
│ │ │ └── ShadeupExamplePlugin.h
│ │ └── ShadeupExamplePlugin.Build.cs
│ ├── string.ne
│ ├── template/
│ │ ├── ModulePrivate.cpp
│ │ ├── ModulePublic.h
│ │ ├── Plugin/
│ │ │ ├── MyPlugin.uplugin
│ │ │ ├── Shaders/
│ │ │ │ ├── Compute/
│ │ │ │ │ └── Private/
│ │ │ │ │ └── Template.usf
│ │ │ │ └── Factory/
│ │ │ │ └── Private/
│ │ │ │ └── Template.ush
│ │ │ └── Source/
│ │ │ └── Module/
│ │ │ ├── Private/
│ │ │ │ ├── ActorTemplate.cpp
│ │ │ │ ├── ComputeTemplate.cpp
│ │ │ │ ├── ComputeTemplate.h
│ │ │ │ ├── FactoryTemplate.cpp
│ │ │ │ ├── FactoryTemplate.h
│ │ │ │ ├── ModuleTemplate.cpp
│ │ │ │ ├── ProxyTemplate.cpp
│ │ │ │ └── ProxyTemplate.h
│ │ │ ├── Public/
│ │ │ │ ├── ActorTemplate.h
│ │ │ │ └── ModuleTemplate.h
│ │ │ └── Template.Build.cs
│ │ ├── Template.Build.cs
│ │ ├── compute.cpp
│ │ └── lib/
│ │ ├── ShadeupLib.cpp
│ │ ├── ShadeupLib.h
│ │ └── readme.md
│ ├── templates/
│ │ ├── compute/
│ │ │ └── simple-compute-shader/
│ │ │ └── Plugin/
│ │ │ ├── Shaders/
│ │ │ │ └── [MODULE]/
│ │ │ │ └── Private/
│ │ │ │ └── [NAME]/
│ │ │ │ ├── $base[NAME].usf
│ │ │ │ ├── $basemat[NAME].usf
│ │ │ │ ├── $mat[NAME].usf
│ │ │ │ ├── $pi[NAME].usf
│ │ │ │ └── $rt[NAME].usf
│ │ │ └── Source/
│ │ │ └── [MODULE]/
│ │ │ ├── Private/
│ │ │ │ └── [NAME]/
│ │ │ │ ├── [NAME].cpp
│ │ │ │ └── [NAME].h
│ │ │ └── Public/
│ │ │ └── [NAME]/
│ │ │ ├── $base[NAME]_readme.md
│ │ │ ├── $basemat[NAME]_readme.md
│ │ │ ├── $mat[NAME]_readme.md
│ │ │ ├── $pi[NAME]_readme.md
│ │ │ ├── $rt[NAME]_readme.md
│ │ │ └── [NAME].h
│ │ ├── instancing/
│ │ │ ├── compute-indirect-drawing/
│ │ │ │ └── Plugin/
│ │ │ │ ├── Shaders/
│ │ │ │ │ └── [MODULE]/
│ │ │ │ │ └── Private/
│ │ │ │ │ └── [NAME]/
│ │ │ │ │ ├── [NAME].ush
│ │ │ │ │ ├── [NAME]Compute.usf
│ │ │ │ │ └── [NAME]VertexFactory.ush
│ │ │ │ └── Source/
│ │ │ │ └── [MODULE]/
│ │ │ │ ├── Private/
│ │ │ │ │ └── [NAME]/
│ │ │ │ │ ├── [NAME]Actor.cpp
│ │ │ │ │ ├── [NAME]Component.cpp
│ │ │ │ │ ├── [NAME]SceneProxy.cpp
│ │ │ │ │ ├── [NAME]SceneProxy.h
│ │ │ │ │ ├── [NAME]VertexFactory.cpp
│ │ │ │ │ └── [NAME]VertexFactory.h
│ │ │ │ └── Public/
│ │ │ │ └── [NAME]/
│ │ │ │ ├── $base[NAME]_readme.md
│ │ │ │ ├── [NAME]Actor.h
│ │ │ │ └── [NAME]Component.h
│ │ │ └── compute-instanced-static-mesh-component/
│ │ │ └── Plugin/
│ │ │ ├── Shaders/
│ │ │ │ └── [MODULE]/
│ │ │ │ └── Private/
│ │ │ │ └── [NAME]/
│ │ │ │ ├── [NAME].ush
│ │ │ │ ├── [NAME]Compute.usf
│ │ │ │ └── [NAME]VertexFactory.ush
│ │ │ └── Source/
│ │ │ └── [MODULE]/
│ │ │ ├── Private/
│ │ │ │ └── [NAME]/
│ │ │ │ ├── [NAME]Actor.cpp
│ │ │ │ ├── [NAME]Component.cpp
│ │ │ │ ├── [NAME]SceneProxy.cpp
│ │ │ │ ├── [NAME]SceneProxy.h
│ │ │ │ ├── [NAME]VertexFactory.cpp
│ │ │ │ └── [NAME]VertexFactory.h
│ │ │ └── Public/
│ │ │ └── [NAME]/
│ │ │ ├── $inst[NAME]_readme.md
│ │ │ ├── [NAME]Actor.h
│ │ │ └── [NAME]Component.h
│ │ └── nodes/
│ │ ├── dynamic/
│ │ │ └── Plugin/
│ │ │ └── Source/
│ │ │ └── [MODULE]/
│ │ │ ├── Private/
│ │ │ │ └── [NAME]MaterialExpression.cpp
│ │ │ └── Public/
│ │ │ ├── [NAME]MaterialExpression.h
│ │ │ └── [NAME]_readme.md
│ │ ├── fn/
│ │ │ └── Plugin/
│ │ │ └── Source/
│ │ │ └── [MODULE]/
│ │ │ ├── Private/
│ │ │ │ └── [NAME]MaterialExpression.cpp
│ │ │ └── Public/
│ │ │ └── [NAME]MaterialExpression.h
│ │ ├── input/
│ │ │ └── Plugin/
│ │ │ └── Source/
│ │ │ └── [MODULE]/
│ │ │ ├── Private/
│ │ │ │ └── [NAME]MaterialExpression.cpp
│ │ │ └── Public/
│ │ │ └── [NAME]MaterialExpression.h
│ │ └── output/
│ │ └── Plugin/
│ │ └── Source/
│ │ └── [MODULE]/
│ │ ├── Private/
│ │ │ └── [NAME]MaterialExpression.cpp
│ │ └── Public/
│ │ └── [NAME]MaterialExpression.h
│ ├── types/
│ │ ├── actor.js
│ │ ├── base.js
│ │ ├── compute.js
│ │ ├── factory.js
│ │ ├── shader.js
│ │ ├── template.js
│ │ └── value.js
│ ├── util.js
│ └── whitespace.ne
├── test.hlsl
├── test.js
└── test.shadeup
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitattributes
================================================
# Auto detect text files and perform LF normalization
* text=auto
================================================
FILE: .gitignore
================================================
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
*.lcov
# nyc test coverage
.nyc_output
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# Snowpack dependency directory (https://snowpack.dev/)
web_modules/
# TypeScript cache
*.tsbuildinfo
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional stylelint cache
.stylelintcache
# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local
# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache
# Next.js build output
.next
out
# Nuxt.js build / generate output
.nuxt
dist
# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public
# vuepress build output
.vuepress/dist
# vuepress v2.x temp and cache directory
.temp
.cache
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
# DynamoDB Local files
.dynamodb/
# TernJS port file
.tern-port
# Stores VSCode versions used for testing VSCode extensions
.vscode-test
# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
node_modules
================================================
FILE: .vscode/launch.json
================================================
// A launch configuration that launches the extension inside a new window
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"configurations": [
{
"name": "Extension",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}/extension/vscode/shadeup",
"${workspaceFolder}/cli/test/vite-project/src/"
]
}
]
}
================================================
FILE: README.md
================================================
<p align="center"><a href="https://unreal.shadeup.dev" target="_blank" rel="noopener noreferrer"><img width="200" src="https://unreal.shadeup.dev/favicon.png" alt="Shadeup logo"></a></p>
<h1 align="center"><a href="https://shadeup.dev">Shadeup</a></h1>
## Write **WebGPU** shaders without the boilerplate
Repository for the Shadeup ecosystem and tooling [Shadeup.dev](https://shadeup.dev/)
This currently includes:
- [Shadeup Language](./lang) - partial codebase
- [Shadeup Compiler Tools](./cli) `npm i -g @shadeup/cli`
- [Shadeup Engine Package](./package) `npm i shadeup`
- [Shadeup - Unreal Engine](./unreal-engine) `npm i -g @shadeup/unreal`
- [Shadeup VS Code extension](./extension/vscode) - [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=Shadeup.shadeup-vscode)
---
================================================
FILE: cli/README.md
================================================
<p align="center"><a href="https://shadeup.dev" target="_blank" rel="noopener noreferrer"><img width="200" src="https://shadeup.dev/favicon.png" alt="Shadeup logo"></a></p>
<h1 align="center"><a href="https://shadeup.dev">Shadeup CLI</a></h1>
# Shadeup compiler tools
## Installation
```sh
npm install -g @shadeup/cli
```
## Usage
```sh
shadeup --help
```
```sh
CLI tool for compiling shadeup files
Options:
-V, --version output the version number
-v
-h, --help display help for command
Commands:
build [options] <file> Build file
watch <file> Watch a shadeup file and recompile on change
preview <file> Live preview of a shadeup file in electron
```
## Example
```ts
// main.shadeup
fn main() {
draw(shader {
out.color = (in.uv, 0.5, 1.0);
});
}
```
```sh
$ shadeup build main.shadeup
```
After running the above command, you should find the following files in the same directory as `main.shadeup`:
- `main.js`
- `main.d.ts`
You can use the above files inside of a vite or webpack project to use the shader in your web application.
```sh
$ npm i shadeup
```
```js
// example.ts
import { makeShadeupInstance } from "./main";
const canvas = document.querySelector<HTMLCanvasElement>("#canvas")!;
(async () => {
const engine = await makeShadeupInstance(canvas);
// Optionally enable the UI
await engine.enableUI();
// The frame loop will start automatically
// You can call pub functions on the engine instance
// engine.files.main.exampleFunction();
})();
```
## Preview mode
```sh
$ shadeup preview main.shadeup
```
This will open an electron window with the shader preview. You can use this to quickly test your shader without having to set up a web project.

================================================
FILE: cli/cli.js
================================================
#!/usr/bin/env node
import colors from "colors";
import path from "path";
import fs from "fs";
import os from "os";
import inquirer from "inquirer";
import { program } from "commander";
import * as url from "url";
import {
makeCompiler,
makeIncrementalCompiler,
} from "./compiler-dist/compiler.js";
if (typeof __dirname == "undefined") {
global["__filename"] = url.fileURLToPath(import.meta.url);
global["__dirname"] = url.fileURLToPath(new URL(".", import.meta.url));
}
function findCommonPath(paths) {
// Find the common path without the filename or extension
if (paths.length == 0) return "";
if (paths.length == 1) return path.dirname(paths[0]) + "/";
paths = paths.map((p) => p).sort((a, b) => b.length - a.length);
let longest = paths[0];
for (let i = 0; i < longest.length; i++) {
let char = longest[i];
for (let path of paths) {
if (path[i] != char) {
return longest.slice(0, i);
}
}
}
}
function scanImports(baseFile) {
let imports = new Set();
imports.add(baseFile);
let data = fs.readFileSync(baseFile, "utf8");
let lines = data.split("\n");
for (let line of lines) {
let match = line.match(/import[^"]+"([^"]*)"/);
if (match) {
let importPath = match[1];
if (!importPath.endsWith(".shadeup")) {
importPath += ".shadeup";
}
if (importPath.startsWith("/")) {
continue;
}
let importFile = path.resolve(path.dirname(baseFile), importPath);
if (!imports.has(importFile)) {
imports.add(importFile);
scanImports(importFile).forEach((i) => imports.add(i));
}
}
}
return imports;
}
program
.name("shadeup")
.description("CLI tool for compiling shadeup files")
.version("1.3.0")
.option("-v")
.action(async (opts) => {
console.log("Shadeup v1.3.0".magenta);
if (opts.v) {
return;
}
try {
} catch (e) {
console.error(e);
}
});
function normalizePath(p) {
return p.replace(/\\/g, "/");
}
function printErrors(errors, common) {
for (let error of errors) {
let path = (common + error.file)
.replace(".ts", ".shadeup")
.replace(/^\/([A-Z]:)/g, "$1")
.replace(/\/\//g, "/");
console.error(
path + "\n\x1b[31m" + error.message.replace(error.file, path) + "\x1b[0m"
);
}
}
const buildFiles = async (files, options) => {
let compile = await makeCompiler();
let outputs = [];
let common = normalizePath(findCommonPath(files));
outputs.push(
compile({
files: files.map((f) => {
f = normalizePath(f).replace(common, "");
let data = fs.readFileSync(f, "utf8");
let filename = f.replace(".shadeup", "");
return { name: filename, body: data };
}),
})
);
let orig = console.log;
console.log = () => {};
let outs = await Promise.all(outputs);
console.log = orig;
for (let i = 0; i < outs.length; i++) {
let out = outs[i];
if (out.errors) {
printErrors(out.errors, common);
continue;
}
let file = files[i];
let outPath = options.output || file.replace(".shadeup", ".js");
console.log(`Writing ${outPath}`);
fs.writeFileSync(outPath, out.output);
if (out.dts) {
let dtsPath = file.replace(".shadeup", ".d.ts");
if (options.output) {
dtsPath = options.output.replace(".js", ".d.ts");
}
console.log(`Writing ${dtsPath}`);
fs.writeFileSync(dtsPath, out.dts);
}
}
};
program
.command("build")
.description("Build file")
.option("-o, --output <path>", "Output path", "")
.argument("file", "File to build")
.action(async (file, options) => {
file = path.resolve(file);
if (!fs.existsSync(file)) {
console.error(`File ${file} does not exist`);
return;
}
let fileSet = scanImports(file);
let files = [...fileSet.values()];
if (!options.output) {
delete options.output;
}
await buildFiles(files, {
output: file.replace(".shadeup", ".js"),
...options,
});
});
const debounce = (fn, time) => {
let timeout;
return (...args) => {
clearTimeout(timeout);
timeout = setTimeout(() => {
fn(...args);
}, time);
};
};
const setupWatcher = async (file, options, outdir = "") => {
file = path.resolve(file);
let comp = await makeIncrementalCompiler();
let rebuild = debounce(async () => {
let fileSet = scanImports(file);
let files = [...fileSet.values()];
let common = normalizePath(findCommonPath(files));
let start = performance.now();
let orig = console.log;
// console.log = () => {};
let outs = await comp({
files: files.map((f) => {
f = normalizePath(f).replace(common, "");
let data = fs.readFileSync(f, "utf8");
let filename = f.replace(".shadeup", "");
return { name: filename, body: data };
}),
});
console.log = orig;
(async () => {
// let errs = await outs.errors;
// printErrors(errs, common);
})();
let outPath = options.output || file.replace(".shadeup", ".js");
if (outdir) {
outPath = path.join(outdir, path.basename(outPath));
}
console.log(
`\x1b[32mCompiled in ${Math.round(
performance.now() - start
)}ms\x1b[0m: writing out to ${outPath}`
);
fs.writeFileSync(outPath, outs.output);
fs.writeFileSync(outPath.replace(/\.js$/, ".d.ts"), outs.dts);
}, 100);
rebuild();
let handlers = new Map();
const buildHandlers = () => {
let fileSet = scanImports(file);
let files = Array.from(fileSet);
let unwatch = new Set(handlers.keys());
for (let file of files) {
unwatch.delete(file);
if (!fs.existsSync(file)) {
console.error(`File ${file} does not exist`);
continue;
}
if (handlers.has(file)) {
continue;
}
let handler = () => {
rebuild();
buildHandlers();
};
let watcher = fs.watch(file, handler);
watcher.on("change", handler);
watcher.on("error", (e) => {
console.error(e);
});
handlers.set(file, watcher);
}
for (let file of unwatch) {
handlers.get(file).close();
handlers.delete(file);
}
};
buildHandlers();
};
program
.command("watch")
.description("Watch a shadeup file and recompile on change")
.argument("file", "Main file to watch")
.action(async (file, options) => {
setupWatcher(file, options);
});
program
.command("preview")
.description("Live preview of a shadeup file in electron")
.argument("file", "Main file to preview")
.action(async (file, options) => {
const electron = await import("electron");
const proc = await import("node:child_process");
// shadeup home dir for vite
const shadeupHome = path.join(os.homedir(), ".shadeup_vite");
// Copy entire vite directory to shadeup home dir
if (!fs.existsSync(shadeupHome)) {
fs.mkdirSync(shadeupHome);
}
const viteDir = path.join(__dirname, "vite");
fs.cpSync(viteDir, shadeupHome, { recursive: true });
// run npm install on the vite directory if node_modules doesn't exist
if (!fs.existsSync(path.join(shadeupHome, "/node_modules"))) {
console.log(shadeupHome);
console.log("Installing dependencies...");
proc.execSync("npm install", {
cwd: shadeupHome,
stdio: "inherit",
});
}
fs.writeFileSync(
path.join(__dirname, "vite/runner.js"),
`export const makeShadeupInstance = async (canvas) => {
return {
enableUI: async () => {},
};
};
`
);
const child = proc.spawn(electron.default, [
path.join(__dirname, "electron/main.js"),
]);
child.stdout.on("data", (data) => {
console.log(data.toString());
});
child.stderr.on("data", (data) => {
console.error(data.toString());
});
setupWatcher(
file,
{
output: path.join(shadeupHome, "runner.js"),
},
shadeupHome
);
const vite = await import("vite");
const server = await vite.createServer({
root: shadeupHome,
server: {
port: 5128,
},
});
child.on("close", (code) => {
console.log(`child process exited with code ${code}`);
server.close();
process.exit();
});
await server.listen();
});
program.parse();
================================================
FILE: cli/compiler-dist/compiler.d.ts
================================================
export function makeLSPCompiler(): Promise<any>;
================================================
FILE: cli/compiler-dist/compiler.js
================================================
import { makeSimpleShadeupEnvironment } from "./shadeup-compiler.js";
import Parser from "web-tree-sitter";
import minify from "uglify-js";
import path from "path";
import { fileURLToPath } from "url";
const __filename = fileURLToPath(new URL(import.meta.url));
function filterDTS(files) {
return `import * as __ from "shadeup/math";
declare namespace ShadeupFiles {
${[...files.entries()]
.map(
([name, dts]) =>
` declare namespace ${name} {\n${dts
.split("\n")
.map((s) => ` ${s}`)
.join("\n")
.trimEnd()}\n }`
)
.join("\n")}
}
export declare function makeShadeupInstance(
canvas: HTMLCanvasElement,
options?: {
preferredAdapter?: "webgl" | "webgpu";
limits?: GPUSupportedLimits;
ui?: boolean;
}
): Promise<{
/**
* Set to false to pause
*/
playing: boolean;
canvas: HTMLCanvasElement;
adapter: any;
hooks: {
beforeFrame?: () => void;
afterFrame?: () => void;
reset?: () => void;
}[];
start: () => void;
env: {
camera: {
position: __.float3;
rotation: __.float4;
width: __.float;
height: __.float;
fov: __.float;
near: __.float;
far: __.float;
};
camera2d: {
position: __.float2;
zoom: __.float;
};
deltaTime: __.float;
frame: __.int;
keyboard: any;
mouse: any;
screenSize: __.float2;
time: __.float;
};
/**
* Used to pass values into the shadeup env (accessed as env.input("name") inside)
*/
inputValues: Map<string, any>;
enableUI: () => Promise<void>;
loadTextureFromImageLike: (
img: HTMLImageElement | HTMLCanvasElement | ImageBitmap | OffscreenCanvas | HTMLVideoElement
) => Promise<__.texture2d<__.float4>>;
loadTexture2dFromURL: (url: string) => Promise<__.texture2d<__.float4>>;
loadModelFromURL: (urlGltf: string) => Promise<__.texture2d<__.float4>>;
files: typeof ShadeupFiles;
}>;
`;
}
const prefixConst = (files) => {
let str = `import { bindShadeupEngine } from "shadeup";
export const makeShadeupInstance = bindShadeupEngine((define, localEngineContext) => {
const __shadeup_gen_shader =
localEngineContext.__shadeup_gen_shader.bind(localEngineContext);
const __shadeup_make_shader_inst =
localEngineContext.__shadeup_make_shader_inst.bind(localEngineContext);
const __shadeup_register_struct =
localEngineContext.__shadeup_register_struct.bind(localEngineContext);
const env = localEngineContext.env;\n`;
str += `((defineFunc) => {
let define = (deps, func) => defineFunc("/__meta.js", deps, func);
define(["require", "exports"], function (require, exports, __, std___std_all_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.files = [${files.map((f) => JSON.stringify(f)).join(",")}];
});
})(define);`;
return str;
};
export async function makeCompiler() {
await Parser.init();
const parser = new Parser();
const Lang = await Parser.Language.load(
path.resolve(path.dirname(__filename), "tree-sitter-shadeup.wasm")
);
parser.setLanguage(Lang);
global.shadeupParser = () => {
return parser;
};
let envPool = [];
for (let i = 0; i < 1; i++) {
envPool.push(await makeSimpleShadeupEnvironment(true, true));
}
let queue = [];
async function consumeQueue() {
if (queue.length == 0) return;
if (envPool.length == 0) return;
let env = envPool.shift();
let item = queue.shift();
if (!item) return;
try {
let start = performance.now();
env.reset();
for (let i = 0; i < item.files.length; i++) {
const file = item.files[i];
if (i == item.files.length - 1) {
await env.writeFile("/" + file.name + ".ts", file.body);
} else {
env.writeFile("/" + file.name + ".ts", file.body);
}
}
// for (let file of item.files) {
// if (file.name == "main")
// await env.writeFile("/" + file.name + ".ts", file.body);
// }
let output = await env.regenerate();
let finalOutput = "";
let dts = "";
let fileDts = new Map();
let errors = await env.errors();
if (errors.length > 0) {
item.callback({
errors: errors,
});
envPool.push(env);
consumeQueue();
return;
}
for (let o of output) {
if (
!item.files.find(
(f) =>
f.name ==
o.path.replace(/^\//g, "").replace(".js", "").replace(".d.ts", "")
) &&
!(item.files.length >= 1 && item.files[0].name == "__lib")
)
continue;
if (o.path.endsWith(".d.ts")) {
fileDts.set(
o.path.replace(/^\//g, "").replace(".js", "").replace(".d.ts", ""),
o.contents
.split("\n")
.filter((l) => !l.startsWith("import"))
.join("\n")
);
} else {
if (item.files.length >= 1 && item.files[0].name == "__lib") {
finalOutput += `
((defineFunc) => {
let define = (deps, func) => defineFunc(${JSON.stringify(o.path)}, deps, func);
${o.contents}
})(define);
`;
} else {
finalOutput += `
((defineFunc) => {
let define = (deps, func) => defineFunc(${JSON.stringify(o.path)}, deps, func);
${o.contents}
})(define);
`;
}
}
}
let final =
prefixConst(item.files.map((f) => f.name)) + finalOutput + `\n});`;
if (item.files.length >= 1 && item.files[0].name == "__lib") {
final = finalOutput;
}
let doMinify = false;
if (doMinify) {
final = minify.minify(final);
// console.log(final);
}
console.log("Generated in " + (performance.now() - start) + "ms");
item.callback({
output: final,
dts: filterDTS(fileDts),
});
envPool.push(env);
consumeQueue();
} catch (e) {
console.error(e);
envPool.push(await makeSimpleShadeupEnvironment(true, true));
item.callback({
error: "Fatal error while compiling.",
});
consumeQueue();
}
}
return async function compile(data) {
return new Promise((resolve, reject) => {
queue.push({ ...data, files: data.files, callback: resolve });
consumeQueue();
});
};
}
export async function makeIncrementalCompiler() {
await Parser.init();
const parser = new Parser();
const Lang = await Parser.Language.load(
path.resolve(path.dirname(__filename), "tree-sitter-shadeup.wasm")
);
parser.setLanguage(Lang);
global.shadeupParser = () => {
return parser;
};
const env = await makeSimpleShadeupEnvironment(true, true);
const fileCache = new Map();
const fileEmitCache = new Map();
return async function compile(item) {
try {
let start = performance.now();
let itemsToRegen = [];
let dirtyFiles = new Set();
for (let i = 0; i < item.files.length; i++) {
const file = item.files[i];
let fileKey = "/" + file.name + ".ts";
let didChange = false;
if (fileCache.has(fileKey)) {
if (fileCache.get(fileKey) != file.body) {
didChange = true;
}
} else {
didChange = true;
}
if (didChange) {
itemsToRegen.push(fileKey);
fileCache.set(fileKey, file.body);
dirtyFiles.add(fileKey);
}
}
let dirtyFilesArray = Array.from(dirtyFiles);
for (let i = 0; i < dirtyFilesArray.length; i++) {
const fileKey = dirtyFilesArray[i];
const file = item.files.find((f) => "/" + f.name + ".ts" == fileKey);
if (i == dirtyFilesArray.length - 1) {
await env.writeFile(fileKey, file.body, true);
} else {
env.writeFile(fileKey, file.body, true);
}
}
let output = await env.regenerate(itemsToRegen);
console.log("Regen took " + (performance.now() - start) + "ms");
let finalOutput = "";
let dts = "";
const fileDts = new Map();
for (let o of output) {
if (
!item.files.find(
(f) =>
f.name ==
o.path.replace(/^\//g, "").replace(".js", "").replace(".d.ts", "")
) &&
!(item.files.length >= 1 && item.files[0].name == "__lib")
)
continue;
if (o.path.endsWith(".d.ts")) {
// dts += o.contents;
fileDts.set(
o.path.replace(/^\//g, "").replace(".js", "").replace(".d.ts", ""),
o.contents
.split("\n")
.filter((l) => !l.startsWith("import"))
.join("\n")
);
} else {
if (item.files.length >= 1 && item.files[0].name == "__lib") {
finalOutput += `
((defineFunc) => {
let define = (deps, func) => defineFunc(${JSON.stringify(o.path)}, deps, func);
${o.contents}
})(define);
`;
return finalOutput;
} else {
fileEmitCache.set(
o.path,
`
((defineFunc) => {
let define = (deps, func) => defineFunc(${JSON.stringify(o.path)}, deps, func);
${o.contents}
})(define);
`
);
}
}
}
for (let file of item.files) {
let fileKey = "/" + file.name + ".js";
if (fileEmitCache.has(fileKey)) {
finalOutput += fileEmitCache.get(fileKey);
}
}
let final =
prefixConst(item.files.map((f) => f.name)) + finalOutput + `\n});`;
console.log("Generated in " + (performance.now() - start) + "ms");
return {
output: final,
dts: filterDTS(fileDts),
// errors: env.errors(),
};
} catch (e) {
console.error(e);
}
};
}
export async function makeLSPCompiler() {
await Parser.init();
const parser = new Parser();
const Lang = await Parser.Language.load(
path.resolve(path.dirname(__filename), "tree-sitter-shadeup.wasm")
);
parser.setLanguage(Lang);
global.shadeupParser = () => {
return parser;
};
const env = await makeSimpleShadeupEnvironment(true, true);
return env;
}
================================================
FILE: cli/compiler-dist/readme.md
================================================
modify the output of shadeup-compiler.js to:
1. remove the tree sitter wasm strings
2. Replace getShadeupParse with:
async function getShadeupParser() {
return global.shadeupParser();
}
3. import fs and replace e4.readFileSync e4 trace up to \_\_viteexternal with fs
================================================
FILE: cli/compiler-dist/shadeup-compiler.js
================================================
import ts from "typescript";
import require$$0$1 from "path";
import require$$1 from "fs";
import { createDefaultMapFromCDN, createSystem, createVirtualTypeScriptEnvironment } from "@typescript/vfs";
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
function getDefaultExportFromCjs(x) {
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
}
function getAugmentedNamespace(n) {
if (n.__esModule)
return n;
var f = n.default;
if (typeof f == "function") {
var a = function a2() {
if (this instanceof a2) {
return Reflect.construct(f, arguments, this.constructor);
}
return f.apply(this, arguments);
};
a.prototype = f.prototype;
} else
a = {};
Object.defineProperty(a, "__esModule", { value: true });
Object.keys(n).forEach(function(k) {
var d = Object.getOwnPropertyDescriptor(n, k);
Object.defineProperty(a, k, d.get ? d : {
enumerable: true,
get: function() {
return n[k];
}
});
});
return a;
}
var sha256$1 = { exports: {} };
(function(module) {
(function(root, factory2) {
var exports = {};
factory2(exports);
var sha2562 = exports["default"];
for (var k in exports) {
sha2562[k] = exports[k];
}
{
module.exports = sha2562;
}
})(commonjsGlobal, function(exports) {
exports.__esModule = true;
exports.digestLength = 32;
exports.blockSize = 64;
var K = new Uint32Array([
1116352408,
1899447441,
3049323471,
3921009573,
961987163,
1508970993,
2453635748,
2870763221,
3624381080,
310598401,
607225278,
1426881987,
1925078388,
2162078206,
2614888103,
3248222580,
3835390401,
4022224774,
264347078,
604807628,
770255983,
1249150122,
1555081692,
1996064986,
2554220882,
2821834349,
2952996808,
3210313671,
3336571891,
3584528711,
113926993,
338241895,
666307205,
773529912,
1294757372,
1396182291,
1695183700,
1986661051,
2177026350,
2456956037,
2730485921,
2820302411,
3259730800,
3345764771,
3516065817,
3600352804,
4094571909,
275423344,
430227734,
506948616,
659060556,
883997877,
958139571,
1322822218,
1537002063,
1747873779,
1955562222,
2024104815,
2227730452,
2361852424,
2428436474,
2756734187,
3204031479,
3329325298
]);
function hashBlocks(w, v, p, pos, len) {
var a, b, c2, d, e, f, g2, h, u, i, j, t1, t2;
while (len >= 64) {
a = v[0];
b = v[1];
c2 = v[2];
d = v[3];
e = v[4];
f = v[5];
g2 = v[6];
h = v[7];
for (i = 0; i < 16; i++) {
j = pos + i * 4;
w[i] = (p[j] & 255) << 24 | (p[j + 1] & 255) << 16 | (p[j + 2] & 255) << 8 | p[j + 3] & 255;
}
for (i = 16; i < 64; i++) {
u = w[i - 2];
t1 = (u >>> 17 | u << 32 - 17) ^ (u >>> 19 | u << 32 - 19) ^ u >>> 10;
u = w[i - 15];
t2 = (u >>> 7 | u << 32 - 7) ^ (u >>> 18 | u << 32 - 18) ^ u >>> 3;
w[i] = (t1 + w[i - 7] | 0) + (t2 + w[i - 16] | 0);
}
for (i = 0; i < 64; i++) {
t1 = (((e >>> 6 | e << 32 - 6) ^ (e >>> 11 | e << 32 - 11) ^ (e >>> 25 | e << 32 - 25)) + (e & f ^ ~e & g2) | 0) + (h + (K[i] + w[i] | 0) | 0) | 0;
t2 = ((a >>> 2 | a << 32 - 2) ^ (a >>> 13 | a << 32 - 13) ^ (a >>> 22 | a << 32 - 22)) + (a & b ^ a & c2 ^ b & c2) | 0;
h = g2;
g2 = f;
f = e;
e = d + t1 | 0;
d = c2;
c2 = b;
b = a;
a = t1 + t2 | 0;
}
v[0] += a;
v[1] += b;
v[2] += c2;
v[3] += d;
v[4] += e;
v[5] += f;
v[6] += g2;
v[7] += h;
pos += 64;
len -= 64;
}
return pos;
}
var Hash = (
/** @class */
function() {
function Hash2() {
this.digestLength = exports.digestLength;
this.blockSize = exports.blockSize;
this.state = new Int32Array(8);
this.temp = new Int32Array(64);
this.buffer = new Uint8Array(128);
this.bufferLength = 0;
this.bytesHashed = 0;
this.finished = false;
this.reset();
}
Hash2.prototype.reset = function() {
this.state[0] = 1779033703;
this.state[1] = 3144134277;
this.state[2] = 1013904242;
this.state[3] = 2773480762;
this.state[4] = 1359893119;
this.state[5] = 2600822924;
this.state[6] = 528734635;
this.state[7] = 1541459225;
this.bufferLength = 0;
this.bytesHashed = 0;
this.finished = false;
return this;
};
Hash2.prototype.clean = function() {
for (var i = 0; i < this.buffer.length; i++) {
this.buffer[i] = 0;
}
for (var i = 0; i < this.temp.length; i++) {
this.temp[i] = 0;
}
this.reset();
};
Hash2.prototype.update = function(data, dataLength) {
if (dataLength === void 0) {
dataLength = data.length;
}
if (this.finished) {
throw new Error("SHA256: can't update because hash was finished.");
}
var dataPos = 0;
this.bytesHashed += dataLength;
if (this.bufferLength > 0) {
while (this.bufferLength < 64 && dataLength > 0) {
this.buffer[this.bufferLength++] = data[dataPos++];
dataLength--;
}
if (this.bufferLength === 64) {
hashBlocks(this.temp, this.state, this.buffer, 0, 64);
this.bufferLength = 0;
}
}
if (dataLength >= 64) {
dataPos = hashBlocks(this.temp, this.state, data, dataPos, dataLength);
dataLength %= 64;
}
while (dataLength > 0) {
this.buffer[this.bufferLength++] = data[dataPos++];
dataLength--;
}
return this;
};
Hash2.prototype.finish = function(out) {
if (!this.finished) {
var bytesHashed = this.bytesHashed;
var left = this.bufferLength;
var bitLenHi = bytesHashed / 536870912 | 0;
var bitLenLo = bytesHashed << 3;
var padLength = bytesHashed % 64 < 56 ? 64 : 128;
this.buffer[left] = 128;
for (var i = left + 1; i < padLength - 8; i++) {
this.buffer[i] = 0;
}
this.buffer[padLength - 8] = bitLenHi >>> 24 & 255;
this.buffer[padLength - 7] = bitLenHi >>> 16 & 255;
this.buffer[padLength - 6] = bitLenHi >>> 8 & 255;
this.buffer[padLength - 5] = bitLenHi >>> 0 & 255;
this.buffer[padLength - 4] = bitLenLo >>> 24 & 255;
this.buffer[padLength - 3] = bitLenLo >>> 16 & 255;
this.buffer[padLength - 2] = bitLenLo >>> 8 & 255;
this.buffer[padLength - 1] = bitLenLo >>> 0 & 255;
hashBlocks(this.temp, this.state, this.buffer, 0, padLength);
this.finished = true;
}
for (var i = 0; i < 8; i++) {
out[i * 4 + 0] = this.state[i] >>> 24 & 255;
out[i * 4 + 1] = this.state[i] >>> 16 & 255;
out[i * 4 + 2] = this.state[i] >>> 8 & 255;
out[i * 4 + 3] = this.state[i] >>> 0 & 255;
}
return this;
};
Hash2.prototype.digest = function() {
var out = new Uint8Array(this.digestLength);
this.finish(out);
return out;
};
Hash2.prototype._saveState = function(out) {
for (var i = 0; i < this.state.length; i++) {
out[i] = this.state[i];
}
};
Hash2.prototype._restoreState = function(from, bytesHashed) {
for (var i = 0; i < this.state.length; i++) {
this.state[i] = from[i];
}
this.bytesHashed = bytesHashed;
this.finished = false;
this.bufferLength = 0;
};
return Hash2;
}()
);
exports.Hash = Hash;
var HMAC = (
/** @class */
function() {
function HMAC2(key) {
this.inner = new Hash();
this.outer = new Hash();
this.blockSize = this.inner.blockSize;
this.digestLength = this.inner.digestLength;
var pad = new Uint8Array(this.blockSize);
if (key.length > this.blockSize) {
new Hash().update(key).finish(pad).clean();
} else {
for (var i = 0; i < key.length; i++) {
pad[i] = key[i];
}
}
for (var i = 0; i < pad.length; i++) {
pad[i] ^= 54;
}
this.inner.update(pad);
for (var i = 0; i < pad.length; i++) {
pad[i] ^= 54 ^ 92;
}
this.outer.update(pad);
this.istate = new Uint32Array(8);
this.ostate = new Uint32Array(8);
this.inner._saveState(this.istate);
this.outer._saveState(this.ostate);
for (var i = 0; i < pad.length; i++) {
pad[i] = 0;
}
}
HMAC2.prototype.reset = function() {
this.inner._restoreState(this.istate, this.inner.blockSize);
this.outer._restoreState(this.ostate, this.outer.blockSize);
return this;
};
HMAC2.prototype.clean = function() {
for (var i = 0; i < this.istate.length; i++) {
this.ostate[i] = this.istate[i] = 0;
}
this.inner.clean();
this.outer.clean();
};
HMAC2.prototype.update = function(data) {
this.inner.update(data);
return this;
};
HMAC2.prototype.finish = function(out) {
if (this.outer.finished) {
this.outer.finish(out);
} else {
this.inner.finish(out);
this.outer.update(out, this.digestLength).finish(out);
}
return this;
};
HMAC2.prototype.digest = function() {
var out = new Uint8Array(this.digestLength);
this.finish(out);
return out;
};
return HMAC2;
}()
);
exports.HMAC = HMAC;
function hash(data) {
var h = new Hash().update(data);
var digest = h.digest();
h.clean();
return digest;
}
exports.hash = hash;
exports["default"] = hash;
function hmac(key, data) {
var h = new HMAC(key).update(data);
var digest = h.digest();
h.clean();
return digest;
}
exports.hmac = hmac;
function fillBuffer(buffer2, hmac2, info, counter) {
var num = counter[0];
if (num === 0) {
throw new Error("hkdf: cannot expand more");
}
hmac2.reset();
if (num > 1) {
hmac2.update(buffer2);
}
if (info) {
hmac2.update(info);
}
hmac2.update(counter);
hmac2.finish(buffer2);
counter[0]++;
}
var hkdfSalt = new Uint8Array(exports.digestLength);
function hkdf(key, salt, info, length) {
if (salt === void 0) {
salt = hkdfSalt;
}
if (length === void 0) {
length = 32;
}
var counter = new Uint8Array([1]);
var okm = hmac(salt, key);
var hmac_ = new HMAC(okm);
var buffer2 = new Uint8Array(hmac_.digestLength);
var bufpos = buffer2.length;
var out = new Uint8Array(length);
for (var i = 0; i < length; i++) {
if (bufpos === buffer2.length) {
fillBuffer(buffer2, hmac_, info, counter);
bufpos = 0;
}
out[i] = buffer2[bufpos++];
}
hmac_.clean();
buffer2.fill(0);
counter.fill(0);
return out;
}
exports.hkdf = hkdf;
function pbkdf2(password, salt, iterations, dkLen) {
var prf = new HMAC(password);
var len = prf.digestLength;
var ctr = new Uint8Array(4);
var t = new Uint8Array(len);
var u = new Uint8Array(len);
var dk = new Uint8Array(dkLen);
for (var i = 0; i * len < dkLen; i++) {
var c2 = i + 1;
ctr[0] = c2 >>> 24 & 255;
ctr[1] = c2 >>> 16 & 255;
ctr[2] = c2 >>> 8 & 255;
ctr[3] = c2 >>> 0 & 255;
prf.reset();
prf.update(salt);
prf.update(ctr);
prf.finish(u);
for (var j = 0; j < len; j++) {
t[j] = u[j];
}
for (var j = 2; j <= iterations; j++) {
prf.reset();
prf.update(u).finish(u);
for (var k = 0; k < len; k++) {
t[k] ^= u[k];
}
}
for (var j = 0; j < len && i * len + j < dkLen; j++) {
dk[i * len + j] = t[j];
}
}
for (var i = 0; i < len; i++) {
t[i] = u[i] = 0;
}
for (var i = 0; i < 4; i++) {
ctr[i] = 0;
}
prf.clean();
return dk;
}
exports.pbkdf2 = pbkdf2;
});
})(sha256$1);
var sha256Exports = sha256$1.exports;
const sha256 = /* @__PURE__ */ getDefaultExportFromCjs(sha256Exports);
function cleanName(name) {
return name.replaceAll("file:///", "").replaceAll(".", "_dot_").replaceAll("/", "_slash_").replaceAll("-", "_dash_");
}
function closest(node2, cb) {
while (node2) {
if (cb(node2))
return node2;
node2 = node2.parent;
}
return null;
}
function findShadeupTags(declar) {
let matcher = /=tag\((.+)\)$/g;
let doc = ts.getJSDocTags(declar);
for (let d of doc) {
if (d.tagName.text !== "shadeup")
continue;
if (typeof d.comment === "string") {
let matches = matcher.exec(d.comment);
if (matches) {
return matches[1].split(",").map((s) => s.trim());
}
}
}
return [];
}
function getFunctionDeclarationFromCallExpression(checker, node2) {
if (ts.isCallExpression(node2)) {
let exprSmybol = checker.getSymbolAtLocation(node2.expression);
if (exprSmybol && exprSmybol.flags & ts.SymbolFlags.Alias) {
exprSmybol = checker.getAliasedSymbol(exprSmybol);
}
if (exprSmybol) {
let funcDeclar = exprSmybol.getDeclarations()?.[0];
if (funcDeclar && ts.isFunctionDeclaration(funcDeclar)) {
return funcDeclar;
}
}
}
}
function toposort(edges) {
return toposortinternal(uniqueNodes(edges), edges);
}
function toposortinternal(nodes, edges) {
var cursor = nodes.length, sorted = new Array(cursor), visited = {}, i = cursor, outgoingEdges = makeOutgoingEdges(edges), nodesHash = makeNodesHash(nodes);
edges.forEach(function(edge) {
if (!nodesHash.has(edge[0]) || !nodesHash.has(edge[1])) {
throw new Error("Unknown node. There is an unknown node in the supplied edges.");
}
});
while (i--) {
if (!visited[i])
visit(nodes[i], i, /* @__PURE__ */ new Set());
}
return sorted;
function visit(node2, i2, predecessors) {
if (predecessors.has(node2)) {
var nodeRep;
try {
nodeRep = ", node was:" + JSON.stringify(node2);
} catch (e) {
nodeRep = "";
}
throw new Error("Cyclic dependency" + nodeRep);
}
if (!nodesHash.has(node2)) {
throw new Error(
"Found unknown node. Make sure to provided all involved nodes. Unknown node: " + JSON.stringify(node2)
);
}
if (visited[i2])
return;
visited[i2] = true;
var outgoing = outgoingEdges.get(node2) || /* @__PURE__ */ new Set();
outgoing = Array.from(outgoing);
if (i2 = outgoing.length) {
predecessors.add(node2);
do {
var child = outgoing[--i2];
visit(child, nodesHash.get(child), predecessors);
} while (i2);
predecessors.delete(node2);
}
sorted[--cursor] = node2;
}
}
function uniqueNodes(arr) {
var res = /* @__PURE__ */ new Set();
for (var i = 0, len = arr.length; i < len; i++) {
var edge = arr[i];
res.add(edge[0]);
res.add(edge[1]);
}
return Array.from(res);
}
function makeOutgoingEdges(arr) {
var edges = /* @__PURE__ */ new Map();
for (var i = 0, len = arr.length; i < len; i++) {
var edge = arr[i];
if (!edges.has(edge[0]))
edges.set(edge[0], /* @__PURE__ */ new Set());
if (!edges.has(edge[1]))
edges.set(edge[1], /* @__PURE__ */ new Set());
edges.get(edge[0]).add(edge[1]);
}
return edges;
}
function makeNodesHash(arr) {
var res = /* @__PURE__ */ new Map();
for (var i = 0, len = arr.length; i < len; i++) {
res.set(arr[i], i);
}
return res;
}
const wgslHeader = "fn shadeup_up_swizzle_x_u32(n: u32) -> u32{\r\n return n;\r\n}\r\nfn shadeup_up_swizzle_xx_u32(n: u32) -> vec2<u32>{\r\n return vec2<u32>(n, n);\r\n}\r\nfn shadeup_up_swizzle_xxx_u32(n: u32) -> vec3<u32>{\r\n return vec3<u32>(n, n, n);\r\n}\r\nfn shadeup_up_swizzle_xxxx_u32(n: u32) -> vec4<u32>{\r\n return vec4<u32>(n, n, n, n);\r\n}\r\n\r\nfn shadeup_up_swizzle_xy_u32(n: u32) -> vec2<u32>{\r\n return vec2<u32>(n, n);\r\n}\r\n\r\nfn shadeup_up_swizzle_xyz_u32(n: u32) -> vec3<u32>{\r\n return vec3<u32>(n, n, n);\r\n}\r\n\r\nfn shadeup_up_swizzle_xyzw_u32(n: u32) -> vec4<u32>{\r\n return vec4<u32>(n, n, n, n);\r\n}\r\n\r\nfn shadeup_up_swizzle_x_i32(n: i32) -> i32{\r\n return n;\r\n}\r\n\r\nfn shadeup_up_swizzle_xx_i32(n: i32) -> vec2<i32>{\r\n return vec2<i32>(n, n);\r\n}\r\n\r\nfn shadeup_up_swizzle_xxx_i32(n: i32) -> vec3<i32>{\r\n return vec3<i32>(n, n, n);\r\n}\r\n\r\nfn shadeup_up_swizzle_xxxx_i32(n: i32) -> vec4<i32>{\r\n return vec4<i32>(n, n, n, n);\r\n}\r\n\r\nfn shadeup_up_swizzle_xy_i32(n: i32) -> vec2<i32>{\r\n return vec2<i32>(n, n);\r\n}\r\n\r\nfn shadeup_up_swizzle_xyz_i32(n: i32) -> vec3<i32>{\r\n return vec3<i32>(n, n, n);\r\n}\r\n\r\nfn shadeup_up_swizzle_xyzw_i32(n: i32) -> vec4<i32>{\r\n return vec4<i32>(n, n, n, n);\r\n}\r\n\r\nfn shadeup_up_swizzle_x_f32(n: f32) -> f32{\r\n return n;\r\n}\r\n\r\nfn shadeup_up_swizzle_xx_f32(n: f32) -> vec2<f32>{\r\n return vec2<f32>(n, n);\r\n}\r\n\r\nfn shadeup_up_swizzle_xxx_f32(n: f32) -> vec3<f32>{\r\n return vec3<f32>(n, n, n);\r\n}\r\n\r\nfn shadeup_up_swizzle_xxxx_f32(n: f32) -> vec4<f32>{\r\n return vec4<f32>(n, n, n, n);\r\n}\r\n\r\nfn shadeup_up_swizzle_xy_f32(n: f32) -> vec2<f32>{\r\n return vec2<f32>(n, n);\r\n}\r\n\r\nfn shadeup_up_swizzle_xyz_f32(n: f32) -> vec3<f32>{\r\n return vec3<f32>(n, n, n);\r\n}\r\n\r\nfn shadeup_up_swizzle_xyzw_f32(n: f32) -> vec4<f32>{\r\n return vec4<f32>(n, n, n, n);\r\n}\r\n\r\nfn squash_bool_vec2(n: vec2<bool>) -> bool {\r\n return n.x && n.y;\r\n}\r\n\r\nfn squash_bool_vec3(n: vec3<bool>) -> bool {\r\n return n.x && n.y && n.z;\r\n}\r\n\r\nfn squash_bool_vec4(n: vec4<bool>) -> bool {\r\n return n.x && n.y && n.z && n.w;\r\n}\r\n\r\nfn matrix_inversefloat4x4(m: mat4x4<f32>) -> mat4x4<f32>{\r\n let n11 = m[0][0];\r\n let n12 = m[1][0];\r\n let n13 = m[2][0];\r\n let n14 = m[3][0];\r\n let n21 = m[0][1];\r\n let n22 = m[1][1];\r\n let n23 = m[2][1];\r\n let n24 = m[3][1];\r\n let n31 = m[0][2];\r\n let n32 = m[1][2];\r\n let n33 = m[2][2];\r\n let n34 = m[3][2];\r\n let n41 = m[0][3];\r\n let n42 = m[1][3];\r\n let n43 = m[2][3];\r\n let n44 = m[3][3];\r\n\r\n let t11 = n23 * n34 * n42 - n24 * n33 * n42 + n24 * n32 * n43 - n22 * n34 * n43 - n23 * n32 * n44 + n22 * n33 * n44;\r\n let t12 = n14 * n33 * n42 - n13 * n34 * n42 - n14 * n32 * n43 + n12 * n34 * n43 + n13 * n32 * n44 - n12 * n33 * n44;\r\n let t13 = n13 * n24 * n42 - n14 * n23 * n42 + n14 * n22 * n43 - n12 * n24 * n43 - n13 * n22 * n44 + n12 * n23 * n44;\r\n let t14 = n14 * n23 * n32 - n13 * n24 * n32 - n14 * n22 * n33 + n12 * n24 * n33 + n13 * n22 * n34 - n12 * n23 * n34;\r\n\r\n let det = n11 * t11 + n21 * t12 + n31 * t13 + n41 * t14;\r\n let idet = 1.0 / det;\r\n\r\n var ret: mat4x4<f32> = mat4x4<f32>();\r\n\r\n ret[0][0] = t11 * idet;\r\n ret[0][1] = (n24 * n33 * n41 - n23 * n34 * n41 - n24 * n31 * n43 + n21 * n34 * n43 + n23 * n31 * n44 - n21 * n33 * n44) * idet;\r\n ret[0][2] = (n22 * n34 * n41 - n24 * n32 * n41 + n24 * n31 * n42 - n21 * n34 * n42 - n22 * n31 * n44 + n21 * n32 * n44) * idet;\r\n ret[0][3] = (n23 * n32 * n41 - n22 * n33 * n41 - n23 * n31 * n42 + n21 * n33 * n42 + n22 * n31 * n43 - n21 * n32 * n43) * idet;\r\n\r\n ret[1][0] = t12 * idet;\r\n ret[1][1] = (n13 * n34 * n41 - n14 * n33 * n41 + n14 * n31 * n43 - n11 * n34 * n43 - n13 * n31 * n44 + n11 * n33 * n44) * idet;\r\n ret[1][2] = (n14 * n32 * n41 - n12 * n34 * n41 - n14 * n31 * n42 + n11 * n34 * n42 + n12 * n31 * n44 - n11 * n32 * n44) * idet;\r\n ret[1][3] = (n12 * n33 * n41 - n13 * n32 * n41 + n13 * n31 * n42 - n11 * n33 * n42 - n12 * n31 * n43 + n11 * n32 * n43) * idet;\r\n\r\n ret[2][0] = t13 * idet;\r\n ret[2][1] = (n14 * n23 * n41 - n13 * n24 * n41 - n14 * n21 * n43 + n11 * n24 * n43 + n13 * n21 * n44 - n11 * n23 * n44) * idet;\r\n ret[2][2] = (n12 * n24 * n41 - n14 * n22 * n41 + n14 * n21 * n42 - n11 * n24 * n42 - n12 * n21 * n44 + n11 * n22 * n44) * idet;\r\n ret[2][3] = (n13 * n22 * n41 - n12 * n23 * n41 - n13 * n21 * n42 + n11 * n23 * n42 + n12 * n21 * n43 - n11 * n22 * n43) * idet;\r\n\r\n ret[3][0] = t14 * idet;\r\n ret[3][1] = (n13 * n24 * n31 - n14 * n23 * n31 + n14 * n21 * n33 - n11 * n24 * n33 - n13 * n21 * n34 + n11 * n23 * n34) * idet;\r\n ret[3][2] = (n14 * n22 * n31 - n12 * n24 * n31 - n14 * n21 * n32 + n11 * n24 * n32 + n12 * n21 * n34 - n11 * n22 * n34) * idet;\r\n ret[3][3] = (n12 * n23 * n31 - n13 * n22 * n31 + n13 * n21 * n32 - n11 * n23 * n32 - n12 * n21 * n33 + n11 * n22 * n33) * idet;\r\n\r\n return ret;\r\n}\r\n\r\nfn matrix_inversefloat3x3(m: mat3x3<f32>) -> mat3x3<f32>{\r\n let n11 = m[0][0];\r\n let n12 = m[1][0];\r\n let n13 = m[2][0];\r\n let n21 = m[0][1];\r\n let n22 = m[1][1];\r\n let n23 = m[2][1];\r\n let n31 = m[0][2];\r\n let n32 = m[1][2];\r\n let n33 = m[2][2];\r\n\r\n let t11 = n22 * n33 - n23 * n32;\r\n let t12 = n13 * n32 - n12 * n33;\r\n let t13 = n12 * n23 - n13 * n22;\r\n\r\n let det = n11 * t11 + n21 * t12 + n31 * t13;\r\n let idet = 1.0 / det;\r\n\r\n var ret: mat3x3<f32> = mat3x3<f32>();\r\n\r\n ret[0][0] = t11 * idet;\r\n ret[0][1] = (n23 * n31 - n21 * n33) * idet;\r\n ret[0][2] = (n21 * n32 - n22 * n31) * idet;\r\n\r\n ret[1][0] = t12 * idet;\r\n ret[1][1] = (n11 * n33 - n13 * n31) * idet;\r\n ret[1][2] = (n12 * n31 - n11 * n32) * idet;\r\n\r\n ret[2][0] = t13 * idet;\r\n ret[2][1] = (n13 * n21 - n11 * n23) * idet;\r\n ret[2][2] = (n11 * n22 - n12 * n21) * idet;\r\n\r\n return ret;\r\n}\r\n\r\nfn matrix_inversefloat2x2(m: mat2x2<f32>) -> mat2x2<f32> {\r\n let n11 = m[0][0];\r\n let n12 = m[1][0];\r\n let n21 = m[0][1];\r\n let n22 = m[1][1];\r\n\r\n let det = n11 * n22 - n12 * n21;\r\n let idet = 1.0 / det;\r\n\r\n var ret: mat2x2<f32> = mat2x2<f32>();\r\n\r\n ret[0][0] = n22 * idet;\r\n ret[0][1] = -n12 * idet;\r\n ret[1][0] = -n21 * idet;\r\n ret[1][1] = n11 * idet;\r\n\r\n return ret;\r\n}\r\n\r\nfn matrix_transposefloat2x2(m: mat2x2<f32>) -> mat2x2<f32> {\r\n return mat2x2<f32>(m[0][0], m[1][0], m[0][1], m[1][1]);\r\n}\r\n\r\nfn matrix_transposefloat3x3(m: mat3x3<f32>) -> mat3x3<f32> {\r\n return mat3x3<f32>\r\n (\r\n m[0][0], m[1][0], m[2][0],\r\n m[0][1], m[1][1], m[2][1],\r\n m[0][2], m[1][2], m[2][2]\r\n );\r\n}\r\n\r\nfn matrix_transposefloat4x4(m: mat4x4<f32>) -> mat4x4<f32> {\r\n return mat4x4<f32>\r\n (\r\n m[0][0], m[1][0], m[2][0], m[3][0],\r\n m[0][1], m[1][1], m[2][1], m[3][1],\r\n m[0][2], m[1][2], m[2][2], m[3][2],\r\n m[0][3], m[1][3], m[2][3], m[3][3]\r\n );\r\n}\r\n\r\nfn bilerp_float(a: f32, b: f32, c: f32, d: f32, x: f32, y: f32) -> f32 {\r\n return mix(mix(a, b, x), mix(c, d, x), y);\r\n}\r\n\r\nfn bilerp_float2(a: vec2<f32>, b: vec2<f32>, c: vec2<f32>, d: vec2<f32>, x: f32, y: f32) -> vec2<f32> {\r\n return mix(mix(a, b, x), mix(c, d, x), y);\r\n}\r\n\r\nfn bilerp_float3(a: vec3<f32>, b: vec3<f32>, c: vec3<f32>, d: vec3<f32>, x: f32, y: f32) -> vec3<f32> {\r\n return mix(mix(a, b, x), mix(c, d, x), y);\r\n}\r\n\r\nfn bilerp_float4(a: vec4<f32>, b: vec4<f32>, c: vec4<f32>, d: vec4<f32>, x: f32, y: f32) -> vec4<f32> {\r\n return mix(mix(a, b, x), mix(c, d, x), y);\r\n}\r\n\r\nfn bilerp_float2x2(a: mat2x2<f32>, b: mat2x2<f32>, c: mat2x2<f32>, d: mat2x2<f32>, x: f32, y: f32) -> mat2x2<f32> {\r\n return mat2x2<f32>\r\n (\r\n bilerp_float(a[0][0], b[0][0], c[0][0], d[0][0], x, y),\r\n bilerp_float(a[0][1], b[0][1], c[0][1], d[0][1], x, y),\r\n bilerp_float(a[1][0], b[1][0], c[1][0], d[1][0], x, y),\r\n bilerp_float(a[1][1], b[1][1], c[1][1], d[1][1], x, y)\r\n );\r\n}\r\n\r\nfn bilerp_float3x3(a: mat3x3<f32>, b: mat3x3<f32>, c: mat3x3<f32>, d: mat3x3<f32>, x: f32, y: f32) -> mat3x3<f32> {\r\n return mat3x3<f32>\r\n (\r\n bilerp_float(a[0][0], b[0][0], c[0][0], d[0][0], x, y),\r\n bilerp_float(a[0][1], b[0][1], c[0][1], d[0][1], x, y),\r\n bilerp_float(a[0][2], b[0][2], c[0][2], d[0][2], x, y),\r\n bilerp_float(a[1][0], b[1][0], c[1][0], d[1][0], x, y),\r\n bilerp_float(a[1][1], b[1][1], c[1][1], d[1][1], x, y),\r\n bilerp_float(a[1][2], b[1][2], c[1][2], d[1][2], x, y),\r\n bilerp_float(a[2][0], b[2][0], c[2][0], d[2][0], x, y),\r\n bilerp_float(a[2][1], b[2][1], c[2][1], d[2][1], x, y),\r\n bilerp_float(a[2][2], b[2][2], c[2][2], d[2][2], x, y)\r\n );\r\n}\r\n\r\nfn bilerp_float4x4(a: mat4x4<f32>, b: mat4x4<f32>, c: mat4x4<f32>, d: mat4x4<f32>, x: f32, y: f32) -> mat4x4<f32> {\r\n return mat4x4<f32>\r\n (\r\n bilerp_float(a[0][0], b[0][0], c[0][0], d[0][0], x, y),\r\n bilerp_float(a[0][1], b[0][1], c[0][1], d[0][1], x, y),\r\n bilerp_float(a[0][2], b[0][2], c[0][2], d[0][2], x, y),\r\n bilerp_float(a[0][3], b[0][3], c[0][3], d[0][3], x, y),\r\n bilerp_float(a[1][0], b[1][0], c[1][0], d[1][0], x, y),\r\n bilerp_float(a[1][1], b[1][1], c[1][1], d[1][1], x, y),\r\n bilerp_float(a[1][2], b[1][2], c[1][2], d[1][2], x, y),\r\n bilerp_float(a[1][3], b[1][3], c[1][3], d[1][3], x, y),\r\n bilerp_float(a[2][0], b[2][0], c[2][0], d[2][0], x, y),\r\n bilerp_float(a[2][1], b[2][1], c[2][1], d[2][1], x, y),\r\n bilerp_float(a[2][2], b[2][2], c[2][2], d[2][2], x, y),\r\n bilerp_float(a[2][3], b[2][3], c[2][3], d[2][3], x, y),\r\n bilerp_float(a[3][0], b[3][0], c[3][0], d[3][0], x, y),\r\n bilerp_float(a[3][1], b[3][1], c[3][1], d[3][1], x, y),\r\n bilerp_float(a[3][2], b[3][2], c[3][2], d[3][2], x, y),\r\n bilerp_float(a[3][3], b[3][3], c[3][3], d[3][3], x, y)\r\n );\r\n}";
function validate(file, ast, checker) {
performance.now();
const errors2 = [];
function add(e) {
if (e) {
if (Array.isArray(e)) {
errors2.push(...e);
} else {
errors2.push(e);
}
}
}
function visit(ctx) {
ctx.node.forEachChild(
(node2) => visit({
...ctx,
node: node2
})
);
if (ctx.node.kind == ts.SyntaxKind.PropertyAccessExpression) {
if (ts.isPropertyAccessExpression(ctx.node)) {
add(validatePropertyAccessExpression(ctx, ctx.node));
}
} else if (ctx.node.kind == ts.SyntaxKind.ConditionalExpression) {
if (ts.isConditionalExpression(ctx.node)) {
add(validateConditionalExpression(ctx, ctx.node));
}
} else if (ctx.node.kind == ts.SyntaxKind.CallExpression) {
if (ts.isCallExpression(ctx.node)) {
add(validateCallExpression(ctx, ctx.node));
}
}
}
visit({
file,
ast,
checker,
node: ast
});
return errors2;
}
function validateGraph(env2, file, ast, checker) {
performance.now();
const errors2 = [];
function add(e) {
if (e) {
if (Array.isArray(e)) {
errors2.push(...e);
} else {
errors2.push(e);
}
}
}
function visit(ctx) {
ctx.node.forEachChild(
(node2) => visit({
...ctx,
node: node2
})
);
if (ts.isCallExpression(ctx.node)) {
let lhsType = checker?.getTypeAtLocation(ctx.node.getChildAt(0));
let sig = lhsType?.getCallSignatures();
if (sig && sig[0] && sig[0].getDeclaration()) {
let declaration = sig[0].getDeclaration();
if (ts.isIdentifier(ctx.node.expression) && ctx.node.expression.text == "makeShader") {
checker?.getTypeAtLocation(declaration);
if (ctx.node.arguments.length >= 2) {
if (ts.isArrowFunction(ctx.node.arguments[1])) {
add(validateShaderCalls(env2, ctx, ctx.node.arguments[1]));
}
}
}
}
}
if (ts.isExpressionStatement(ctx.node)) {
add(validateStatement(ctx, ctx.node));
}
if (ts.isArrayLiteralExpression(ctx.node)) {
add(validateArrayLiteral(ctx, ctx.node));
}
}
visit({
file,
ast,
checker,
node: ast
});
return errors2;
}
function isStaticPropertyAccessExpression(checker, node2) {
let resultType = checker.getSymbolAtLocation(node2);
if (!resultType)
return false;
let tos = checker.getTypeOfSymbolAtLocation(resultType, node2);
let isStaticMember = false;
if (resultType.parent) {
let p = resultType.parent;
if (p.valueDeclaration && p.name != "__" && !ts.isSourceFile(p.valueDeclaration) && p.flags & ts.SymbolFlags.Namespace) {
isStaticMember = true;
}
}
tos.getCallSignatures().forEach((s) => {
if (s.declaration) {
s.declaration.modifiers?.forEach((m) => {
if (m.kind == ts.SyntaxKind.StaticKeyword) {
isStaticMember = true;
}
});
}
});
return isStaticMember;
}
function validateStatement({ checker, file }, node2) {
if (ts.isLiteralExpression(node2.expression) || ts.isPropertyAccessChain(node2.expression) || ts.isPropertyAccessExpression(node2.expression) || ts.isIdentifier(node2.expression)) {
return {
file: node2.getSourceFile(),
code: 0,
messageText: `This expression has no effect`,
category: ts.DiagnosticCategory.Error,
start: node2.getStart(),
length: node2.getEnd() - node2.getStart()
};
}
}
function validateConditionalExpression({ checker, file }, node2) {
let thenType = checker.getTypeAtLocation(node2.whenTrue);
let elseType = checker.getTypeAtLocation(node2.whenFalse);
if (!isTypeCompatible(checker, thenType, elseType)) {
return void 0;
}
return void 0;
}
function validateCallExpression({ checker, file }, node2) {
if (ts.isPropertyAccessExpression(node2.expression)) {
let left = node2.expression.expression;
if (!ts.isIdentifier(left))
return void 0;
if (left.text != "__")
return void 0;
let right = node2.expression.name.text;
if (right.startsWith("int") && (right[right.length - 1] == "2" || right[right.length - 1] == "3" || right[right.length - 1] == "4")) {
for (let i = 0; i < node2.arguments.length; i++) {
let arg = node2.arguments[i];
let type2 = checker.getTypeAtLocation(arg);
let typeName = checker.typeToString(type2);
if (typeName.startsWith("uint")) {
if (node2.arguments.length != 1) {
return {
file: node2.getSourceFile(),
code: 0,
messageText: `Cannot convert from uint to int during vector construction, use int() before`,
category: ts.DiagnosticCategory.Error,
start: arg.getStart(),
length: arg.getEnd() - arg.getStart()
};
}
}
}
}
}
return void 0;
}
function validatePropertyAccessExpression({ checker, file }, node2) {
let midNode = node2.getChildren()[1];
if (file.mapping && midNode) {
let range2 = lookupIndexMappingRange(file.mapping, midNode.getStart(), midNode.getEnd());
let s = file.content.substring(range2.start, range2.end);
let isStaticAccess = s == "::";
let resultType = checker.getSymbolAtLocation(node2);
if (resultType) {
let tos = checker.getTypeOfSymbolAtLocation(resultType, node2);
let isStaticMember = false;
if (resultType.parent) {
let p = resultType.parent;
if (p.valueDeclaration && p.name != "__" && !ts.isSourceFile(p.valueDeclaration) && p.flags & ts.SymbolFlags.Namespace) {
isStaticMember = true;
}
}
tos.getCallSignatures().forEach((s2) => {
if (s2.declaration) {
s2.declaration.modifiers?.forEach((m) => {
if (m.kind == ts.SyntaxKind.StaticKeyword) {
isStaticMember = true;
}
});
}
});
resultType.getDeclarations()?.forEach((d) => {
if (ts.canHaveModifiers(d) && d.modifiers) {
d.modifiers.forEach((m) => {
if (m.kind == ts.SyntaxKind.StaticKeyword) {
isStaticMember = true;
}
});
}
});
if (isStaticMember && !isStaticAccess) {
return {
file: node2.getSourceFile(),
code: 0,
messageText: `Cannot access static member with '${s}' use '::' instead`,
category: ts.DiagnosticCategory.Error,
start: midNode.getStart(),
length: midNode.getEnd() - midNode.getStart()
};
} else if (!isStaticMember && isStaticAccess) {
return {
file: node2.getSourceFile(),
code: 0,
messageText: `Cannot access non-static member with '${s}' use '.' instead`,
category: ts.DiagnosticCategory.Error,
start: midNode.getStart(),
length: midNode.getEnd() - midNode.getStart()
};
}
}
}
return void 0;
}
function isTypeCompatible(checker, type2, typeOther) {
return checker.isTypeAssignableTo(type2, typeOther);
}
function validateArrayLiteral({ checker, file }, node2) {
if (node2.elements.length == 3) {
let name1 = checker.typeToString(checker.getTypeAtLocation(node2.elements[0]));
let name2 = checker.typeToString(checker.getTypeAtLocation(node2.elements[1]));
let name3 = checker.typeToString(checker.getTypeAtLocation(node2.elements[2]));
if (name1 == "0" && name2 == "shader" && name3 == "0") {
return void 0;
}
}
return void 0;
}
const SHADER_TYPE_BLACKLIST = ["string", "null", "map"];
function validateShaderTypeUse(env2, { checker, file }, diags, node2, typeNode) {
let type2 = checker.typeToString(typeNode);
if (SHADER_TYPE_BLACKLIST.includes(type2) || type2.startsWith("map<")) {
diags.push({
file: node2.getSourceFile(),
code: 0,
messageText: `Cannot use type '${type2}' in shader`,
category: ts.DiagnosticCategory.Error,
start: node2.getStart(),
length: node2.getEnd() - node2.getStart()
});
}
if (typeNode.isUnion() && type2 != "boolean") {
diags.push({
file: node2.getSourceFile(),
code: 0,
messageText: `Cannot use union types in shaders ('${type2}')`,
category: ts.DiagnosticCategory.Error,
start: node2.getStart(),
length: node2.getEnd() - node2.getStart()
});
}
if (typeNode.isLiteral()) {
diags.push({
file: node2.getSourceFile(),
code: 0,
messageText: `Cannot use literal types in shaders ('${type2}')`,
category: ts.DiagnosticCategory.Error,
start: node2.getStart(),
length: node2.getEnd() - node2.getStart()
});
}
}
function validateShaderCalls(env2, vs, node2) {
let diags = [];
const { checker, file } = vs;
let visit = (node22) => {
if (ts.isCallExpression(node22)) {
let declar = getFunctionDeclarationFromCallExpression(checker, node22);
if (declar) {
let graphNodeName = getFunctionNodeName(declar);
let graphNode = env2.tagGraph.getNode(graphNodeName);
if (graphNode) {
if (graphNode.tags.includes("async")) {
let rawChain = env2.tagGraph.resolveTagSourceChain(graphNodeName, "async");
let chain = rawChain.map((m) => m.split(":")[1]).join(" <- ");
if (rawChain[rawChain.length - 1].split(":")[1] == "texture2d_internal_empty")
;
else {
diags.push({
file: node22.getSourceFile(),
code: 0,
messageText: `Cannot call cpu-only function from a shader. ${chain}`,
category: ts.DiagnosticCategory.Error,
start: node22.getStart(),
length: node22.getEnd() - node22.getStart()
});
}
}
}
}
validateShaderTypeUse(env2, vs, diags, node22, checker.getTypeAtLocation(node22));
}
if (ts.isPropertyAccessExpression(node22)) {
validateShaderTypeUse(env2, vs, diags, node22, checker.getTypeAtLocation(node22));
}
if (ts.isIdentifier(node22)) {
validateShaderTypeUse(env2, vs, diags, node22, checker.getTypeAtLocation(node22));
}
if (ts.isElementAccessExpression(node22)) {
validateShaderTypeUse(env2, vs, diags, node22, checker.getTypeAtLocation(node22));
}
if (ts.isVariableDeclaration(node22)) {
let arrType = checker.getTypeAtLocation(node22);
let typeInfo = getArrayTypeInfo(checker, arrType);
if (typeInfo.isArray) {
if (typeInfo.staticSize <= 0) {
diags.push({
file: node22.getSourceFile(),
code: 0,
messageText: `Please explicitly specify the size of the array (let a: T[10] = ...)`,
category: ts.DiagnosticCategory.Error,
start: node22.getStart(),
length: node22.getEnd() - node22.getStart()
});
}
}
}
ts.forEachChild(node22, visit);
};
ts.forEachChild(node2, visit);
return diags;
}
var tsutils = {};
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var extendStatics = function(d, b) {
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
d2.__proto__ = b2;
} || function(d2, b2) {
for (var p in b2)
if (b2.hasOwnProperty(p))
d2[p] = b2[p];
};
return extendStatics(d, b);
};
function __extends(d, b) {
extendStatics(d, b);
function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
var __assign = function() {
__assign = Object.assign || function __assign2(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s)
if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
function __rest(s, e) {
var t = {};
for (var p in s)
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
}
function __decorate(decorators, target, key, desc) {
var c2 = arguments.length, r = c2 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
r = Reflect.decorate(decorators, target, key, desc);
else
for (var i = decorators.length - 1; i >= 0; i--)
if (d = decorators[i])
r = (c2 < 3 ? d(r) : c2 > 3 ? d(target, key, r) : d(target, key)) || r;
return c2 > 3 && r && Object.defineProperty(target, key, r), r;
}
function __param(paramIndex, decorator) {
return function(target, key) {
decorator(target, key, paramIndex);
};
}
function __metadata(metadataKey, metadataValue) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
return Reflect.metadata(metadataKey, metadataValue);
}
function __awaiter(thisArg, _arguments, P, generator) {
function adopt(value) {
return value instanceof P ? value : new P(function(resolve) {
resolve(value);
});
}
return new (P || (P = Promise))(function(resolve, reject) {
function fulfilled(value) {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
}
function rejected(value) {
try {
step(generator["throw"](value));
} catch (e) {
reject(e);
}
}
function step(result) {
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
}
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
}
function __generator(thisArg, body) {
var _ = { label: 0, sent: function() {
if (t[0] & 1)
throw t[1];
return t[1];
}, trys: [], ops: [] }, f, y, t, g2;
return g2 = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g2[Symbol.iterator] = function() {
return this;
}), g2;
function verb(n) {
return function(v) {
return step([n, v]);
};
}
function step(op) {
if (f)
throw new TypeError("Generator is already executing.");
while (_)
try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
return t;
if (y = 0, t)
op = [op[0] & 2, t.value];
switch (op[0]) {
case 0:
case 1:
t = op;
break;
case 4:
_.label++;
return { value: op[1], done: false };
case 5:
_.label++;
y = op[1];
op = [0];
continue;
case 7:
op = _.ops.pop();
_.trys.pop();
continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
_ = 0;
continue;
}
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
_.label = op[1];
break;
}
if (op[0] === 6 && _.label < t[1]) {
_.label = t[1];
t = op;
break;
}
if (t && _.label < t[2]) {
_.label = t[2];
_.ops.push(op);
break;
}
if (t[2])
_.ops.pop();
_.trys.pop();
continue;
}
op = body.call(thisArg, _);
} catch (e) {
op = [6, e];
y = 0;
} finally {
f = t = 0;
}
if (op[0] & 5)
throw op[1];
return { value: op[0] ? op[1] : void 0, done: true };
}
}
function __createBinding(o, m, k, k2) {
if (k2 === void 0)
k2 = k;
o[k2] = m[k];
}
function __exportStar(m, exports) {
for (var p in m)
if (p !== "default" && !exports.hasOwnProperty(p))
exports[p] = m[p];
}
function __values(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m)
return m.call(o);
if (o && typeof o.length === "number")
return {
next: function() {
if (o && i >= o.length)
o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
}
function __read(o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m)
return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
ar.push(r.value);
} catch (error) {
e = { error };
} finally {
try {
if (r && !r.done && (m = i["return"]))
m.call(i);
} finally {
if (e)
throw e.error;
}
}
return ar;
}
function __spread() {
for (var ar = [], i = 0; i < arguments.length; i++)
ar = ar.concat(__read(arguments[i]));
return ar;
}
function __spreadArrays() {
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
}
function __await(v) {
return this instanceof __await ? (this.v = v, this) : new __await(v);
}
function __asyncGenerator(thisArg, _arguments, generator) {
if (!Symbol.asyncIterator)
throw new TypeError("Symbol.asyncIterator is not defined.");
var g2 = generator.apply(thisArg, _arguments || []), i, q = [];
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
return this;
}, i;
function verb(n) {
if (g2[n])
i[n] = function(v) {
return new Promise(function(a, b) {
q.push([n, v, a, b]) > 1 || resume(n, v);
});
};
}
function resume(n, v) {
try {
step(g2[n](v));
} catch (e) {
settle(q[0][3], e);
}
}
function step(r) {
r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);
}
function fulfill(value) {
resume("next", value);
}
function reject(value) {
resume("throw", value);
}
function settle(f, v) {
if (f(v), q.shift(), q.length)
resume(q[0][0], q[0][1]);
}
}
function __asyncDelegator(o) {
var i, p;
return i = {}, verb("next"), verb("throw", function(e) {
throw e;
}), verb("return"), i[Symbol.iterator] = function() {
return this;
}, i;
function verb(n, f) {
i[n] = o[n] ? function(v) {
return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v;
} : f;
}
}
function __asyncValues(o) {
if (!Symbol.asyncIterator)
throw new TypeError("Symbol.asyncIterator is not defined.");
var m = o[Symbol.asyncIterator], i;
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
return this;
}, i);
function verb(n) {
i[n] = o[n] && function(v) {
return new Promise(function(resolve, reject) {
v = o[n](v), settle(resolve, reject, v.done, v.value);
});
};
}
function settle(resolve, reject, d, v) {
Promise.resolve(v).then(function(v2) {
resolve({ value: v2, done: d });
}, reject);
}
}
function __makeTemplateObject(cooked, raw) {
if (Object.defineProperty) {
Object.defineProperty(cooked, "raw", { value: raw });
} else {
cooked.raw = raw;
}
return cooked;
}
function __importStar(mod) {
if (mod && mod.__esModule)
return mod;
var result = {};
if (mod != null) {
for (var k in mod)
if (Object.hasOwnProperty.call(mod, k))
result[k] = mod[k];
}
result.default = mod;
return result;
}
function __importDefault(mod) {
return mod && mod.__esModule ? mod : { default: mod };
}
function __classPrivateFieldGet(receiver, privateMap) {
if (!privateMap.has(receiver)) {
throw new TypeError("attempted to get private field on non-instance");
}
return privateMap.get(receiver);
}
function __classPrivateFieldSet(receiver, privateMap, value) {
if (!privateMap.has(receiver)) {
throw new TypeError("attempted to set private field on non-instance");
}
privateMap.set(receiver, value);
return value;
}
const tslib_es6 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
get __assign() {
return __assign;
},
__asyncDelegator,
__asyncGenerator,
__asyncValues,
__await,
__awaiter,
__classPrivateFieldGet,
__classPrivateFieldSet,
__createBinding,
__decorate,
__exportStar,
__extends,
__generator,
__importDefault,
__importStar,
__makeTemplateObject,
__metadata,
__param,
__read,
__rest,
__spread,
__spreadArrays,
__values
}, Symbol.toStringTag, { value: "Module" }));
const require$$0 = /* @__PURE__ */ getAugmentedNamespace(tslib_es6);
var typeguard = {};
var node$4 = {};
var node$3 = {};
var node$2 = {};
var node$1 = {};
var node = {};
var hasRequiredNode$4;
function requireNode$4() {
if (hasRequiredNode$4)
return node;
hasRequiredNode$4 = 1;
Object.defineProperty(node, "__esModule", { value: true });
node.isExpressionStatement = node.isExpression = node.isExportSpecifier = node.isExportDeclaration = node.isExportAssignment = node.isEnumMember = node.isEnumDeclaration = node.isEntityNameExpression = node.isEntityName = node.isEmptyStatement = node.isElementAccessExpression = node.isDoStatement = node.isDeleteExpression = node.isDefaultClause = node.isDecorator = node.isDebuggerStatement = node.isComputedPropertyName = node.isContinueStatement = node.isConstructSignatureDeclaration = node.isConstructorTypeNode = node.isConstructorDeclaration = node.isConditionalTypeNode = node.isConditionalExpression = node.isCommaListExpression = node.isClassLikeDeclaration = node.isClassExpression = node.isClassDeclaration = node.isCatchClause = node.isCaseOrDefaultClause = node.isCaseClause = node.isCaseBlock = node.isCallSignatureDeclaration = node.isCallLikeExpression = node.isCallExpression = node.isBreakStatement = node.isBreakOrContinueStatement = node.isBooleanLiteral = node.isBlockLike = node.isBlock = node.isBindingPattern = node.isBindingElement = node.isBinaryExpression = node.isAwaitExpression = node.isAssertionExpression = node.isAsExpression = node.isArrowFunction = node.isArrayTypeNode = node.isArrayLiteralExpression = node.isArrayBindingPattern = node.isAccessorDeclaration = void 0;
node.isNamespaceImport = node.isNamespaceDeclaration = node.isNamedImports = node.isNamedExports = node.isModuleDeclaration = node.isModuleBlock = node.isMethodSignature = node.isMethodDeclaration = node.isMetaProperty = node.isMappedTypeNode = node.isLiteralTypeNode = node.isLiteralExpression = node.isLabeledStatement = node.isJsxText = node.isJsxSpreadAttribute = node.isJsxSelfClosingElement = node.isJsxOpeningLikeElement = node.isJsxOpeningFragment = node.isJsxOpeningElement = node.isJsxFragment = node.isJsxExpression = node.isJsxElement = node.isJsxClosingFragment = node.isJsxClosingElement = node.isJsxAttributes = node.isJsxAttributeLike = node.isJsxAttribute = node.isJsDoc = node.isIterationStatement = node.isIntersectionTypeNode = node.isInterfaceDeclaration = node.isInferTypeNode = node.isIndexSignatureDeclaration = node.isIndexedAccessTypeNode = node.isImportSpecifier = node.isImportEqualsDeclaration = node.isImportDeclaration = node.isImportClause = node.isIfStatement = node.isIdentifier = node.isGetAccessorDeclaration = node.isFunctionTypeNode = node.isFunctionExpression = node.isFunctionDeclaration = node.isForStatement = node.isForOfStatement = node.isForInOrOfStatement = node.isForInStatement = node.isExternalModuleReference = node.isExpressionWithTypeArguments = void 0;
node.isVariableStatement = node.isVariableDeclaration = node.isUnionTypeNode = node.isTypeQueryNode = node.isTypeReferenceNode = node.isTypePredicateNode = node.isTypeParameterDeclaration = node.isTypeOperatorNode = node.isTypeOfExpression = node.isTypeLiteralNode = node.isTypeAssertion = node.isTypeAliasDeclaration = node.isTupleTypeNode = node.isTryStatement = node.isThrowStatement = node.isTextualLiteral = node.isTemplateLiteral = node.isTemplateExpression = node.isTaggedTemplateExpression = node.isSyntaxList = node.isSwitchStatement = node.isStringLiteral = node.isSpreadElement = node.isSpreadAssignment = node.isSourceFile = node.isSignatureDeclaration = node.isShorthandPropertyAssignment = node.isSetAccessorDeclaration = node.isReturnStatement = node.isRegularExpressionLiteral = node.isQualifiedName = node.isPropertySignature = node.isPropertyDeclaration = node.isPropertyAssignment = node.isPropertyAccessExpression = node.isPrefixUnaryExpression = node.isPostfixUnaryExpression = node.isParenthesizedTypeNode = node.isParenthesizedExpression = node.isParameterDeclaration = node.isOmittedExpression = node.isObjectLiteralExpression = node.isObjectBindingPattern = node.isNumericOrStringLikeLiteral = node.isNumericLiteral = node.isNullLiteral = node.isNoSubstitutionTemplateLiteral = node.isNonNullExpression = node.isNewExpression = node.isNamespaceExportDeclaration = void 0;
node.isWithStatement = node.isWhileStatement = node.isVoidExpression = node.isVariableDeclarationList = void 0;
const ts$1 = ts;
function isAccessorDeclaration(node2) {
return node2.kind === ts$1.SyntaxKind.GetAccessor || node2.kind === ts$1.SyntaxKind.SetAccessor;
}
node.isAccessorDeclaration = isAccessorDeclaration;
function isArrayBindingPattern(node2) {
return node2.kind === ts$1.SyntaxKind.ArrayBindingPattern;
}
node.isArrayBindingPattern = isArrayBindingPattern;
function isArrayLiteralExpression(node2) {
return node2.kind === ts$1.SyntaxKind.ArrayLiteralExpression;
}
node.isArrayLiteralExpression = isArrayLiteralExpression;
function isArrayTypeNode2(node2) {
return node2.kind === ts$1.SyntaxKind.ArrayType;
}
node.isArrayTypeNode = isArrayTypeNode2;
function isArrowFunction(node2) {
return node2.kind === ts$1.SyntaxKind.ArrowFunction;
}
node.isArrowFunction = isArrowFunction;
function isAsExpression(node2) {
return node2.kind === ts$1.SyntaxKind.AsExpression;
}
node.isAsExpression = isAsExpression;
function isAssertionExpression(node2) {
return node2.kind === ts$1.SyntaxKind.AsExpression || node2.kind === ts$1.SyntaxKind.TypeAssertionExpression;
}
node.isAssertionExpression = isAssertionExpression;
function isAwaitExpression(node2) {
return node2.kind === ts$1.SyntaxKind.AwaitExpression;
}
node.isAwaitExpression = isAwaitExpression;
function isBinaryExpression(node2) {
return node2.kind === ts$1.SyntaxKind.BinaryExpression;
}
node.isBinaryExpression = isBinaryExpression;
function isBindingElement(node2) {
return node2.kind === ts$1.SyntaxKind.BindingElement;
}
node.isBindingElement = isBindingElement;
function isBindingPattern(node2) {
return node2.kind === ts$1.SyntaxKind.ArrayBindingPattern || node2.kind === ts$1.SyntaxKind.ObjectBindingPattern;
}
node.isBindingPattern = isBindingPattern;
function isBlock(node2) {
return node2.kind === ts$1.SyntaxKind.Block;
}
node.isBlock = isBlock;
function isBlockLike(node2) {
return node2.statements !== void 0;
}
node.isBlockLike = isBlockLike;
function isBooleanLiteral(node2) {
return node2.kind === ts$1.SyntaxKind.TrueKeyword || node2.kind === ts$1.SyntaxKind.FalseKeyword;
}
node.isBooleanLiteral = isBooleanLiteral;
function isBreakOrContinueStatement(node2) {
return node2.kind === ts$1.SyntaxKind.BreakStatement || node2.kind === ts$1.SyntaxKind.ContinueStatement;
}
node.isBreakOrContinueStatement = isBreakOrContinueStatement;
function isBreakStatement(node2) {
return node2.kind === ts$1.SyntaxKind.BreakStatement;
}
node.isBreakStatement = isBreakStatement;
function isCallExpression2(node2) {
return node2.kind === ts$1.SyntaxKind.CallExpression;
}
node.isCallExpression = isCallExpression2;
function isCallLikeExpression(node2) {
switch (node2.kind) {
case ts$1.SyntaxKind.CallExpression:
case ts$1.SyntaxKind.Decorator:
case ts$1.SyntaxKind.JsxOpeningElement:
case ts$1.SyntaxKind.JsxSelfClosingElement:
case ts$1.SyntaxKind.NewExpression:
case ts$1.SyntaxKind.TaggedTemplateExpression:
return true;
default:
return false;
}
}
node.isCallLikeExpression = isCallLikeExpression;
function isCallSignatureDeclaration(node2) {
return node2.kind === ts$1.SyntaxKind.CallSignature;
}
node.isCallSignatureDeclaration = isCallSignatureDeclaration;
function isCaseBlock(node2) {
return node2.kind === ts$1.SyntaxKind.CaseBlock;
}
node.isCaseBlock = isCaseBlock;
function isCaseClause(node2) {
return node2.kind === ts$1.SyntaxKind.CaseClause;
}
node.isCaseClause = isCaseClause;
function isCaseOrDefaultClause(node2) {
return node2.kind === ts$1.SyntaxKind.CaseClause || node2.kind === ts$1.SyntaxKind.DefaultClause;
}
node.isCaseOrDefaultClause = isCaseOrDefaultClause;
function isCatchClause(node2) {
return node2.kind === ts$1.SyntaxKind.CatchClause;
}
node.isCatchClause = isCatchClause;
function isClassDeclaration(node2) {
return node2.kind === ts$1.SyntaxKind.ClassDeclaration;
}
node.isClassDeclaration = isClassDeclaration;
function isClassExpression(node2) {
return node2.kind === ts$1.SyntaxKind.ClassExpression;
}
node.isClassExpression = isClassExpression;
function isClassLikeDeclaration(node2) {
return node2.kind === ts$1.SyntaxKind.ClassDeclaration || node2.kind === ts$1.SyntaxKind.ClassExpression;
}
node.isClassLikeDeclaration = isClassLikeDeclaration;
function isCommaListExpression(node2) {
return node2.kind === ts$1.SyntaxKind.CommaListExpression;
}
node.isCommaListExpression = isCommaListExpression;
function isConditionalExpression(node2) {
return node2.kind === ts$1.SyntaxKind.ConditionalExpression;
}
node.isConditionalExpression = isConditionalExpression;
function isConditionalTypeNode(node2) {
return node2.kind === ts$1.SyntaxKind.ConditionalType;
}
node.isConditionalTypeNode = isConditionalTypeNode;
function isConstructorDeclaration(node2) {
return node2.kind === ts$1.SyntaxKind.Constructor;
}
node.isConstructorDeclaration = isConstructorDeclaration;
function isConstructorTypeNode(node2) {
return node2.kind === ts$1.SyntaxKind.ConstructorType;
}
node.isConstructorTypeNode = isConstructorTypeNode;
function isConstructSignatureDeclaration(node2) {
return node2.kind === ts$1.SyntaxKind.ConstructSignature;
}
node.isConstructSignatureDeclaration = isConstructSignatureDeclaration;
function isContinueStatement(node2) {
return node2.kind === ts$1.SyntaxKind.ContinueStatement;
}
node.isContinueStatement = isContinueStatement;
function isComputedPropertyName(node2) {
return node2.kind === ts$1.SyntaxKind.ComputedPropertyName;
}
node.isComputedPropertyName = isComputedPropertyName;
function isDebuggerStatement(node2) {
return node2.kind === ts$1.SyntaxKind.DebuggerStatement;
}
node.isDebuggerStatement = isDebuggerStatement;
function isDecorator(node2) {
return node2.kind === ts$1.SyntaxKind.Decorator;
}
node.isDecorator = isDecorator;
function isDefaultClause(node2) {
return node2.kind === ts$1.SyntaxKind.DefaultClause;
}
node.isDefaultClause = isDefaultClause;
function isDeleteExpression(node2) {
return node2.kind === ts$1.SyntaxKind.DeleteExpression;
}
node.isDeleteExpression = isDeleteExpression;
function isDoStatement(node2) {
return node2.kind === ts$1.SyntaxKind.DoStatement;
}
node.isDoStatement = isDoStatement;
function isElementAccessExpression(node2) {
return node2.kind === ts$1.SyntaxKind.ElementAccessExpression;
}
node.isElementAccessExpression = isElementAccessExpression;
function isEmptyStatement(node2) {
return node2.kind === ts$1.SyntaxKind.EmptyStatement;
}
node.isEmptyStatement = isEmptyStatement;
function isEntityName(node2) {
return node2.kind === ts$1.SyntaxKind.Identifier || isQualifiedName(node2);
}
node.isEntityName = isEntityName;
function isEntityNameExpression(node2) {
return node2.kind === ts$1.SyntaxKind.Identifier || isPropertyAccessExpression2(node2) && isEntityNameExpression(node2.expression);
}
node.isEntityNameExpression = isEntityNameExpression;
function isEnumDeclaration(node2) {
return node2.kind === ts$1.SyntaxKind.EnumDeclaration;
}
node.isEnumDeclaration = isEnumDeclaration;
function isEnumMember(node2) {
return node2.kind === ts$1.SyntaxKind.EnumMember;
}
node.isEnumMember = isEnumMember;
function isExportAssignment(node2) {
return node2.kind === ts$1.SyntaxKind.ExportAssignment;
}
node.isExportAssignment = isExportAssignment;
function isExportDeclaration(node2) {
return node2.kind === ts$1.SyntaxKind.ExportDeclaration;
}
node.isExportDeclaration = isExportDeclaration;
function isExportSpecifier(node2) {
return node2.kind === ts$1.SyntaxKind.ExportSpecifier;
}
node.isExportSpecifier = isExportSpecifier;
function isExpression(node2) {
switch (node2.kind) {
case ts$1.SyntaxKind.ArrayLiteralExpression:
case ts$1.SyntaxKind.ArrowFunction:
case ts$1.SyntaxKind.AsExpression:
case ts$1.SyntaxKind.AwaitExpression:
case ts$1.SyntaxKind.BinaryExpression:
case ts$1.SyntaxKind.CallExpression:
case ts$1.SyntaxKind.ClassExpression:
case ts$1.SyntaxKind.CommaListExpression:
case ts$1.SyntaxKind.ConditionalExpression:
case ts$1.SyntaxKind.DeleteExpression:
case ts$1.SyntaxKind.ElementAccessExpression:
case ts$1.SyntaxKind.FalseKeyword:
case ts$1.SyntaxKind.FunctionExpression:
case ts$1.SyntaxKind.Identifier:
case ts$1.SyntaxKind.JsxElement:
case ts$1.SyntaxKind.JsxFragment:
case ts$1.SyntaxKind.JsxExpression:
case ts$1.SyntaxKind.JsxOpeningElement:
case ts$1.SyntaxKind.JsxOpeningFragment:
case ts$1.SyntaxKind.JsxSelfClosingElement:
case ts$1.SyntaxKind.MetaProperty:
case ts$1.SyntaxKind.NewExpression:
case ts$1.SyntaxKind.NonNullExpression:
case ts$1.SyntaxKind.NoSubstitutionTemplateLiteral:
case ts$1.SyntaxKind.NullKeyword:
case ts$1.SyntaxKind.NumericLiteral:
case ts$1.SyntaxKind.ObjectLiteralExpression:
case ts$1.SyntaxKind.OmittedExpression:
case ts$1.SyntaxKind.ParenthesizedExpression:
case ts$1.SyntaxKind.PostfixUnaryExpression:
case ts$1.SyntaxKind.PrefixUnaryExpression:
case ts$1.SyntaxKind.PropertyAccessExpression:
case ts$1.SyntaxKind.RegularExpressionLiteral:
case ts$1.SyntaxKind.SpreadElement:
case ts$1.SyntaxKind.StringLiteral:
case ts$1.SyntaxKind.SuperKeyword:
case ts$1.SyntaxKind.TaggedTemplateExpression:
case ts$1.SyntaxKind.TemplateExpression:
case ts$1.SyntaxKind.ThisKeyword:
case ts$1.SyntaxKind.TrueKeyword:
case ts$1.SyntaxKind.TypeAssertionExpression:
case ts$1.SyntaxKind.TypeOfExpression:
case ts$1.SyntaxKind.VoidExpression:
case ts$1.SyntaxKind.YieldExpression:
return true;
default:
return false;
}
}
node.isExpression = isExpression;
function isExpressionStatement(node2) {
return node2.kind === ts$1.SyntaxKind.ExpressionStatement;
}
node.isExpressionStatement = isExpressionStatement;
function isExpressionWithTypeArguments(node2) {
return node2.kind === ts$1.SyntaxKind.ExpressionWithTypeArguments;
}
node.isExpressionWithTypeArguments = isExpressionWithTypeArguments;
function isExternalModuleReference(node2) {
return node2.kind === ts$1.SyntaxKind.ExternalModuleReference;
}
node.isExternalModuleReference = isExternalModuleReference;
function isForInStatement(node2) {
return node2.kind === ts$1.SyntaxKind.ForInStatement;
}
node.isForInStatement = isForInStatement;
function isForInOrOfStatement(node2) {
return node2.kind === ts$1.SyntaxKind.ForOfStatement || node2.kind === ts$1.SyntaxKind.ForInStatement;
}
node.isForInOrOfStatement = isForInOrOfStatement;
function isForOfStatement(node2) {
return node2.kind === ts$1.SyntaxKind.ForOfStatement;
}
node.isForOfStatement = isForOfStatement;
function isForStatement(node2) {
return node2.kind === ts$1.SyntaxKind.ForStatement;
}
node.isForStatement = isForStatement;
function isFunctionDeclaration(node2) {
return node2.kind === ts$1.SyntaxKind.FunctionDeclaration;
}
node.isFunctionDeclaration = isFunctionDeclaration;
function isFunctionExpression(node2) {
return node2.kind === ts$1.SyntaxKind.FunctionExpression;
}
node.isFunctionExpression = isFunctionExpression;
function isFunctionTypeNode(node2) {
return node2.kind === ts$1.SyntaxKind.FunctionType;
}
node.isFunctionTypeNode = isFunctionTypeNode;
function isGetAccessorDeclaration(node2) {
return node2.kind === ts$1.SyntaxKind.GetAccessor;
}
node.isGetAccessorDeclaration = isGetAccessorDeclaration;
function isIdentifier2(node2) {
return node2.kind === ts$1.SyntaxKind.Identifier;
}
node.isIdentifier = isIdentifier2;
function isIfStatement(node2) {
return node2.kind === ts$1.SyntaxKind.IfStatement;
}
node.isIfStatement = isIfStatement;
function isImportClause(node2) {
return node2.kind === ts$1.SyntaxKind.ImportClause;
}
node.isImportClause = isImportClause;
function isImportDeclaration(node2) {
return node2.kind === ts$1.SyntaxKind.ImportDeclaration;
}
node.isImportDeclaration = isImportDeclaration;
function isImportEqualsDeclaration(node2) {
return node2.kind === ts$1.SyntaxKind.ImportEqualsDeclaration;
}
node.isImportEqualsDeclaration = isImportEqualsDeclaration;
function isImportSpecifier(node2) {
return node2.kind === ts$1.SyntaxKind.ImportSpecifier;
}
node.isImportSpecifier = isImportSpecifier;
function isIndexedAccessTypeNode(node2) {
return node2.kind === ts$1.SyntaxKind.IndexedAccessType;
}
node.isIndexedAccessTypeNode = isIndexedAccessTypeNode;
function isIndexSignatureDeclaration(node2) {
return node2.kind === ts$1.SyntaxKind.IndexSignature;
}
node.isIndexSignatureDeclaration = isIndexSignatureDeclaration;
function isInferTypeNode(node2) {
return node2.kind === ts$1.SyntaxKind.InferType;
}
node.isInferTypeNode = isInferTypeNode;
function isInterfaceDeclaration(node2) {
return node2.kind === ts$1.SyntaxKind.InterfaceDeclaration;
}
node.isInterfaceDeclaration = isInterfaceDeclaration;
function isIntersectionTypeNode(node2) {
return node2.kind === ts$1.SyntaxKind.IntersectionType;
}
node.isIntersectionTypeNode = isIntersectionTypeNode;
function isIterationStatement(node2) {
switch (node2.kind) {
case ts$1.SyntaxKind.ForStatement:
case ts$1.SyntaxKind.ForOfStatement:
case ts$1.SyntaxKind.ForInStatement:
case ts$1.SyntaxKind.WhileStatement:
case ts$1.SyntaxKind.DoStatement:
return true;
default:
return false;
}
}
node.isIterationStatement = isIterationStatement;
function isJsDoc(node2) {
return node2.kind === ts$1.SyntaxKind.JSDocComment;
}
node.isJsDoc = isJsDoc;
function isJsxAttribute(node2) {
return node2.kind === ts$1.SyntaxKind.JsxAttribute;
}
node.isJsxAttribute = isJsxAttribute;
function isJsxAttributeLike(node2) {
return node2.kind === ts$1.SyntaxKind.JsxAttribute || node2.kind === ts$1.SyntaxKind.JsxSpreadAttribute;
}
node.isJsxAttributeLike = isJsxAttributeLike;
function isJsxAttributes(node2) {
return node2.kind === ts$1.SyntaxKind.JsxAttributes;
}
node.isJsxAttributes = isJsxAttributes;
function isJsxClosingElement(node2) {
return node2.kind === ts$1.SyntaxKind.JsxClosingElement;
}
node.isJsxClosingElement = isJsxClosingElement;
function isJsxClosingFragment(node2) {
return node2.kind === ts$1.SyntaxKind.JsxClosingFragment;
}
node.isJsxClosingFragment = isJsxClosingFragment;
function isJsxElement(node2) {
return node2.kind === ts$1.SyntaxKind.JsxElement;
}
node.isJsxElement = isJsxElement;
function isJsxExpression(node2) {
return node2.kind === ts$1.SyntaxKind.JsxExpression;
}
node.isJsxExpression = isJsxExpression;
function isJsxFragment(node2) {
return node2.kind === ts$1.SyntaxKind.JsxFragment;
}
node.isJsxFragment = isJsxFragment;
function isJsxOpeningElement(node2) {
return node2.kind === ts$1.SyntaxKind.JsxOpeningElement;
}
node.isJsxOpeningElement = isJsxOpeningElement;
function isJsxOpeningFragment(node2) {
return node2.kind === ts$1.SyntaxKind.JsxOpeningFragment;
}
node.isJsxOpeningFragment = isJsxOpeningFragment;
function isJsxOpeningLikeElement(node2) {
return node2.kind === ts$1.SyntaxKind.JsxOpeningElement || node2.kind === ts$1.SyntaxKind.JsxSelfClosingElement;
}
node.isJsxOpeningLikeElement = isJsxOpeningLikeElement;
function isJsxSelfClosingElement(node2) {
return node2.kind === ts$1.SyntaxKind.JsxSelfClosingElement;
}
node.isJsxSelfClosingElement = isJsxSelfClosingElement;
function isJsxSpreadAttribute(node2) {
return node2.kind === ts$1.SyntaxKind.JsxSpreadAttribute;
}
node.isJsxSpreadAttribute = isJsxSpreadAttribute;
function isJsxText(node2) {
return node2.kind === ts$1.SyntaxKind.JsxText;
}
node.isJsxText = isJsxText;
function isLabeledStatement(node2) {
return node2.kind === ts$1.SyntaxKind.LabeledStatement;
}
node.isLabeledStatement = isLabeledStatement;
function isLiteralExpression(node2) {
return node2.kind >= ts$1.SyntaxKind.FirstLiteralToken && node2.kind <= ts$1.SyntaxKind.LastLiteralToken;
}
node.isLiteralExpression = isLiteralExpression;
function isLiteralTypeNode(node2) {
return node2.kind === ts$1.SyntaxKind.LiteralType;
}
node.isLiteralTypeNode = isLiteralTypeNode;
function isMappedTypeNode(node2) {
return node2.kind === ts$1.SyntaxKind.MappedType;
}
node.isMappedTypeNode = isMappedTypeNode;
function isMetaProperty(node2) {
return node2.kind === ts$1.SyntaxKind.MetaProperty;
}
node.isMetaProperty = isMetaProperty;
function isMethodDeclaration(node2) {
return node2.kind === ts$1.SyntaxKind.MethodDeclaration;
}
node.isMethodDeclaration = isMethodDeclaration;
function isMethodSignature(node2) {
return node2.kind === ts$1.SyntaxKind.MethodSignature;
}
node.isMethodSignature = isMethodSignature;
function isModuleBlock(node2) {
return node2.kind === ts$1.SyntaxKind.ModuleBlock;
}
node.isModuleBlock = isModuleBlock;
function isModuleDeclaration(node2) {
return node2.kind === ts$1.SyntaxKind.ModuleDeclaration;
}
node.isModuleDeclaration = isModuleDeclaration;
function isNamedExports(node2) {
return node2.kind === ts$1.SyntaxKind.NamedExports;
}
node.isNamedExports = isNamedExports;
function isNamedImports(node2) {
return node2.kind === ts$1.SyntaxKind.NamedImports;
}
node.isNamedImports = isNamedImports;
function isNamespaceDeclaration(node2) {
return isModuleDeclaration(node2) && node2.name.kind === ts$1.SyntaxKind.Identifier && node2.body !== void 0 && (node2.body.kind === ts$1.SyntaxKind.ModuleBlock || isNamespaceDeclaration(node2.body));
}
node.isNamespaceDeclaration = isNamespaceDeclaration;
function isNamespaceImport(node2) {
return node2.kind === ts$1.SyntaxKind.NamespaceImport;
}
node.isNamespaceImport = isNamespaceImport;
function isNamespaceExportDeclaration(node2) {
return node2.kind === ts$1.SyntaxKind.NamespaceExportDeclaration;
}
node.isNamespaceExportDeclaration = isNamespaceExportDeclaration;
function isNewExpression(node2) {
return node2.kind === ts$1.SyntaxKind.NewExpression;
}
node.isNewExpression = isNewExpression;
function isNonNullExpression(node2) {
return node2.kind === ts$1.SyntaxKind.NonNullExpression;
}
node.isNonNullExpression = isNonNullExpression;
function isNoSubstitutionTemplateLiteral(node2) {
return node2.kind === ts$1.SyntaxKind.NoSubstitutionTemplateLiteral;
}
node.isNoSubstitutionTemplateLiteral = isNoSubstitutionTemplateLiteral;
function isNullLiteral(node2) {
return node2.kind === ts$1.SyntaxKind.NullKeyword;
}
node.isNullLiteral = isNullLiteral;
function isNumericLiteral(node2) {
return node2.kind === ts$1.SyntaxKind.NumericLiteral;
}
node.isNumericLiteral = isNumericLiteral;
function isNumericOrStringLikeLiteral(node2) {
switch (node2.kind) {
case ts$1.SyntaxKind.StringLiteral:
case ts$1.SyntaxKind.NumericLiteral:
case ts$1.SyntaxKind.NoSubstitutionTemplateLiteral:
return true;
default:
return false;
}
}
node.isNumericOrStringLikeLiteral = isNumericOrStringLikeLiteral;
function isObjectBindingPattern(node2) {
return node2.kind === ts$1.SyntaxKind.ObjectBindingPattern;
}
node.isObjectBindingPattern = isObjectBindingPattern;
function isObjectLiteralExpression(node2) {
return node2.kind === ts$1.SyntaxKind.ObjectLiteralExpression;
}
node.isObjectLiteralExpression = isObjectLiteralExpression;
function isOmittedExpression(node2) {
return node2.kind === ts$1.SyntaxKind.OmittedExpression;
}
node.isOmittedExpression = isOmittedExpression;
function isParameterDeclaration(node2) {
return node2.kind === ts$1.SyntaxKind.Parameter;
}
node.isParameterDeclaration = isParameterDeclaration;
function isParenthesizedExpression(node2) {
return node2.kind === ts$1.SyntaxKind.ParenthesizedExpression;
}
node.isParenthesizedExpression = isParenthesizedExpression;
function isParenthesizedTypeNode(node2) {
return node2.kind === ts$1.SyntaxKind.ParenthesizedType;
}
node.isParenthesizedTypeNode = isParenthesizedTypeNode;
function isPostfixUnaryExpression(node2) {
return node2.kind === ts$1.SyntaxKind.PostfixUnaryExpression;
}
node.isPostfixUnaryExpression = isPostfixUnaryExpression;
function isPrefixUnaryExpression(node2) {
return node2.kind === ts$1.SyntaxKind.PrefixUnaryExpression;
}
node.isPrefixUnaryExpression = isPrefixUnaryExpression;
function isPropertyAccessExpression2(node2) {
return node2.kind === ts$1.SyntaxKind.PropertyAccessExpression;
}
node.isPropertyAccessExpression = isPropertyAccessExpression2;
function isPropertyAssignment(node2) {
return node2.kind === ts$1.SyntaxKind.PropertyAssignment;
}
node.isPropertyAssignment = isPropertyAssignment;
function isPropertyDeclaration(node2) {
return node2.kind === ts$1.SyntaxKind.PropertyDeclaration;
}
node.isPropertyDeclaration = isPropertyDeclaration;
function isPropertySignature(node2) {
return node2.kind === ts$1.SyntaxKind.PropertySignature;
}
node.isPropertySignature = isPropertySignature;
function isQualifiedName(node2) {
return node2.kind === ts$1.SyntaxKind.QualifiedName;
}
node.isQualifiedName = isQualifiedName;
function isRegularExpressionLiteral(node2) {
return node2.kind === ts$1.SyntaxKind.RegularExpressionLiteral;
}
node.isRegularExpressionLiteral = isRegularExpressionLiteral;
function isReturnStatement(node2) {
return node2.kind === ts$1.SyntaxKind.ReturnStatement;
}
node.isReturnStatement = isReturnStatement;
function isSetAccessorDeclaration(node2) {
return node2.kind === ts$1.SyntaxKind.SetAccessor;
}
node.isSetAccessorDeclaration = isSetAccessorDeclaration;
function isShorthandPropertyAssignment(node2) {
return node2.kind === ts$1.SyntaxKind.ShorthandPropertyAssignment;
}
node.isShorthandPropertyAssignment = isShorthandPropertyAssignment;
function isSignatureDeclaration(node2) {
return node2.parameters !== void 0;
}
node.isSignatureDeclaration = isSignatureDeclaration;
function isSourceFile(node2) {
return node2.kind === ts$1.SyntaxKind.SourceFile;
}
node.isSourceFile = isSourceFile;
function isSpreadAssignment(node2) {
return node2.kind === ts$1.SyntaxKind.SpreadAssignment;
}
node.isSpreadAssignment = isSpreadAssignment;
function isSpreadElement(node2) {
return node2.kind === ts$1.SyntaxKind.SpreadElement;
}
node.isSpreadElement = isSpreadElement;
function isStringLiteral(node2) {
return node2.kind === ts$1.SyntaxKind.StringLiteral;
}
node.isStringLiteral = isStringLiteral;
function isSwitchStatement(node2) {
return node2.kind === ts$1.SyntaxKind.SwitchStatement;
}
node.isSwitchStatement = isSwitchStatement;
function isSyntaxList(node2) {
return node2.kind === ts$1.SyntaxKind.SyntaxList;
}
node.isSyntaxList = isSyntaxList;
function isTaggedTemplateExpression(node2) {
return node2.kind === ts$1.SyntaxKind.TaggedTemplateExpression;
}
node.isTaggedTemplateExpression = isTaggedTemplateExpression;
function isTemplateExpression(node2) {
return node2.kind === ts$1.SyntaxKind.TemplateExpression;
}
node.isTemplateExpression = isTemplateExpression;
function isTemplateLiteral(node2) {
return node2.kind === ts$1.SyntaxKind.TemplateExpression || node2.kind === ts$1.SyntaxKind.NoSubstitutionTemplateLiteral;
}
node.isTemplateLiteral = isTemplateLiteral;
function isTextualLiteral(node2) {
return node2.kind === ts$1.SyntaxKind.StringLiteral || node2.kind === ts$1.SyntaxKind.NoSubstitutionTemplateLiteral;
}
node.isTextualLiteral = isTextualLiteral;
function isThrowStatement(node2) {
return node2.kind === ts$1.SyntaxKind.ThrowStatement;
}
node.isThrowStatement = isThrowStatement;
function isTryStatement(node2) {
return node2.kind === ts$1.SyntaxKind.TryStatement;
}
node.isTryStatement = isTryStatement;
function isTupleTypeNode(node2) {
return node2.kind === ts$1.SyntaxKind.TupleType;
}
node.isTupleTypeNode = isTupleTypeNode;
function isTypeAliasDeclaration(node2) {
return node2.kind === ts$1.SyntaxKind.TypeAliasDeclaration;
}
node.isTypeAliasDeclaration = isTypeAliasDeclaration;
function isTypeAssertion(node2) {
return node2.kind === ts$1.SyntaxKind.TypeAssertionExpression;
}
node.isTypeAssertion = isTypeAssertion;
function isTypeLiteralNode(node2) {
return node2.kind === ts$1.SyntaxKind.TypeLiteral;
}
node.isTypeLiteralNode = isTypeLiteralNode;
function isTypeOfExpression(node2) {
return node2.kind === ts$1.SyntaxKind.TypeOfExpression;
}
node.isTypeOfExpression = isTypeOfExpression;
function isTypeOperatorNode(node2) {
return node2.kind === ts$1.SyntaxKind.TypeOperator;
}
node.isTypeOperatorNode = isTypeOperatorNode;
function isTypeParameterDeclaration(node2) {
return node2.kind === ts$1.SyntaxKind.TypeParameter;
}
node.isTypeParameterDeclaration = isTypeParameterDeclaration;
function isTypePredicateNode(node2) {
return node2.kind === ts$1.SyntaxKind.TypePredicate;
}
node.isTypePredicateNode = isTypePredicateNode;
function isTypeReferenceNode(node2) {
return node2.kind === ts$1.SyntaxKind.TypeReference;
}
node.isTypeReferenceNode = isTypeReferenceNode;
function isTypeQueryNode(node2) {
return node2.kind === ts$1.SyntaxKind.TypeQuery;
}
node.isTypeQueryNode = isTypeQueryNode;
function isUnionTypeNode(node2) {
return node2.kind === ts$1.SyntaxKind.UnionType;
}
node.isUnionTypeNode = isUnionTypeNode;
function isVariableDeclaration(node2) {
return node2.kind === ts$1.SyntaxKind.VariableDeclaration;
}
node.isVariableDeclaration = isVariableDeclaration;
function isVariableStatement(node2) {
return node2.kind === ts$1.SyntaxKind.VariableStatement;
}
node.isVariableStatement = isVariableStatement;
function isVariableDeclarationList(node2) {
return node2.kind === ts$1.SyntaxKind.VariableDeclarationList;
}
node.isVariableDeclarationList = isVariableDeclarationList;
function isVoidExpression(node2) {
return node2.kind === ts$1.SyntaxKind.VoidExpression;
}
node.isVoidExpression = isVoidExpression;
function isWhileStatement(node2) {
return node2.kind === ts$1.SyntaxKind.WhileStatement;
}
node.isWhileStatement = isWhileStatement;
function isWithStatement(node2) {
return node2.kind === ts$1.SyntaxKind.WithStatement;
}
node.isWithStatement = isWithStatement;
return node;
}
var hasRequiredNode$3;
function requireNode$3() {
if (hasRequiredNode$3)
return node$1;
hasRequiredNode$3 = 1;
(function(exports) {
Object.defineProperty(exports, "__esModule", { value: true });
exports.isImportTypeNode = void 0;
const tslib_1 = require$$0;
tslib_1.__exportStar(requireNode$4(), exports);
const ts$1 = ts;
function isImportTypeNode(node2) {
return node2.kind === ts$1.SyntaxKind.ImportType;
}
exports.isImportTypeNode = isImportTypeNode;
})(node$1);
return node$1;
}
var hasRequiredNode$2;
function requireNode$2() {
if (hasRequiredNode$2)
return node$2;
hasRequiredNode$2 = 1;
(function(exports) {
Object.defineProperty(exports, "__esModule", { value: true });
exports.isSyntheticExpression = exports.isRestTypeNode = exports.isOptionalTypeNode = void 0;
const tslib_1 = require$$0;
tslib_1.__exportStar(requireNode$3(), exports);
const ts$1 = ts;
function isOptionalTypeNode(node2) {
return node2.kind === ts$1.SyntaxKind.OptionalType;
}
exports.isOptionalTypeNode = isOptionalTypeNode;
function isRestTypeNode(node2) {
return node2.kind === ts$1.SyntaxKind.RestType;
}
exports.isRestTypeNode = isRestTypeNode;
function isSyntheticExpression(node2) {
return node2.kind === ts$1.SyntaxKind.SyntheticExpression;
}
exports.isSyntheticExpression = isSyntheticExpression;
})(node$2);
return node$2;
}
var hasRequiredNode$1;
function requireNode$1() {
if (hasRequiredNode$1)
return node$3;
hasRequiredNode$1 = 1;
(function(exports) {
Object.defineProperty(exports, "__esModule", { value: true });
exports.isBigIntLiteral = void 0;
const tslib_1 = require$$0;
tslib_1.__exportStar(requireNode$2(), exports);
const ts$1 = ts;
function isBigIntLiteral(node2) {
return node2.kind === ts$1.SyntaxKind.BigIntLiteral;
}
exports.isBigIntLiteral = isBigIntLiteral;
})(node$3);
return node$3;
}
var hasRequiredNode;
function requireNode() {
if (hasRequiredNode)
return node$4;
hasRequiredNode = 1;
(function(exports) {
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require$$0;
tslib_1.__exportStar(requireNode$1(), exports);
})(node$4);
return node$4;
}
var type$5 = {};
var type$4 = {};
var type$3 = {};
var type$2 = {};
var type$1 = {};
var hasRequiredType$5;
function requireType$5() {
if (hasRequiredType$5)
return type$1;
hasRequiredType$5 = 1;
Object.defineProperty(type$1, "__esModule", { value: true });
type$1.isUniqueESSymbolType = type$1.isUnionType = type$1.isUnionOrIntersectionType = type$1.isTypeVariable = type$1.isTypeReference = type$1.isTypeParameter = type$1.isSubstitutionType = type$1.isObjectType = type$1.isLiteralType = type$1.isIntersectionType = type$1.isInterfaceType = type$1.isInstantiableType = type$1.isIndexedAccessype = type$1.isIndexedAccessType = type$1.isGenericType = type$1.isEnumType = type$1.isConditionalType = void 0;
const ts$1 = ts;
function isConditionalType(type2) {
return (type2.flags & ts$1.TypeFlags.Conditional) !== 0;
}
type$1.isConditionalType = isConditionalType;
function isEnumType(type2) {
return (type2.flags & ts$1.TypeFlags.Enum) !== 0;
}
type$1.isEnumType = isEnumType;
function isGenericType(type2) {
return (type2.flags & ts$1.TypeFlags.Object) !== 0 && (type2.objectFlags & ts$1.ObjectFlags.ClassOrInterface) !== 0 && (type2.objectFlags & ts$1.ObjectFlags.Reference) !== 0;
}
type$1.isGenericType = isGenericType;
function isIndexedAccessType(type2) {
return (type2.flags & ts$1.TypeFlags.IndexedAccess) !== 0;
}
type$1.isIndexedAccessType = isIndexedAccessType;
function isIndexedAccessype(type2) {
return (type2.flags & ts$1.TypeFlags.Index) !== 0;
}
type$1.isIndexedAccessype = isIndexedAccessype;
function isInstantiableType(type2) {
return (type2.flags & ts$1.TypeFlags.Instantiable) !== 0;
}
type$1.isInstantiableType = isInstantiableType;
function isInterfaceType(type2) {
return (type2.flags & ts$1.TypeFlags.Object) !== 0 && (type2.objectFlags & ts$1.ObjectFlags.ClassOrInterface) !== 0;
}
type$1.isInterfaceType = isInterfaceType;
function isIntersectionType(type2) {
return (type2.flags & ts$1.TypeFlags.Intersection) !== 0;
}
type$1.isIntersectionType = isIntersectionType;
function isLiteralType(type2) {
return (type2.flags & (ts$1.TypeFlags.StringOrNumberLiteral | ts$1.TypeFlags.BigIntLiteral)) !== 0;
}
type$1.isLiteralType = isLiteralType;
function isObjectType(type2) {
return (type2.flags & ts$1.TypeFlags.Object) !== 0;
}
type$1.isObjectType = isObjectType;
function isSubstitutionType(type2) {
return (type2.flags & ts$1.TypeFlags.Substitution) !== 0;
}
type$1.isSubstitutionType = isSubstitutionType;
function isTypeParameter(type2) {
return (type2.flags & ts$1.TypeFlags.TypeParameter) !== 0;
}
type$1.isTypeParameter = isTypeParameter;
function isTypeReference(type2) {
return (type2.flags & ts$1.TypeFlags.Object) !== 0 && (type2.objectFlags & ts$1.ObjectFlags.Reference) !== 0;
}
type$1.isTypeReference = isTypeReference;
function isTypeVariable(type2) {
return (type2.flags & ts$1.TypeFlags.TypeVariable) !== 0;
}
type$1.isTypeVariable = isTypeVariable;
function isUnionOrIntersectionType(type2) {
return (type2.flags & ts$1.TypeFlags.UnionOrIntersection) !== 0;
}
type$1.isUnionOrIntersectionType = isUnionOrIntersectionType;
function isUnionType(type2) {
return (type2.flags & ts$1.TypeFlags.Union) !== 0;
}
type$1.isUnionType = isUnionType;
function isUniqueESSymbolType(type2) {
return (type2.flags & ts$1.TypeFlags.UniqueESSymbol) !== 0;
}
type$1.isUniqueESSymbolType = isUniqueESSymbolType;
return type$1;
}
var hasRequiredType$4;
function requireType$4() {
if (hasRequiredType$4)
return type$2;
hasRequiredType$4 = 1;
(function(exports) {
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require$$0;
tslib_1.__exportStar(requireType$5(), exports);
})(type$2);
return type$2;
}
var hasRequiredType$3;
function requireType$3() {
if (hasRequiredType$3)
return type$3;
hasRequiredType$3 = 1;
(function(exports) {
Object.defineProperty(exports, "__esModule", { value: true });
exports.isTupleTypeReference = exports.isTupleType = void 0;
const tslib_1 = require$$0;
tslib_1.__exportStar(requireType$4(), exports);
const ts$1 = ts;
const type_1 = requireType$4();
function isTupleType(type2) {
return (type2.flags & ts$1.TypeFlags.Object && type2.objectFlags & ts$1.ObjectFlags.Tuple) !== 0;
}
exports.isTupleType = isTupleType;
function isTupleTypeReference(type2) {
return type_1.isTypeReference(type2) && isTupleType(type2.target);
}
exports.isTupleTypeReference = isTupleTypeReference;
})(type$3);
return type$3;
}
var hasRequiredType$2;
function requireType$2() {
if (hasRequiredType$2)
return type$4;
hasRequiredType$2 = 1;
(function(exports) {
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require$$0;
tslib_1.__exportStar(requireType$3(), exports);
})(type$4);
return type$4;
}
var hasRequiredType$1;
function requireType$1() {
if (hasRequiredType$1)
return type$5;
hasRequiredType$1 = 1;
(function(exports) {
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require$$0;
tslib_1.__exportStar(requireType$2(), exports);
})(type$5);
return type$5;
}
var hasRequiredTypeguard;
function requireTypeguard() {
if (hasRequiredTypeguard)
return typeguard;
hasRequiredTypeguard = 1;
(function(exports) {
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require$$0;
tslib_1.__exportStar(requireNode(), exports);
tslib_1.__exportStar(requireType$1(), exports);
})(typeguard);
return typeguard;
}
var util$2 = {};
var util$1 = {};
var _3_2 = {};
var hasRequired_3_2;
function require_3_2() {
if (hasRequired_3_2)
return _3_2;
hasRequired_3_2 = 1;
(function(exports) {
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require$$0;
tslib_1.__exportStar(requireNode$1(), exports);
tslib_1.__exportStar(requireType$2(), exports);
})(_3_2);
return _3_2;
}
var type = {};
var hasRequiredType;
function requireType() {
if (hasRequiredType)
return type;
hasRequiredType = 1;
Object.defineProperty(type, "__esModule", { value: true });
type.getBaseClassMemberOfClassElement = type.getIteratorYieldResultFromIteratorResult = type.getInstanceTypeOfClassLikeDeclaration = type.getConstructorTypeOfClassLikeDeclaration = type.getSymbolOfClassLikeDeclaration = type.getPropertyNameFromType = type.symbolHasReadonlyDeclaration = type.isPropertyReadonlyInType = type.getWellKnownSymbolPropertyOfType = type.getPropertyOfType = type.isBooleanLiteralType = type.isFalsyType = type.isThenableType = type.someTypePart = type.intersectionTypeParts = type.unionTypeParts = type.getCallSignaturesOfType = type.isTypeAssignableToString = type.isTypeAssignableToNumber = type.isOptionalChainingUndefinedMarkerType = type.removeOptionalChainingUndefinedMarkerType = type.removeOptionalityFromType = type.isEmptyObjectType = void 0;
const ts$1 = ts;
const type_1 = requireType$1();
const util_1 = requireUtil$1();
const node_1 = requireNode();
function isEmptyObjectType(type2) {
if (type_1.isObjectType(type2) && type2.objectFlags & ts$1.ObjectFlags.Anonymous && type2.getProperties().length === 0 && type2.getCallSignatures().length === 0 && type2.getConstructSignatures().length === 0 && type2.getStringIndexType() === void 0 && type2.getNumberIndexType() === void 0) {
const baseTypes = type2.getBaseTypes();
return baseTypes === void 0 || baseTypes.every(isEmptyObjectType);
}
return false;
}
type.isEmptyObjectType = isEmptyObjectType;
function removeOptionalityFromType(checker, type2) {
if (!containsTypeWithFlag(type2, ts$1.TypeFlags.Undefined))
return type2;
const allowsNull = containsTypeWithFlag(type2, ts$1.TypeFlags.Null);
type2 = checker.getNonNullableType(type2);
return allowsNull ? checker.getNullableType(type2, ts$1.TypeFlags.Null) : type2;
}
type.removeOptionalityFromType = removeOptionalityFromType;
function containsTypeWithFlag(type2, flag) {
for (const t of unionTypeParts(type2))
if (util_1.isTypeFlagSet(t, flag))
return true;
return false;
}
function removeOptionalChainingUndefinedMarkerType(checker, type2) {
if (!type_1.isUnionType(type2))
return isOptionalChainingUndefinedMarkerType(checker, type2) ? type2.getNonNullableType() : type2;
let flags = 0;
let containsUndefinedMarker = false;
for (const t of type2.types) {
if (isOptionalChainingUndefinedMarkerType(checker, t)) {
containsUndefinedMarker = true;
} else {
flags |= t.flags;
}
}
return containsUndefinedMarker ? checker.getNullableType(type2.getNonNullableType(), flags) : type2;
}
type.removeOptionalChainingUndefinedMarkerType = removeOptionalChainingUndefinedMarkerType;
function isOptionalChainingUndefinedMarkerType(checker, t) {
return util_1.isTypeFlagSet(t, ts$1.TypeFlags.Undefined) && checker.getNullableType(t.getNonNullableType(), ts$1.TypeFlags.Undefined) !== t;
}
type.isOptionalChainingUndefinedMarkerType = isOptionalChainingUndefinedMarkerType;
function isTypeAssignableToNumber(checker, type2) {
return isTypeAssignableTo(checker, type2, ts$1.TypeFlags.NumberLike);
}
type.isTypeAssignableToNumber = isTypeAssignableToNumber;
function isTypeAssignableToString(checker, type2) {
return isTypeAssignableTo(checker, type2, ts$1.TypeFlags.StringLike);
}
type.isTypeAssignableToString = isTypeAssignableToString;
function isTypeAssignableTo(checker, type2, flags) {
flags |= ts$1.TypeFlags.Any;
let typeParametersSeen;
return function check(t) {
if (type_1.isTypeParameter(t) && t.symbol !== void 0 && t.symbol.declarations !== void 0) {
if (typeParametersSeen === void 0) {
typeParametersSeen = /* @__PURE__ */ new Set([t]);
} else if (!typeParametersSeen.has(t)) {
typeParametersSeen.add(t);
} else {
return false;
}
const declaration = t.symbol.declarations[0];
if (declaration.constraint === void 0)
return true;
return check(checker.getTypeFromTypeNode(declaration.constraint));
}
if (type_1.isUnionType(t))
return t.types.every(check);
if (type_1.isIntersectionType(t))
return t.types.some(check);
return util_1.isTypeFlagSet(t, flags);
}(type2);
}
function getCallSignaturesOfType(type2) {
if (type_1.isUnionType(type2)) {
const signatures = [];
for (const t of type2.types)
signatures.push(...getCallSignaturesOfType(t));
return signatures;
}
if (type_1.isIntersectionType(type2)) {
let signatures;
for (const t of type2.types) {
const sig = getCallSignaturesOfType(t);
if (sig.length !== 0) {
if (signatures !== void 0)
return [];
signatures = sig;
}
}
return signatures === void 0 ? [] : signatures;
}
return type2.getCallSignatures();
}
type.getCallSignaturesOfType = getCallSignaturesOfType;
function unionTypeParts(type2) {
return type_1.isUnionType(type2) ? type2.types : [type2];
}
type.unionTypeParts = unionTypeParts;
function intersectionTypeParts(type2) {
return type_1.isIntersectionType(type2) ? type2.types : [type2];
}
type.intersectionTypeParts = intersectionTypeParts;
function someTypePart(type2, predicate, cb) {
return predicate(type2) ? type2.types.some(cb) : cb(type2);
}
type.someTypePart = someTypePart;
function isThenableType(checker, node2, type2 = checker.getTypeAtLocation(node2)) {
for (const ty of unionTypeParts(checker.getApparentType(type2))) {
const then = ty.getProperty("then");
if (then === void 0)
continue;
const thenType = checker.getTypeOfSymbolAtLocation(then, node2);
for (const t of unionTypeParts(thenType))
for (const signature of t.getCallSignatures())
if (signature.parameters.length !== 0 && isCallback2(checker, signature.parameters[0], node2))
return true;
}
return false;
}
type.isThenableType = isThenableType;
function isCallback2(checker, param, node2) {
let type2 = checker.getApparentType(checker.getTypeOfSymbolAtLocation(param, node2));
if (param.valueDeclaration.dotDotDotToken) {
type2 = type2.getNumberIndexType();
if (type2 === void 0)
return false;
}
for (const t of unionTypeParts(type2))
if (t.getCallSignatures().length !== 0)
return true;
return false;
}
function isFalsyType(type2) {
if (type2.flags & (ts$1.TypeFlags.Undefined | ts$1.TypeFlags.Null | ts$1.TypeFlags.Void))
return true;
if (type_1.isLiteralType(type2))
return !type2.value;
return isBooleanLiteralType(type2, false);
}
type.isFalsyType = isFalsyType;
function isBooleanLiteralType(type2, literal) {
return util_1.isTypeFlagSet(type2, ts$1.TypeFlags.BooleanLiteral) && type2.intrinsicName === (literal ? "true" : "false");
}
type.isBooleanLiteralType = isBooleanLiteralType;
function getPropertyOfType(type2, name) {
if (!name.startsWith("__"))
return type2.getProperty(name);
return type2.getProperties().find((s) => s.escapedName === name);
}
type.getPropertyOfType = getPropertyOfType;
function getWellKnownSymbolPropertyOfType(type2, wellKnownSymbolName, checker) {
const prefix = "__@" + wellKnownSymbolName;
for (const prop of type2.getProperties()) {
if (!prop.name.startsWith(prefix))
continue;
const globalSymbol = checker.getApparentType(checker.getTypeAtLocation(prop.valueDeclaration.name.expression)).symbol;
if (prop.escapedName === getPropertyNameOfWellKnownSymbol(checker, globalSymbol, wellKnownSymbolName))
return prop;
}
return;
}
type.getWellKnownSymbolPropertyOfType = getWellKnownSymbolPropertyOfType;
function getPropertyNameOfWellKnownSymbol(checker, symbolConstructor, symbolName) {
const knownSymbol = symbolConstructor && checker.getTypeOfSymbolAtLocation(symbolConstructor, symbolConstructor.valueDeclaration).getProperty(symbolName);
const knownSymbolType = knownSymbol && checker.getTypeOfSymbolAtLocation(knownSymbol, knownSymbol.valueDeclaration);
if (knownSymbolType && type_1.isUniqueESSymbolType(knownSymbolType))
return knownSymbolType.escapedName;
return "__@" + symbolName;
}
function isPropertyReadonlyInType(type2, name, checker) {
let seenProperty = false;
let seenReadonlySignature = false;
for (const t of unionTypeParts(type2)) {
if (getPropertyOfType(t, name) === void 0) {
const index = (util_1.isNumericPropertyName(name) ? checker.getIndexInfoOfType(t, ts$1.IndexKind.Number) : void 0) || checker.getIndexInfoOfType(t, ts$1.IndexKind.String);
if (index !== void 0 && index.isReadonly) {
if (seenProperty)
return true;
seenReadonlySignature = true;
}
} else if (seenReadonlySignature || isReadonlyPropertyIntersection(t, name, checker)) {
return true;
} else {
seenProperty = true;
}
}
return false;
}
type.isPropertyReadonlyInType = isPropertyReadonlyInType;
function isReadonlyPropertyIntersection(type2, name, checker) {
return someTypePart(type2, type_1.isIntersectionType, (t) => {
const prop = getPropertyOfType(t, name);
if (prop === void 0)
return false;
if (prop.flags & ts$1.SymbolFlags.Transient) {
if (/^(?:[1-9]\d*|0)$/.test(name) && type_1.isTupleTypeReference(t))
return t.target.readonly;
switch (isReadonlyPropertyFromMappedType(t, name, checker)) {
case true:
return true;
case false:
return false;
}
}
return (
// members of namespace import
util_1.isSymbolFlagSet(prop, ts$1.SymbolFlags.ValueModule) || // we unwrapped every mapped type, now we can check the actual declarations
symbolHasReadonlyDeclaration(prop, checker)
);
});
}
function isReadonlyPropertyFromMappedType(type2, name, checker) {
if (!type_1.isObjectType(type2) || !util_1.isObjectFlagSet(type2, ts$1.ObjectFlags.Mapped))
return;
const declaration = type2.symbol.declarations[0];
if (declaration.readonlyToken !== void 0 && !/^__@[^@]+$/.test(name))
return declaration.readonlyToken.kind !== ts$1.SyntaxKind.MinusToken;
return isPropertyReadonlyInType(type2.modifiersType, name, checker);
}
function symbolHasReadonlyDeclaration(symbol, checker) {
return (symbol.flags & ts$1.SymbolFlags.Accessor) === ts$1.SymbolFlags.GetAccessor || symbol.declarations !== void 0 && symbol.declarations.some((node2) => util_1.isModifierFlagSet(node2, ts$1.ModifierFlags.Readonly) || node_1.isVariableDeclaration(node2) && util_1.isNodeFlagSet(node2.parent, ts$1.NodeFlags.Const) || node_1.isCallExpression(node2) && util_1.isReadonlyAssignmentDeclaration(node2, checker) || node_1.isEnumMember(node2) || (node_1.isPropertyAssignment(node2) || node_1.isShorthandPropertyAssignment(node2)) && util_1.isInConstContext(node2.parent));
}
type.symbolHasReadonlyDeclaration = symbolHasReadonlyDeclaration;
function getPropertyNameFromType(type2) {
if (type2.flags & (ts$1.TypeFlags.StringLiteral | ts$1.TypeFlags.NumberLiteral)) {
const value = String(type2.value);
return { displayName: value, symbolName: ts$1.escapeLeadingUnderscores(value) };
}
if (type_1.isUniqueESSymbolType(type2))
return {
displayName: `[${type2.symbol ? `${isKnownSymbol(type2.symbol) ? "Symbol." : ""}${type2.symbol.name}` : type2.escapedName.replace(/^__@|@\d+$/g, "")}]`,
symbolName: type2.escapedName
};
}
type.getPropertyNameFromType = getPropertyNameFromType;
function isKnownSymbol(symbol) {
return util_1.isSymbolFlagSet(symbol, ts$1.SymbolFlags.Property) && symbol.valueDeclaration !== void 0 && node_1.isInterfaceDeclaration(symbol.valueDeclaration.parent) && symbol.valueDeclaration.parent.name.text === "SymbolConstructor" && isGlobalDeclaration(symbol.valueDeclaration.parent);
}
function isGlobalDeclaration(node2) {
return util_1.isNodeFlagSet(node2.parent, ts$1.NodeFlags.GlobalAugmentation) || node_1.isSourceFile(node2.parent) && !ts$1.isExternalModule(node2.parent);
}
function getSymbolOfClassLikeDeclaration(node2, checker) {
var _a;
return checker.getSymbolAtLocation((_a = node2.name) !== null && _a !== void 0 ? _a : util_1.getChildOfKind(node2, ts$1.SyntaxKind.ClassKeyword));
}
type.getSymbolOfClassLikeDeclaration = getSymbolOfClassLikeDeclaration;
function getConstructorTypeOfClassLikeDeclaration(node2, checker) {
return node2.kind === ts$1.SyntaxKind.ClassExpression ? checker.getTypeAtLocation(node2) : checker.getTypeOfSymbolAtLocation(getSymbolOfClassLikeDeclaration(node2, checker), node2);
}
type.getConstructorTypeOfClassLikeDeclaration = getConstructorTypeOfClassLikeDeclaration;
function getInstanceTypeOfClassLikeDeclaration(node2, checker) {
return node2.kind === ts$1.SyntaxKind.ClassDeclaration ? checker.getTypeAtLocation(node2) : checker.getDeclaredTypeOfSymbol(getSymbolOfClassLikeDeclaration(node2, checker));
}
type.getInstanceTypeOfClassLikeDeclaration = getInstanceTypeOfClassLikeDeclaration;
function getIteratorYieldResultFromIteratorResult(type2, node2, checker) {
return type_1.isUnionType(type2) && type2.types.find((t) => {
const done = t.getProperty("done");
return done !== void 0 && isBooleanLiteralType(removeOptionalityFromType(checker, checker.getTypeOfSymbolAtLocation(done, node2)), false);
}) || type2;
}
type.getIteratorYieldResultFromIteratorResult = getIteratorYieldResultFromIteratorResult;
function getBaseClassMemberOfClassElement(node2, checker) {
if (!node_1.isClassLikeDeclaration(node2.parent))
return;
const base = util_1.getBaseOfClassLikeExpression(node2.parent);
if (base === void 0)
return;
const name = util_1.getSingleLateBoundPropertyNameOfPropertyName(node2.name, checker);
if (name === void 0)
return;
const baseType = checker.getTypeAtLocation(util_1.hasModifier(node2.modifiers, ts$1.SyntaxKind.StaticKeyword) ? base.expression : base);
return getPropertyOfType(baseType, name.symbolName);
}
type.getBaseClassMemberOfClassElement = getBaseClassMemberOfClassElement;
return type;
}
var hasRequiredUtil$1;
function requireUtil$1() {
if (hasRequiredUtil$1)
return util$1;
hasRequiredUtil$1 = 1;
(function(exports) {
Object.defineProperty(exports, "__esModule", { value: true });
exports.isValidIdentifier = exports.getLineBreakStyle = exports.getLineRanges = exports.forEachComment = exports.forEachTokenWithTrivia = exports.forEachToken = exports.isFunctionWithBody = exports.hasOwnThisReference = exports.isBlockScopeBoundary = exports.isFunctionScopeBoundary = exports.isTypeScopeBoundary = exports.isScopeBoundary = exports.ScopeBoundarySelector = exports.ScopeBoundary = exports.isInSingleStatementContext = exports.isBlockScopedDeclarationStatement = exports.isBlockScopedVariableDeclaration = exports.isBlockScopedVariableDeclarationList = exports.getVariableDeclarationKind = exports.VariableDeclarationKind = exports.forEachDeclaredVariable = exports.forEachDestructuringIdentifier = exports.getPropertyName = exports.getWrappedNodeAtPosition = exports.getAstNodeAtPosition = exports.commentText = exports.isPositionInComment = exports.getCommentAtPosition = exports.getTokenAtPosition = exports.getNextToken = exports.getPreviousToken = exports.getNextStatement = exports.getPreviousStatement = exports.isModifierFlagSet = exports.isObjectFlagSet = exports.isSymbolFlagSet = exports.isTypeFlagSet = exports.isNodeFlagSet = exports.hasAccessModifier = exports.isParameterProperty = exports.hasModifier = exports.getModifier = exports.isThisParameter = exports.isKeywordKind = exports.isJsDocKind = exports.isTypeNodeKind = exports.isAssignmentKind = exports.isNodeKind = exports.isTokenKind = exports.getChildOfKind = void 0;
exports.getBaseOfClassLikeExpression = exports.hasExhaustiveCaseClauses = exports.formatPseudoBigInt = exports.unwrapParentheses = exports.getSingleLateBoundPropertyNameOfPropertyName = exports.getLateBoundPropertyNamesOfPropertyName = exports.getLateBoundPropertyNames = exports.getPropertyNameOfWellKnownSymbol = exports.isWellKnownSymbolLiterally = exports.isBindableObjectDefinePropertyCall = exports.isReadonlyAssignmentDeclaration = exports.isInConstContext = exports.isConstAssertion = exports.getTsCheckDirective = exports.getCheckJsDirective = exports.isAmbientModule = exports.isCompilerOptionEnabled = exports.isStrictCompilerOptionEnabled = exports.getIIFE = exports.isAmbientModuleBlock = exports.isStatementInAmbientContext = exports.findImportLikeNodes = exports.findImports = exports.ImportKind = exports.parseJsDocOfNode = exports.getJsDoc = exports.canHaveJsDoc = exports.isReassignmentTarget = exports.getAccessKind = exports.AccessKind = exports.isExpressionValueUsed = exports.getDeclarationOfBindingElement = exports.hasSideEffects = exports.SideEffectOptions = exports.isSameLine = exports.isNumericPropertyName = exports.isValidJsxIdentifier = exports.isValidNumericLiteral = exports.isValidPropertyName = exports.isValidPropertyAccess = void 0;
const ts$1 = ts;
const node_1 = requireNode();
const _3_2_1 = require_3_2();
const type_1 = requireType();
function getChildOfKind(node2, kind, sourceFile) {
for (const child of node2.getChildren(sourceFile))
if (child.kind === kind)
return child;
}
exports.getChildOfKind = getChildOfKind;
function isTokenKind(kind) {
return kind >= ts$1.SyntaxKind.FirstToken && kind <= ts$1.SyntaxKind.LastToken;
}
exports.isTokenKind = isTokenKind;
function isNodeKind(kind) {
return kind >= ts$1.SyntaxKind.FirstNode;
}
exports.isNodeKind = isNodeKind;
function isAssignmentKind(kind) {
return kind >= ts$1.SyntaxKind.FirstAssignment && kind <= ts$1.SyntaxKind.LastAssignment;
}
exports.isAssignmentKind = isAssignmentKind;
function isTypeNodeKind(kind) {
return kind >= ts$1.SyntaxKind.FirstTypeNode && kind <= ts$1.SyntaxKind.LastTypeNode;
}
exports.isTypeNodeKind = isTypeNodeKind;
function isJsDocKind(kind) {
return kind >= ts$1.SyntaxKind.FirstJSDocNode && kind <= ts$1.SyntaxKind.LastJSDocNode;
}
exports.isJsDocKind = isJsDocKind;
function isKeywordKind(kind) {
return kind >= ts$1.SyntaxKind.FirstKeyword && kind <= ts$1.SyntaxKind.LastKeyword;
}
exports.isKeywordKind = isKeywordKind;
function isThisParameter(parameter) {
return parameter.name.kind === ts$1.SyntaxKind.Identifier && parameter.name.originalKeywordKind === ts$1.SyntaxKind.ThisKeyword;
}
exports.isThisParameter = isThisParameter;
function getModifier(node2, kind) {
if (node2.modifiers !== void 0) {
for (const modifier of node2.modifiers)
if (modifier.kind === kind)
return modifier;
}
}
exports.getModifier = getModifier;
function hasModifier(modifiers, ...kinds) {
if (modifiers === void 0)
return false;
for (const modifier of modifiers)
if (kinds.includes(modifier.kind))
return true;
return false;
}
exports.hasModifier = hasModifier;
function isParameterProperty(node2) {
return hasModifier(node2.modifiers, ts$1.SyntaxKind.PublicKeyword, ts$1.SyntaxKind.ProtectedKeyword, ts$1.SyntaxKind.PrivateKeyword, ts$1.SyntaxKind.ReadonlyKeyword);
}
exports.isParameterProperty = isParameterProperty;
function hasAccessModifier(node2) {
return isModifierFlagSet(node2, ts$1.ModifierFlags.AccessibilityModifier);
}
exports.hasAccessModifier = hasAccessModifier;
function isFlagSet(obj, flag) {
return (obj.flags & flag) !== 0;
}
exports.isNodeFlagSet = isFlagSet;
exports.isTypeFlagSet = isFlagSet;
exports.isSymbolFlagSet = isFlagSet;
function isObjectFlagSet(objectType, flag) {
return (objectType.objectFlags & flag) !== 0;
}
exports.isObjectFlagSet = isObjectFlagSet;
function isModifierFlagSet(node2, flag) {
return (ts$1.getCombinedModifierFlags(node2) & flag) !== 0;
}
exports.isModifierFlagSet = isModifierFlagSet;
function getPreviousStatement(statement) {
const parent = statement.parent;
if (node_1.isBlockLike(parent)) {
const index = parent.statements.indexOf(statement);
if (index > 0)
return parent.statements[index - 1];
}
}
exports.getPreviousStatement = getPreviousStatement;
function getNextStatement(statement) {
const parent = statement.parent;
if (node_1.isBlockLike(parent)) {
const index = parent.statements.indexOf(statement);
if (index < parent.statements.length)
return parent.statements[index + 1];
}
}
exports.getNextStatement = getNextStatement;
function getPreviousToken(node2, sourceFile) {
const { pos } = node2;
if (pos === 0)
return;
do
node2 = node2.parent;
while (node2.pos === pos);
return getTokenAtPositionWorker(node2, pos - 1, sourceFile !== null && sourceFile !== void 0 ? sourceFile : node2.getSourceFile(), false);
}
exports.getPreviousToken = getPreviousToken;
function getNextToken(node2, sourceFile) {
if (node2.kind === ts$1.SyntaxKind.SourceFile || node2.kind === ts$1.SyntaxKind.EndOfFileToken)
return;
const end = node2.end;
node2 = node2.parent;
while (node2.end === end) {
if (node2.parent === void 0)
return node2.endOfFileToken;
node2 = node2.parent;
}
return getTokenAtPositionWorker(node2, end, sourceFile !== null && sourceFile !== void 0 ? sourceFile : node2.getSourceFile(), false);
}
exports.getNextToken = getNextToken;
function getTokenAtPosition(parent, pos, sourceFile, allowJsDoc) {
if (pos < parent.pos || pos >= parent.end)
return;
if (isTokenKind(parent.kind))
return parent;
return getTokenAtPositionWorker(parent, pos, sourceFile !== null && sourceFile !== void 0 ? sourceFile : parent.getSourceFile(), allowJsDoc === true);
}
exports.getTokenAtPosition = getTokenAtPosition;
function getTokenAtPositionWorker(node2, pos, sourceFile, allowJsDoc) {
if (!allowJsDoc) {
node2 = getAstNodeAtPosition(node2, pos);
if (isTokenKind(node2.kind))
return node2;
}
outer:
while (true) {
for (const child of node2.getChildren(sourceFile)) {
if (child.end > pos && (allowJsDoc || child.kind !== ts$1.SyntaxKind.JSDocComment)) {
if (isTokenKind(child.kind))
return child;
node2 = child;
continue outer;
}
}
return;
}
}
function getCommentAtPosition(sourceFile, pos, parent = sourceFile) {
const token = getTokenAtPosition(parent, pos, sourceFile);
if (token === void 0 || token.kind === ts$1.SyntaxKind.JsxText || pos >= token.end - (ts$1.tokenToString(token.kind) || "").length)
return;
const startPos = token.pos === 0 ? (ts$1.getShebang(sourceFile.text) || "").length : token.pos;
return startPos !== 0 && ts$1.forEachTrailingCommentRange(sourceFile.text, startPos, commentAtPositionCallback, pos) || ts$1.forEachLeadingCommentRange(sourceFile.text, startPos, commentAtPositionCallback, pos);
}
exports.getCommentAtPosition = getCommentAtPosition;
function commentAtPositionCallback(pos, end, kind, _nl, at) {
return at >= pos && at < end ? { pos, end, kind } : void 0;
}
function isPositionInComment(sourceFile, pos, parent) {
return getCommentAtPosition(sourceFile, pos, parent) !== void 0;
}
exports.isPositionInComment = isPositionInComment;
function commentText(sourceText, comment) {
return sourceText.substring(comment.pos + 2, comment.kind === ts$1.SyntaxKind.SingleLineCommentTrivia ? comment.end : comment.end - 2);
}
exports.commentText = commentText;
function getAstNodeAtPosition(node2, pos) {
if (node2.pos > pos || node2.end <= pos)
return;
while (isNodeKind(node2.kind)) {
const nested = ts$1.forEachChild(node2, (child) => child.pos <= pos && child.end > pos ? child : void 0);
if (nested === void 0)
break;
node2 = nested;
}
return node2;
}
exports.getAstNodeAtPosition = getAstNodeAtPosition;
function getWrappedNodeAtPosition(wrap, pos) {
if (wrap.node.pos > pos || wrap.node.end <= pos)
return;
outer:
while (true) {
for (const child of wrap.children) {
if (child.node.pos > pos)
return wrap;
if (child.node.end > pos) {
wrap = child;
continue outer;
}
}
return wrap;
}
}
exports.getWrappedNodeAtPosition = getWrappedNodeAtPosition;
function getPropertyName(propertyName) {
if (propertyName.kind === ts$1.SyntaxKind.ComputedPropertyName) {
const expression = unwrapParentheses(propertyName.expression);
if (node_1.isPrefixUnaryExpression(expression)) {
let negate = false;
switch (expression.operator) {
case ts$1.SyntaxKind.MinusToken:
negate = true;
case ts$1.SyntaxKind.PlusToken:
return node_1.isNumericLiteral(expression.operand) ? `${negate ? "-" : ""}${expression.operand.text}` : _3_2_1.isBigIntLiteral(expression.operand) ? `${negate ? "-" : ""}${expression.operand.text.slice(0, -1)}` : void 0;
default:
return;
}
}
if (_3_2_1.isBigIntLiteral(expression))
return expression.text.slice(0, -1);
if (node_1.isNumericOrStringLikeLiteral(expression))
return expression.text;
return;
}
return propertyName.kind === ts$1.SyntaxKind.PrivateIdentifier ? void 0 : propertyName.text;
}
exports.getPropertyName = getPropertyName;
function forEachDestructuringIdentifier(pattern, fn) {
for (const element of pattern.elements) {
if (element.kind !== ts$1.SyntaxKind.BindingElement)
continue;
let result;
if (element.name.kind === ts$1.SyntaxKind.Identifier) {
result = fn(element);
} else {
result = forEachDestructuringIdentifier(element.name, fn);
}
if (result)
return result;
}
}
exports.forEachDestructuringIdentifier = forEachDestructuringIdentifier;
function forEachDeclaredVariable(declarationList, cb) {
for (const declaration of declarationList.declarations) {
let result;
if (declaration.name.kind === ts$1.SyntaxKind.Identifier) {
result = cb(declaration);
} else {
result = forEachDestructuringIdentifier(declaration.name, cb);
}
if (result)
return result;
}
}
exports.forEachDeclaredVariable = forEachDeclaredVariable;
(function(VariableDeclarationKind) {
VariableDeclarationKind[VariableDeclarationKind["Var"] = 0] = "Var";
VariableDeclarationKind[VariableDeclarationKind["Let"] = 1] = "Let";
VariableDeclarationKind[VariableDeclarationKind["Const"] = 2] = "Const";
})(exports.VariableDeclarationKind || (exports.VariableDeclarationKind = {}));
function getVariableDeclarationKind(declarationList) {
if (declarationList.flags & ts$1.NodeFlags.Let)
return 1;
if (declarationList.flags & ts$1.NodeFlags.Const)
return 2;
return 0;
}
exports.getVariableDeclarationKind = getVariableDeclarationKind;
function isBlockScopedVariableDeclarationList(declarationList) {
return (declarationList.flags & ts$1.NodeFlags.BlockScoped) !== 0;
}
exports.isBlockScopedVariableDeclarationList = isBlockScopedVariableDeclarationList;
function isBlockScopedVariableDeclaration(declaration) {
const parent = declaration.parent;
return parent.kind === ts$1.SyntaxKind.CatchClause || isBlockScopedVariableDeclarationList(parent);
}
exports.isBlockScopedVariableDeclaration = isBlockScopedVariableDeclaration;
function isBlockScopedDeclarationStatement(statement) {
switch (statement.kind) {
case ts$1.SyntaxKind.VariableStatement:
return isBlockScopedVariableDeclarationList(statement.declarationList);
case ts$1.SyntaxKind.ClassDeclaration:
case ts$1.SyntaxKind.EnumDeclaration:
case ts$1.SyntaxKind.InterfaceDeclaration:
case ts$1.SyntaxKind.TypeAliasDeclaration:
return true;
default:
return false;
}
}
exports.isBlockScopedDeclarationStatement = isBlockScopedDeclarationStatement;
function isInSingleStatementContext(statement) {
switch (statement.parent.kind) {
case ts$1.SyntaxKind.ForStatement:
case ts$1.SyntaxKind.ForInStatement:
case ts$1.SyntaxKind.ForOfStatement:
case ts$1.SyntaxKind.WhileStatement:
case ts$1.SyntaxKind.DoStatement:
case ts$1.SyntaxKind.IfStatement:
case ts$1.SyntaxKind.WithStatement:
case ts$1.SyntaxKind.LabeledStatement:
return true;
default:
return false;
}
}
exports.isInSingleStatementContext = isInSingleStatementContext;
(function(ScopeBoundary) {
ScopeBoundary[ScopeBoundary["None"] = 0] = "None";
ScopeBoundary[ScopeBoundary["Function"] = 1] = "Function";
ScopeBoundary[ScopeBoundary["Block"] = 2] = "Block";
ScopeBoundary[ScopeBoundary["Type"] = 4] = "Type";
ScopeBoundary[ScopeBoundary["ConditionalType"] = 8] = "ConditionalType";
})(exports.ScopeBoundary || (exports.ScopeBoundary = {}));
(function(ScopeBoundarySelector) {
ScopeBoundarySelector[ScopeBoundarySelector["Function"] = 1] = "Function";
ScopeBoundarySelector[ScopeBoundarySelector["Block"] = 3] = "Block";
ScopeBoundarySelector[ScopeBoundarySelector["Type"] = 7] = "Type";
ScopeBoundarySelector[ScopeBoundarySelector["InferType"] = 8] = "InferType";
})(exports.ScopeBoundarySelector || (exports.ScopeBoundarySelector = {}));
function isScopeBoundary(node2) {
return isFunctionScopeBoundary(node2) || isBlockScopeBoundary(node2) || isTypeScopeBoundary(node2);
}
exports.isScopeBoundary = isScopeBoundary;
function isTypeScopeBoundary(node2) {
switch (node2.kind) {
case ts$1.SyntaxKind.InterfaceDeclaration:
case ts$1.SyntaxKind.TypeAliasDeclaration:
case ts$1.SyntaxKind.MappedType:
return 4;
case ts$1.SyntaxKind.ConditionalType:
return 8;
default:
return 0;
}
}
exports.isTypeScopeBoundary = isTypeScopeBoundary;
function isFunctionScopeBoundary(node2) {
switch (node2.kind) {
case ts$1.SyntaxKind.FunctionExpression:
case ts$1.SyntaxKind.ArrowFunction:
case ts$1.SyntaxKind.Constructor:
case ts$1.SyntaxKind.ModuleDeclaration:
case ts$1.SyntaxKind.ClassDeclaration:
case ts$1.SyntaxKind.ClassExpression:
case ts$1.SyntaxKind.EnumDeclaration:
case ts$1.SyntaxKind.MethodDeclaration:
case ts$1.SyntaxKind.FunctionDeclaration:
case ts$1.SyntaxKind.GetAccessor:
case ts$1.SyntaxKind.SetAccessor:
case ts$1.SyntaxKind.MethodSignature:
case ts$1.SyntaxKind.CallSignature:
case ts$1.SyntaxKind.ConstructSignature:
case ts$1.SyntaxKind.ConstructorType:
case ts$1.SyntaxKind.FunctionType:
return 1;
case ts$1.SyntaxKind.SourceFile:
return ts$1.isExternalModule(node2) ? 1 : 0;
default:
return 0;
}
}
exports.isFunctionScopeBoundary = isFunctionScopeBoundary;
function isBlockScopeBoundary(node2) {
switch (node2.kind) {
case ts$1.SyntaxKind.Block:
const parent = node2.parent;
return parent.kind !== ts$1.SyntaxKind.CatchClause && // blocks inside SourceFile are block scope boundaries
(parent.kind === ts$1.SyntaxKind.SourceFile || // blocks that are direct children of a function scope boundary are no scope boundary
// for example the FunctionBlock is part of the function scope of the containing function
!isFunctionScopeBoundary(parent)) ? 2 : 0;
case ts$1.SyntaxKind.ForStatement:
case ts$1.SyntaxKind.ForInStatement:
case ts$1.SyntaxKind.ForOfStatement:
case ts$1.SyntaxKind.CaseBlock:
case ts$1.SyntaxKind.CatchClause:
case ts$1.SyntaxKind.WithStatement:
return 2;
default:
return 0;
}
}
exports.isBlockScopeBoundary = isBlockScopeBoundary;
function hasOwnThisReference(node2) {
switch (node2.kind) {
case ts$1.SyntaxKind.ClassDeclaration:
case ts$1.SyntaxKind.ClassExpression:
case ts$1.SyntaxKind.FunctionExpression:
return true;
case ts$1.SyntaxKind.FunctionDeclaration:
return node2.body !== void 0;
case ts$1.SyntaxKind.MethodDeclaration:
case ts$1.SyntaxKind.GetAccessor:
case ts$1.SyntaxKind.SetAccessor:
return node2.parent.kind === ts$1.SyntaxKind.ObjectLiteralExpression;
default:
return false;
}
}
exports.hasOwnThisReference = hasOwnThisReference;
function isFunctionWithBody(node2) {
switch (node2.kind) {
case ts$1.SyntaxKind.GetAccessor:
case ts$1.SyntaxKind.SetAccessor:
case ts$1.SyntaxKind.FunctionDeclaration:
case ts$1.SyntaxKind.MethodDeclaration:
case ts$1.SyntaxKind.Constructor:
return node2.body !== void 0;
case ts$1.SyntaxKind.FunctionExpression:
case ts$1.SyntaxKind.ArrowFunction:
return true;
default:
return false;
}
}
exports.isFunctionWithBody = isFunctionWithBody;
function forEachToken(node2, cb, sourceFile = node2.getSourceFile()) {
const queue = [];
while (true) {
if (isTokenKind(node2.kind)) {
cb(node2);
} else if (node2.kind !== ts$1.SyntaxKind.JSDocComment) {
const children = node2.getChildren(sourceFile);
if (children.length === 1) {
node2 = children[0];
continue;
}
for (let i = children.length - 1; i >= 0; --i)
queue.push(children[i]);
}
if (queue.length === 0)
break;
node2 = queue.pop();
}
}
exports.forEachToken = forEachToken;
function forEachTokenWithTrivia(node2, cb, sourceFile = node2.getSourceFile()) {
const fullText = sourceFile.text;
const scanner = ts$1.createScanner(sourceFile.languageVersion, false, sourceFile.languageVariant, fullText);
return forEachToken(node2, (token) => {
const tokenStart = token.kind === ts$1.SyntaxKind.JsxText || token.pos === token.end ? token.pos : token.getStart(sourceFile);
if (tokenStart !== token.pos) {
scanner.setTextPos(token.pos);
let kind = scanner.scan();
let pos = scanner.getTokenPos();
while (pos < tokenStart) {
const textPos = scanner.getTextPos();
cb(fullText, kind, { pos, end: textPos }, token.parent);
if (textPos === tokenStart)
break;
kind = scanner.scan();
pos = scanner.getTokenPos();
}
}
return cb(fullText, token.kind, { end: token.end, pos: tokenStart }, token.parent);
}, sourceFile);
}
exports.forEachTokenWithTrivia = forEachTokenWithTrivia;
function forEachComment(node2, cb, sourceFile = node2.getSourceFile()) {
const fullText = sourceFile.text;
const notJsx = sourceFile.languageVariant !== ts$1.LanguageVariant.JSX;
return forEachToken(node2, (token) => {
if (token.pos === token.end)
return;
if (token.kind !== ts$1.SyntaxKind.JsxText)
ts$1.forEachLeadingCommentRange(
fullText,
// skip shebang at position 0
token.pos === 0 ? (ts$1.getShebang(fullText) || "").length : token.pos,
commentCallback
);
if (notJsx || canHaveTrailingTrivia(token))
return ts$1.forEachTrailingCommentRange(fullText, token.end, commentCallback);
}, sourceFile);
function commentCallback(pos, end, kind) {
cb(fullText, { pos, end, kind });
}
}
exports.forEachComment = forEachComment;
function canHaveTrailingTrivia(token) {
switch (token.kind) {
case ts$1.SyntaxKind.CloseBraceToken:
return token.parent.kind !== ts$1.SyntaxKind.JsxExpression || !isJsxElementOrFragment(token.parent.parent);
case ts$1.SyntaxKind.GreaterThanToken:
switch (token.parent.kind) {
case ts$1.SyntaxKind.JsxOpeningElement:
return token.end !== token.parent.end;
case ts$1.SyntaxKind.JsxOpeningFragment:
return false;
case ts$1.SyntaxKind.JsxSelfClosingElement:
return token.end !== token.parent.end || // if end is not equal, this is part of the type arguments list
!isJsxElementOrFragment(token.parent.parent);
case ts$1.SyntaxKind.JsxClosingElement:
case ts$1.SyntaxKind.JsxClosingFragment:
return !isJsxElementOrFragment(token.parent.parent.parent);
}
}
return true;
}
function isJsxElementOrFragment(node2) {
return node2.kind === ts$1.SyntaxKind.JsxElement || node2.kind === ts$1.SyntaxKind.JsxFragment;
}
function getLineRanges(sourceFile) {
const lineStarts = sourceFile.getLineStarts();
const result = [];
const length = lineStarts.length;
const sourceText = sourceFile.text;
let pos = 0;
for (let i = 1; i < length; ++i) {
const end = lineStarts[i];
let lineEnd = end;
for (; lineEnd > pos; --lineEnd)
if (!ts$1.isLineBreak(sourceText.charCodeAt(lineEnd - 1)))
break;
result.push({
pos,
end,
contentLength: lineEnd - pos
});
pos = end;
}
result.push({
pos,
end: sourceFile.end,
contentLength: sourceFile.end - pos
});
return result;
}
exports.getLineRanges = getLineRanges;
function getLineBreakStyle(sourceFile) {
const lineStarts = sourceFile.getLineStarts();
return lineStarts.length === 1 || lineStarts[1] < 2 || sourceFile.text[lineStarts[1] - 2] !== "\r" ? "\n" : "\r\n";
}
exports.getLineBreakStyle = getLineBreakStyle;
let cachedScanner;
function scanToken(text, languageVersion) {
if (cachedScanner === void 0) {
cachedScanner = ts$1.createScanner(languageVersion, false, void 0, text);
} else {
cachedScanner.setScriptTarget(languageVersion);
cachedScanner.setText(text);
}
cachedScanner.scan();
return cachedScanner;
}
function isValidIdentifier(text, languageVersion = ts$1.ScriptTarget.Latest) {
const scan = scanToken(text, languageVersion);
return scan.isIdentifier() && scan.getTextPos() === text.length && scan.getTokenPos() === 0;
}
exports.isValidIdentifier = isValidIdentifier;
function charSize(ch) {
return ch >= 65536 ? 2 : 1;
}
function isValidPropertyAccess(text, languageVersion = ts$1.ScriptTarget.Latest) {
if (text.length === 0)
return false;
let ch = text.codePointAt(0);
if (!ts$1.isIdentifierStart(ch, languageVersion))
return false;
for (let i = charSize(ch); i < text.length; i += charSize(ch)) {
ch = text.codePointAt(i);
if (!ts$1.isIdentifierPart(ch, languageVersion))
return false;
}
return true;
}
exports.isValidPropertyAccess = isValidPropertyAccess;
function isValidPropertyName(text, languageVersion = ts$1.ScriptTarget.Latest) {
if (isValidPropertyAccess(text, languageVersion))
return true;
const scan = scanToken(text, languageVersion);
return scan.getTextPos() === text.length && scan.getToken() === ts$1.SyntaxKind.NumericLiteral && scan.getTokenValue() === text;
}
exports.isValidPropertyName = isValidPropertyName;
function isValidNumericLiteral(text, languageVersion = ts$1.ScriptTarget.Latest) {
const scan = scanToken(text, languageVersion);
return scan.getToken() === ts$1.SyntaxKind.NumericLiteral && scan.getTextPos() === text.length && scan.getTokenPos() === 0;
}
exports.isValidNumericLiteral = isValidNumericLiteral;
function isValidJsxIdentifier(text, languageVersion = ts$1.ScriptTarget.Latest) {
if (text.length === 0)
return false;
let seenNamespaceSeparator = false;
let ch = text.codePointAt(0);
if (!ts$1.isIdentifierStart(ch, languageVersion))
return false;
for (let i = charSize(ch); i < text.length; i += charSize(ch)) {
ch = text.codePointAt(i);
if (!ts$1.isIdentifierPart(ch, languageVersion) && ch !== 45) {
if (!seenNamespaceSeparator && ch === 58 && i + charSize(ch) !== text.length) {
seenNamespaceSeparator = true;
} else {
return false;
}
}
}
return true;
}
exports.isValidJsxIdentifier = isValidJsxIdentifier;
function isNumericPropertyName(name) {
return String(+name) === name;
}
exports.isNumericPropertyName = isNumericPropertyName;
function isSameLine(sourceFile, pos1, pos2) {
return ts$1.getLineAndCharacterOfPosition(sourceFile, pos1).line === ts$1.getLineAndCharacterOfPosition(sourceFile, pos2).line;
}
exports.isSameLine = isSameLine;
(function(SideEffectOptions) {
SideEffectOptions[SideEffectOptions["None"] = 0] = "None";
SideEffectOptions[SideEffectOptions["TaggedTemplate"] = 1] = "TaggedTemplate";
SideEffectOptions[SideEffectOptions["Constructor"] = 2] = "Constructor";
SideEffectOptions[SideEffectOptions["JsxElement"] = 4] = "JsxElement";
})(exports.SideEffectOptions || (exports.SideEffectOptions = {}));
function hasSideEffects(node2, options) {
var _a, _b;
const queue = [];
while (true) {
switch (node2.kind) {
case ts$1.SyntaxKind.CallExpression:
case ts$1.SyntaxKind.PostfixUnaryExpression:
case ts$1.SyntaxKind.AwaitExpression:
case ts$1.SyntaxKind.YieldExpression:
case ts$1.SyntaxKind.DeleteExpression:
return true;
case ts$1.SyntaxKind.TypeAssertionExpression:
case ts$1.SyntaxKind.AsExpression:
case ts$1.SyntaxKind.ParenthesizedExpression:
case ts$1.SyntaxKind.NonNullExpression:
case ts$1.SyntaxKind.VoidExpression:
case ts$1.SyntaxKind.TypeOfExpression:
case ts$1.SyntaxKind.PropertyAccessExpression:
case ts$1.SyntaxKind.SpreadElement:
case ts$1.SyntaxKind.PartiallyEmittedExpression:
node2 = node2.expression;
continue;
case ts$1.SyntaxKind.BinaryExpression:
if (isAssignmentKind(node2.operatorToken.kind))
return true;
queue.push(node2.right);
node2 = node2.left;
continue;
case ts$1.SyntaxKind.PrefixUnaryExpression:
switch (node2.operator) {
case ts$1.SyntaxKind.PlusPlusToken:
case ts$1.SyntaxKind.MinusMinusToken:
return true;
default:
node2 = node2.operand;
continue;
}
case ts$1.SyntaxKind.ElementAccessExpression:
if (node2.argumentExpression !== void 0)
queue.push(node2.argumentExpression);
node2 = node2.expression;
continue;
case ts$1.SyntaxKind.ConditionalExpression:
queue.push(node2.whenTrue, node2.whenFalse);
node2 = node2.condition;
continue;
case ts$1.SyntaxKind.NewExpression:
if (options & 2)
return true;
if (node2.arguments !== void 0)
queue.push(...node2.arguments);
node2 = node2.expression;
continue;
case ts$1.SyntaxKind.TaggedTemplateExpression:
if (options & 1)
return true;
queue.push(node2.tag);
node2 = node2.template;
if (node2.kind === ts$1.SyntaxKind.NoSubstitutionTemplateLiteral)
break;
case ts$1.SyntaxKind.TemplateExpression:
for (const child of node2.templateSpans)
queue.push(child.expression);
break;
case ts$1.SyntaxKind.ClassExpression: {
if (node2.decorators !== void 0)
return true;
for (const child of node2.members) {
if (child.decorators !== void 0)
return true;
if (!hasModifier(child.modifiers, ts$1.SyntaxKind.DeclareKeyword)) {
if (((_a = child.name) === null || _a === void 0 ? void 0 : _a.kind) === ts$1.SyntaxKind.ComputedPropertyName)
queue.push(child.name.expression);
if (node_1.isMethodDeclaration(child)) {
for (const p of child.parameters)
if (p.decorators !== void 0)
return true;
} else if (node_1.isPropertyDeclaration(child) && child.initializer !== void 0 && hasModifier(child.modifiers, ts$1.SyntaxKind.StaticKeyword)) {
queue.push(child.initializer);
}
}
}
const base = getBaseOfClassLikeExpression(node2);
if (base === void 0)
break;
node2 = base.expression;
continue;
}
case ts$1.SyntaxKind.ArrayLiteralExpression:
queue.push(...node2.elements);
break;
case ts$1.SyntaxKind.ObjectLiteralExpression:
for (const child of node2.properties) {
if (((_b = child.name) === null || _b === void 0 ? void 0 : _b.kind) === ts$1.SyntaxKind.ComputedPropertyName)
queue.push(child.name.expression);
switch (child.kind) {
case ts$1.SyntaxKind.PropertyAssignment:
queue.push(child.initializer);
break;
case ts$1.SyntaxKind.SpreadAssignment:
queue.push(child.expression);
}
}
break;
case ts$1.SyntaxKind.JsxExpression:
if (node2.expression === void 0)
break;
node2 = node2.expression;
continue;
case ts$1.SyntaxKind.JsxElement:
case ts$1.SyntaxKind.JsxFragment:
for (const child of node2.children)
if (child.kind !== ts$1.SyntaxKind.JsxText)
queue.push(child);
if (node2.kind === ts$1.SyntaxKind.JsxFragment)
break;
node2 = node2.openingElement;
case ts$1.SyntaxKind.JsxSelfClosingElement:
case ts$1.SyntaxKind.JsxOpeningElement:
if (options & 4)
return true;
for (const child of node2.attributes.properties) {
if (child.kind === ts$1.SyntaxKind.JsxSpreadAttribute) {
queue.push(child.expression);
} else if (child.initializer !== void 0) {
queue.push(child.initializer);
}
}
break;
case ts$1.SyntaxKind.CommaListExpression:
queue.push(...node2.elements);
}
if (queue.length === 0)
return false;
node2 = queue.pop();
}
}
exports.hasSideEffects = hasSideEffects;
function getDeclarationOfBindingElement(node2) {
let parent = node2.parent.parent;
while (parent.kind === ts$1.SyntaxKind.BindingElement)
parent = parent.parent.parent;
return parent;
}
exports.getDeclarationOfBindingElement = getDeclarationOfBindingElement;
function isExpressionValueUsed(node2) {
while (true) {
const parent = node2.parent;
switch (parent.kind) {
case ts$1.SyntaxKind.CallExpression:
case ts$1.SyntaxKind.NewExpression:
case ts$1.SyntaxKind.ElementAccessExpression:
case ts$1.SyntaxKind.WhileStatement:
case ts$1.SyntaxKind.DoStatement:
case ts$1.SyntaxKind.WithStatement:
case ts$1.SyntaxKind.ThrowStatement:
case ts$1.SyntaxKind.ReturnStatement:
case ts$1.SyntaxKind.JsxExpression:
case ts$1.SyntaxKind.JsxSpreadAttribute:
case ts$1.SyntaxKind.JsxElement:
case ts$1.SyntaxKind.JsxFragment:
case ts$1.SyntaxKind.JsxSelfClosingElement:
case ts$1.SyntaxKind.ComputedPropertyName:
case ts$1.SyntaxKind.ArrowFunction:
case ts$1.SyntaxKind.ExportSpecifier:
case ts$1.SyntaxKind.ExportAssignment:
case ts$1.SyntaxKind.ImportDeclaration:
case ts$1.SyntaxKind.ExternalModuleReference:
case ts$1.SyntaxKind.Decorator:
case ts$1.SyntaxKind.TaggedTemplateExpression:
case ts$1.SyntaxKind.TemplateSpan:
case ts$1.SyntaxKind.ExpressionWithTypeArguments:
case ts$1.SyntaxKind.TypeOfExpression:
case ts$1.SyntaxKind.AwaitExpression:
case ts$1.SyntaxKind.YieldExpression:
case ts$1.SyntaxKind.LiteralType:
case ts$1.SyntaxKind.JsxAttributes:
case ts$1.SyntaxKind.JsxOpeningElement:
case ts$1.SyntaxKind.JsxClosingElement:
case ts$1.SyntaxKind.IfStatement:
case ts$1.SyntaxKind.CaseClause:
case ts$1.SyntaxKind.SwitchStatement:
return true;
case ts$1.SyntaxKind.PropertyAccessExpression:
return parent.expression === node2;
case ts$1.SyntaxKind.QualifiedName:
return parent.left === node2;
case ts$1.SyntaxKind.ShorthandPropertyAssignment:
return parent.objectAssignmentInitializer === node2 || !isInDestructuringAssignment(parent);
case ts$1.SyntaxKind.PropertyAssignment:
return parent.initializer === node2 && !isInDestructuringAssignment(parent);
case ts$1.SyntaxKind.SpreadAssignment:
case ts$1.SyntaxKind.SpreadElement:
case ts$1.SyntaxKind.ArrayLiteralExpression:
return !isInDestructuringAssignment(parent);
case ts$1.SyntaxKind.ParenthesizedExpression:
case ts$1.SyntaxKind.AsExpression:
case ts$1.SyntaxKind.TypeAssertionExpression:
case ts$1.SyntaxKind.PostfixUnaryExpression:
case ts$1.SyntaxKind.PrefixUnaryExpression:
case ts$1.SyntaxKind.NonNullExpression:
node2 = parent;
continue;
case ts$1.SyntaxKind.ForStatement:
return parent.condition === node2;
case ts$1.SyntaxKind.ForInStatement:
case ts$1.SyntaxKind.ForOfStatement:
return parent.expression === node2;
case ts$1.SyntaxKind.ConditionalExpression:
if (parent.condition === node2)
return true;
node2 = parent;
break;
case ts$1.SyntaxKind.PropertyDeclaration:
case ts$1.SyntaxKind.BindingElement:
case ts$1.SyntaxKind.VariableDeclaration:
case ts$1.SyntaxKind.Parameter:
case ts$1.SyntaxKind.EnumMember:
return parent.initializer === node2;
case ts$1.SyntaxKind.ImportEqualsDeclaration:
return parent.moduleReference === node2;
case ts$1.SyntaxKind.CommaListExpression:
if (parent.elements[parent.elements.length - 1] !== node2)
return false;
node2 = parent;
break;
case ts$1.SyntaxKind.BinaryExpression:
if (parent.right === node2) {
if (parent.operatorToken.kind === ts$1.SyntaxKind.CommaToken) {
node2 = parent;
break;
}
return true;
}
switch (parent.operatorToken.kind) {
case ts$1.SyntaxKind.CommaToken:
case ts$1.SyntaxKind.EqualsToken:
return false;
case ts$1.SyntaxKind.EqualsEqualsEqualsToken:
case ts$1.SyntaxKind.EqualsEqualsToken:
case ts$1.SyntaxKind.ExclamationEqualsEqualsToken:
case ts$1.SyntaxKind.ExclamationEqualsToken:
case ts$1.SyntaxKind.InstanceOfKeyword:
case ts$1.SyntaxKind.PlusToken:
case ts$1.SyntaxKind.MinusToken:
case ts$1.SyntaxKind.AsteriskToken:
case ts$1.SyntaxKind.SlashToken:
case ts$1.SyntaxKind.PercentToken:
case ts$1.SyntaxKind.AsteriskAsteriskToken:
case ts$1.SyntaxKind.GreaterThanToken:
case ts$1.SyntaxKind.GreaterThanGreaterThanToken:
case ts$1.SyntaxKind.GreaterThanGreaterThanGreaterThanToken:
case ts$1.SyntaxKind.GreaterThanEqualsToken:
case ts$1.SyntaxKind.LessThanToken:
case ts$1.SyntaxKind.LessThanLessThanToken:
case ts$1.SyntaxKind.LessThanEqualsToken:
case ts$1.SyntaxKind.AmpersandToken:
case ts$1.SyntaxKind.BarToken:
case ts$1.SyntaxKind.CaretToken:
case ts$1.SyntaxKind.BarBarToken:
case ts$1.SyntaxKind.AmpersandAmpersandToken:
case ts$1.SyntaxKind.QuestionQuestionToken:
case ts$1.SyntaxKind.InKeyword:
case ts$1.SyntaxKind.QuestionQuestionEqualsToken:
case ts$1.SyntaxKind.AmpersandAmpersandEqualsToken:
case ts$1.SyntaxKind.BarBarEqualsToken:
return true;
default:
node2 = parent;
}
break;
default:
return false;
}
}
}
exports.isExpressionValueUsed = isExpressionValueUsed;
function isInDestructuringAssignment(node2) {
switch (node2.kind) {
case ts$1.SyntaxKind.ShorthandPropertyAssignment:
if (node2.objectAssignmentInitializer !== void 0)
return true;
case ts$1.SyntaxKind.PropertyAssignment:
case ts$1.SyntaxKind.SpreadAssignment:
node2 = node2.parent;
break;
case ts$1.SyntaxKind.SpreadElement:
if (node2.parent.kind !== ts$1.SyntaxKind.ArrayLiteralExpression)
return false;
node2 = node2.parent;
}
while (true) {
switch (node2.parent.kind) {
case ts$1.SyntaxKind.BinaryExpression:
return node2.parent.left === node2 && node2.parent.operatorToken.kind === ts$1.SyntaxKind.EqualsToken;
case ts$1.SyntaxKind.ForOfStatement:
return node2.parent.initializer === node2;
case ts$1.SyntaxKind.ArrayLiteralExpression:
case ts$1.SyntaxKind.ObjectLiteralExpression:
node2 = node2.parent;
break;
case ts$1.SyntaxKind.SpreadAssignment:
case ts$1.SyntaxKind.PropertyAssignment:
node2 = node2.parent.parent;
break;
case ts$1.SyntaxKind.SpreadElement:
if (node2.parent.parent.kind !== ts$1.SyntaxKind.ArrayLiteralExpression)
return false;
node2 = node2.parent.parent;
break;
default:
return false;
}
}
}
(function(AccessKind) {
AccessKind[AccessKind["None"] = 0] = "None";
AccessKind[AccessKind["Read"] = 1] = "Read";
AccessKind[AccessKind["Write"] = 2] = "Write";
AccessKind[AccessKind["Delete"] = 4] = "Delete";
AccessKind[AccessKind["ReadWrite"] = 3] = "ReadWrite";
AccessKind[AccessKind["Modification"] = 6] = "Modification";
})(exports.AccessKind || (exports.AccessKind = {}));
function getAccessKind(node2) {
const parent = node2.parent;
switch (parent.kind) {
case ts$1.SyntaxKind.DeleteExpression:
return 4;
case ts$1.SyntaxKind.PostfixUnaryExpression:
return 3;
case ts$1.SyntaxKind.PrefixUnaryExpression:
return parent.operator === ts$1.SyntaxKind.PlusPlusToken || parent.operator === ts$1.SyntaxKind.MinusMinusToken ? 3 : 1;
case ts$1.SyntaxKind.BinaryExpression:
return parent.right === node2 ? 1 : !isAssignmentKind(parent.operatorToken.kind) ? 1 : parent.operatorToken.kind === ts$1.SyntaxKind.EqualsToken ? 2 : 3;
case ts$1.SyntaxKind.ShorthandPropertyAssignment:
return parent.objectAssignmentInitializer === node2 ? 1 : isInDestructuringAssignment(parent) ? 2 : 1;
case ts$1.SyntaxKind.PropertyAssignment:
return parent.name === node2 ? 0 : isInDestructuringAssignment(parent) ? 2 : 1;
case ts$1.SyntaxKind.ArrayLiteralExpression:
case ts$1.SyntaxKind.SpreadElement:
case ts$1.SyntaxKind.SpreadAssignment:
return isInDestructuringAssignment(parent) ? 2 : 1;
case ts$1.SyntaxKind.ParenthesizedExpression:
case ts$1.SyntaxKind.NonNullExpression:
case ts$1.SyntaxKind.TypeAssertionExpression:
case ts$1.SyntaxKind.AsExpression:
return getAccessKind(parent);
case ts$1.SyntaxKind.ForOfStatement:
case ts$1.SyntaxKind.ForInStatement:
return parent.initializer === node2 ? 2 : 1;
case ts$1.SyntaxKind.ExpressionWithTypeArguments:
return parent.parent.token === ts$1.SyntaxKind.ExtendsKeyword && parent.parent.parent.kind !== ts$1.SyntaxKind.InterfaceDeclaration ? 1 : 0;
case ts$1.SyntaxKind.ComputedPropertyName:
case ts$1.SyntaxKind.ExpressionStatement:
case ts$1.SyntaxKind.TypeOfExpression:
case ts$1.SyntaxKind.ElementAccessExpression:
case ts$1.SyntaxKind.ForStatement:
case ts$1.SyntaxKind.IfStatement:
case ts$1.SyntaxKind.DoStatement:
case ts$1.SyntaxKind.WhileStatement:
case ts$1.SyntaxKind.SwitchStatement:
case ts$1.SyntaxKind.WithStatement:
case ts$1.SyntaxKind.ThrowStatement:
case ts$1.SyntaxKind.CallExpression:
case ts$1.SyntaxKind.NewExpression:
case ts$1.SyntaxKind.TaggedTemplateExpression:
case ts$1.SyntaxKind.JsxExpression:
case ts$1.SyntaxKind.Decorator:
case ts$1.SyntaxKind.TemplateSpan:
case ts$1.SyntaxKind.JsxOpeningElement:
case ts$1.SyntaxKind.JsxSelfClosingElement:
case ts$1.SyntaxKind.JsxSpreadAttribute:
case ts$1.SyntaxKind.VoidExpression:
case ts$1.SyntaxKind.ReturnStatement:
case ts$1.SyntaxKind.AwaitExpression:
case ts$1.SyntaxKind.YieldExpression:
case ts$1.SyntaxKind.ConditionalExpression:
case ts$1.SyntaxKind.CaseClause:
case ts$1.SyntaxKind.JsxElement:
return 1;
case ts$1.SyntaxKind.ArrowFunction:
return parent.body === node2 ? 1 : 2;
case ts$1.SyntaxKind.PropertyDeclaration:
case ts$1.SyntaxKind.VariableDeclaration:
case ts$1.SyntaxKind.Parameter:
case ts$1.SyntaxKind.EnumMember:
case ts$1.SyntaxKind.BindingElement:
case ts$1.SyntaxKind.JsxAttribute:
return parent.initializer === node2 ? 1 : 0;
case ts$1.SyntaxKind.PropertyAccessExpression:
return parent.expression === node2 ? 1 : 0;
case ts$1.SyntaxKind.ExportAssignment:
return parent.isExportEquals ? 1 : 0;
}
return 0;
}
exports.getAccessKind = getAccessKind;
function isReassignmentTarget(node2) {
return (getAccessKind(node2) & 2) !== 0;
}
exports.isReassignmentTarget = isReassignmentTarget;
function canHaveJsDoc(node2) {
const kind = node2.kind;
switch (kind) {
case ts$1.SyntaxKind.Parameter:
case ts$1.SyntaxKind.CallSignature:
case ts$1.SyntaxKind.ConstructSignature:
case ts$1.SyntaxKind.MethodSignature:
case ts$1.SyntaxKind.PropertySignature:
case ts$1.SyntaxKind.ArrowFunction:
case ts$1.SyntaxKind.ParenthesizedExpression:
case ts$1.SyntaxKind.SpreadAssignment:
case ts$1.SyntaxKind.ShorthandPropertyAssignment:
case ts$1.SyntaxKind.PropertyAssignment:
case ts$1.SyntaxKind.FunctionExpression:
case ts$1.SyntaxKind.LabeledStatement:
case ts$1.SyntaxKind.ExpressionStatement:
case ts$1.SyntaxKind.VariableStatement:
case ts$1.SyntaxKind.FunctionDeclaration:
case ts$1.SyntaxKind.Constructor:
case ts$1.SyntaxKind.MethodDeclaration:
case ts$1.SyntaxKind.PropertyDeclaration:
case ts$1.SyntaxKind.GetAccessor:
case ts$1.SyntaxKind.SetAccessor:
case ts$1.SyntaxKind.ClassDeclaration:
case ts$1.SyntaxKind.ClassExpression:
case ts$1.SyntaxKind.InterfaceDeclaration:
case ts$1.SyntaxKind.TypeAliasDeclaration:
case ts$1.SyntaxKind.EnumMember:
case ts$1.SyntaxKind.EnumDeclaration:
case ts$1.SyntaxKind.ModuleDeclaration:
case ts$1.SyntaxKind.ImportEqualsDeclaration:
case ts$1.SyntaxKind.ImportDeclaration:
case ts$1.SyntaxKind.NamespaceExportDeclaration:
case ts$1.SyntaxKind.ExportAssignment:
case ts$1.SyntaxKind.IndexSignature:
case ts$1.SyntaxKind.FunctionType:
case ts$1.SyntaxKind.ConstructorType:
case ts$1.SyntaxKind.JSDocFunctionType:
case ts$1.SyntaxKind.ExportDeclaration:
case ts$1.SyntaxKind.NamedTupleMember:
case ts$1.SyntaxKind.EndOfFileToken:
return true;
default:
return false;
}
}
exports.canHaveJsDoc = canHaveJsDoc;
function getJsDoc(node2, sourceFile) {
const result = [];
for (const child of node2.getChildren(sourceFile)) {
if (!node_1.isJsDoc(child))
break;
result.push(child);
}
return result;
}
exports.getJsDoc = getJsDoc;
function parseJsDocOfNode(node2, considerTrailingComments, sourceFile = node2.getSourceFile()) {
if (canHaveJsDoc(node2) && node2.kind !== ts$1.SyntaxKind.EndOfFileToken) {
const result = getJsDoc(node2, sourceFile);
if (result.length !== 0 || !considerTrailingComments)
return result;
}
return parseJsDocWorker(node2, node2.getStart(sourceFile), sourceFile, considerTrailingComments);
}
exports.parseJsDocOfNode = parseJsDocOfNode;
function parseJsDocWorker(node2, nodeStart, sourceFile, considerTrailingComments) {
const start = ts$1[considerTrailingComments && isSameLine(sourceFile, node2.pos, nodeStart) ? "forEachTrailingCommentRange" : "forEachLeadingCommentRange"](
sourceFile.text,
node2.pos,
// return object to make `0` a truthy value
(pos, _end, kind) => kind === ts$1.SyntaxKind.MultiLineCommentTrivia && sourceFile.text[pos + 2] === "*" ? { pos } : void 0
);
if (start === void 0)
return [];
const startPos = start.pos;
const text = sourceFile.text.slice(startPos, nodeStart);
const newSourceFile = ts$1.createSourceFile("jsdoc.ts", `${text}var a;`, sourceFile.languageVersion);
const result = getJsDoc(newSourceFile.statements[0], newSourceFile);
for (const doc of result)
updateNode(doc, node2);
return result;
function updateNode(n, parent) {
n.pos += startPos;
n.end += startPos;
n.parent = parent;
return ts$1.forEachChild(n, (child) => updateNode(child, n), (children) => {
children.pos += startPos;
children.end += startPos;
for (const child of children)
updateNode(child, n);
});
}
}
(function(ImportKind) {
ImportKind[ImportKind["ImportDeclaration"] = 1] = "ImportDeclaration";
ImportKind[ImportKind["ImportEquals"] = 2] = "ImportEquals";
ImportKind[ImportKind["ExportFrom"] = 4] = "ExportFrom";
ImportKind[ImportKind["DynamicImport"] = 8] = "DynamicImport";
ImportKind[ImportKind["Require"] = 16] = "Require";
ImportKind[ImportKind["ImportType"] = 32] = "ImportType";
ImportKind[ImportKind["All"] = 63] = "All";
ImportKind[ImportKind["AllImports"] = 59] = "AllImports";
ImportKind[ImportKind["AllStaticImports"] = 3] = "AllStaticImports";
ImportKind[ImportKind["AllImportExpressions"] = 24] = "AllImportExpressions";
ImportKind[ImportKind["AllRequireLike"] = 18] = "AllRequireLike";
ImportKind[ImportKind["AllNestedImports"] = 56] = "AllNestedImports";
ImportKind[ImportKind["AllTopLevelImports"] = 7] = "AllTopLevelImports";
})(exports.ImportKind || (exports.ImportKind = {}));
function findImports(sourceFile, kinds, ignoreFileName = true) {
const result = [];
for (const node2 of findImportLikeNodes(sourceFile, kinds, ignoreFileName)) {
switch (node2.kind) {
case ts$1.SyntaxKind.ImportDeclaration:
addIfTextualLiteral(node2.moduleSpecifier);
break;
case ts$1.SyntaxKind.ImportEqualsDeclaration:
addIfTextualLiteral(node2.moduleReference.expression);
break;
case ts$1.SyntaxKind.ExportDeclaration:
addIfTextualLiteral(node2.moduleSpecifier);
break;
case ts$1.SyntaxKind.CallExpression:
addIfTextualLiteral(node2.arguments[0]);
break;
case ts$1.SyntaxKind.ImportType:
if (node_1.isLiteralTypeNode(node2.argument))
addIfTextualLiteral(node2.argument.literal);
break;
default:
throw new Error("unexpected node");
}
}
return result;
function addIfTextualLiteral(node2) {
if (node_1.isTextualLiteral(node2))
result.push(node2);
}
}
exports.findImports = findImports;
function findImportLikeNodes(sourceFile, kinds, ignoreFileName = true) {
return new ImportFinder(sourceFile, kinds, ignoreFileName).find();
}
exports.findImportLikeNodes = findImportLikeNodes;
class ImportFinder {
constructor(_sourceFile, _options, _ignoreFileName) {
this._sourceFile = _sourceFile;
this._options = _options;
this._ignoreFileName = _ignoreFileName;
this._result = [];
}
find() {
if (this._sourceFile.isDeclarationFile)
this._options &= ~24;
if (this._options & 7)
this._findImports(this._sourceFile.statements);
if (this._options & 56)
this._findNestedImports();
return this._result;
}
_findImports(statements) {
for (const statement of statements) {
if (node_1.isImportDeclaration(statement)) {
if (this._options & 1)
this._result.push(statement);
} else if (node_1.isImportEqualsDeclaration(statement)) {
if (this._options & 2 && statement.moduleReference.kind === ts$1.SyntaxKind.ExternalModuleReference)
this._result.push(statement);
} else if (node_1.isExportDeclaration(statement)) {
if (statement.moduleSpecifier !== void 0 && this._options & 4)
this._result.push(statement);
} else if (node_1.isModuleDeclaration(statement)) {
this._findImportsInModule(statement);
}
}
}
_findImportsInModule(declaration) {
if (declaration.body === void 0)
return;
if (declaration.body.kind === ts$1.SyntaxKind.ModuleDeclaration)
return this._findImportsInModule(declaration.body);
this._findImports(declaration.body.statements);
}
_findNestedImports() {
const isJavaScriptFile = this._ignoreFileName || (this._sourceFile.flags & ts$1.NodeFlags.JavaScriptFile) !== 0;
let re;
let includeJsDoc;
if ((this._options & 56) === 16) {
if (!isJavaScriptFile)
return;
re = /\brequire\s*[</(]/g;
includeJsDoc = false;
} else if (this._options & 16 && isJavaScriptFile) {
re = /\b(?:import|require)\s*[</(]/g;
includeJsDoc = (this._options & 32) !== 0;
} else {
re = /\bimport\s*[</(]/g;
includeJsDoc = isJavaScriptFile && (this._options & 32) !== 0;
}
for (let match2 = re.exec(this._sourceFile.text); match2 !== null; match2 = re.exec(this._sourceFile.text)) {
const token = getTokenAtPositionWorker(
this._sourceFile,
match2.index,
this._sourceFile,
// only look for ImportTypeNode within JSDoc in JS files
match2[0][0] === "i" && includeJsDoc
);
if (token.kind === ts$1.SyntaxKind.ImportKeyword) {
if (token.end - "import".length !== match2.index)
continue;
switch (token.parent.kind) {
case ts$1.SyntaxKind.ImportType:
this._result.push(token.parent);
break;
case ts$1.SyntaxKind.CallExpression:
if (token.parent.arguments.length > 1)
this._result.push(token.parent);
}
} else if (token.kind === ts$1.SyntaxKind.Identifier && token.end - "require".length === match2.index && token.parent.kind === ts$1.SyntaxKind.CallExpression && token.parent.expression === token && token.parent.arguments.length === 1) {
this._result.push(token.parent);
}
}
}
}
function isStatementInAmbientContext(node2) {
while (node2.flags & ts$1.NodeFlags.NestedNamespace)
node2 = node2.parent;
return hasModifier(node2.modifiers, ts$1.SyntaxKind.DeclareKeyword) || isAmbientModuleBlock(node2.parent);
}
exports.isStatementInAmbientContext = isStatementInAmbientContext;
function isAmbientModuleBlock(node2) {
while (node2.kind === ts$1.SyntaxKind.ModuleBlock) {
do
node2 = node2.parent;
while (node2.flags & ts$1.NodeFlags.NestedNamespace);
if (hasModifier(node2.modifiers, ts$1.SyntaxKind.DeclareKeyword))
return true;
node2 = node2.parent;
}
return false;
}
exports.isAmbientModuleBlock = isAmbientModuleBlock;
function getIIFE(func) {
let node2 = func.parent;
while (node2.kind === ts$1.SyntaxKind.ParenthesizedExpression)
node2 = node2.parent;
return node_1.isCallExpression(node2) && func.end <= node2.expression.end ? node2 : void 0;
}
exports.getIIFE = getIIFE;
function isStrictCompilerOptionEnabled(options, option) {
return (options.strict ? options[option] !== false : options[option] === true) && (option !== "strictPropertyInitialization" || isStrictCompilerOptionEnabled(options, "strictNullChecks"));
}
exports.isStrictCompilerOptionEnabled = isStrictCompilerOptionEnabled;
function isCompilerOptionEnabled(options, option) {
switch (option) {
case "stripInternal":
case "declarationMap":
case "emitDeclarationOnly":
return options[option] === true && isCompilerOptionEnabled(options, "declaration");
case "declaration":
return options.declaration || isCompilerOptionEnabled(options, "composite");
case "incremental":
return options.incremental === void 0 ? isCompilerOptionEnabled(options, "composite") : options.incremental;
case "skipDefaultLibCheck":
return options.skipDefaultLibCheck || isCompilerOptionEnabled(options, "skipLibCheck");
case "suppressImplicitAnyIndexErrors":
return options.suppressImplicitAnyIndexErrors === true && isCompilerOptionEnabled(options, "noImplicitAny");
case "allowSyntheticDefaultImports":
return options.allowSyntheticDefaultImports !== void 0 ? options.allowSyntheticDefaultImports : isCompilerOptionEnabled(options, "esModuleInterop") || options.module === ts$1.ModuleKind.System;
case "noUncheckedIndexedAccess":
return options.noUncheckedIndexedAccess === true && isCompilerOptionEnabled(options, "strictNullChecks");
case "allowJs":
return options.allowJs === void 0 ? isCompilerOptionEnabled(options, "checkJs") : options.allowJs;
case "noImplicitAny":
case "noImplicitThis":
case "strictNullChecks":
case "strictFunctionTypes":
case "strictPropertyInitialization":
case "alwaysStrict":
case "strictBindCallApply":
return isStrictCompilerOptionEnabled(options, option);
}
return options[option] === true;
}
exports.isCompilerOptionEnabled = isCompilerOptionEnabled;
function isAmbientModule(node2) {
return node2.name.kind === ts$1.SyntaxKind.StringLiteral || (node2.flags & ts$1.NodeFlags.GlobalAugmentation) !== 0;
}
exports.isAmbientModule = isAmbientModule;
function getCheckJsDirective(source) {
return getTsCheckDirective(source);
}
exports.getCheckJsDirective = getCheckJsDirective;
function getTsCheckDirective(source) {
let directive;
ts$1.forEachLeadingCommentRange(source, (ts$1.getShebang(source) || "").length, (pos, end, kind) => {
if (kind === ts$1.SyntaxKind.SingleLineCommentTrivia) {
const text = source.slice(pos, end);
const match2 = /^\/{2,3}\s*@ts-(no)?check(?:\s|$)/i.exec(text);
if (match2 !== null)
directive = { pos, end, enabled: match2[1] === void 0 };
}
});
return directive;
}
exports.getTsCheckDirective = getTsCheckDirective;
function isConstAssertion(node2) {
return node_1.isTypeReferenceNode(node2.type) && node2.type.typeName.kind === ts$1.SyntaxKind.Identifier && node2.type.typeName.escapedText === "const";
}
exports.isConstAssertion = isConstAssertion;
function isInConstContext(node2) {
let current = node2;
while (true) {
const parent = current.parent;
outer:
switch (parent.kind) {
case ts$1.SyntaxKind.TypeAssertionExpression:
case ts$1.SyntaxKind.AsExpression:
return isConstAssertion(parent);
case ts$1.SyntaxKind.PrefixUnaryExpression:
if (current.kind !== ts$1.SyntaxKind.NumericLiteral)
return false;
switch (parent.operator) {
case ts$1.SyntaxKind.PlusToken:
case ts$1.SyntaxKind.MinusToken:
current = parent;
break outer;
default:
return false;
}
case ts$1.SyntaxKind.PropertyAssignment:
if (parent.initializer !== current)
return false;
current = parent.parent;
break;
case ts$1.SyntaxKind.ShorthandPropertyAssignment:
current = parent.parent;
break;
case ts$1.SyntaxKind.ParenthesizedExpression:
case ts$1.SyntaxKind.ArrayLiteralExpression:
case ts$1.SyntaxKind.ObjectLiteralExpression:
case ts$1.SyntaxKind.TemplateExpression:
current = parent;
break;
default:
return false;
}
}
}
exports.isInConstContext = isInConstContext;
function isReadonlyAssignmentDeclaration(node2, checker) {
if (!isBindableObjectDefinePropertyCall(node2))
return false;
const descriptorType = checker.getTypeAtLocation(node2.arguments[2]);
if (descriptorType.getProperty("value") === void 0)
return descriptorType.getProperty("set") === void 0;
const writableProp = descriptorType.getProperty("writable");
if (writableProp === void 0)
return false;
const writableType = writableProp.valueDeclaration !== void 0 && node_1.isPropertyAssignment(writableProp.valueDeclaration) ? checker.getTypeAtLocation(writableProp.valueDeclaration.initializer) : checker.getTypeOfSymbolAtLocation(writableProp, node2.arguments[2]);
return type_1.isBooleanLiteralType(writableType, false);
}
exports.isReadonlyAssignmentDeclaration = isReadonlyAssignmentDeclaration;
function isBindableObjectDefinePropertyCall(node2) {
return node2.arguments.length === 3 && node_1.isEntityNameExpression(node2.arguments[0]) && node_1.isNumericOrStringLikeLiteral(node2.arguments[1]) && node_1.isPropertyAccessExpression(node2.expression) && node2.expression.name.escapedText === "defineProperty" && node_1.isIdentifier(node2.expression.expression) && node2.expression.expression.escapedText === "Object";
}
exports.isBindableObjectDefinePropertyCall = isBindableObjectDefinePropertyCall;
function isWellKnownSymbolLiterally(node2) {
return ts$1.isPropertyAccessExpression(node2) && ts$1.isIdentifier(node2.expression) && node2.expression.escapedText === "Symbol";
}
exports.isWellKnownSymbolLiterally = isWellKnownSymbolLiterally;
function getPropertyNameOfWellKnownSymbol(node2) {
return {
displayName: `[Symbol.${node2.name.text}]`,
symbolName: "__@" + node2.name.text
};
}
exports.getPropertyNameOfWellKnownSymbol = getPropertyNameOfWellKnownSymbol;
const isTsBefore43 = (([major, minor]) => major < "4" || major === "4" && minor < "3")(ts$1.versionMajorMinor.split("."));
function getLateBoundPropertyNames(node2, checker) {
const result = {
known: true,
names: []
};
node2 = unwrapParentheses(node2);
if (isTsBefore43 && isWellKnownSymbolLiterally(node2)) {
result.names.push(getPropertyNameOfWellKnownSymbol(node2));
} else {
const type2 = checker.getTypeAtLocation(node2);
for (const key of type_1.unionTypeParts(checker.getBaseConstraintOfType(type2) || type2)) {
const propertyName = type_1.getPropertyNameFromType(key);
if (propertyName) {
result.names.push(propertyName);
} else {
result.known = false;
}
}
}
return result;
}
exports.getLateBoundPropertyNames = getLateBoundPropertyNames;
function getLateBoundPropertyNamesOfPropertyName(node2, checker) {
const staticName = getPropertyName(node2);
return staticName !== void 0 ? { known: true, names: [{ displayName: staticName, symbolName: ts$1.escapeLeadingUnderscores(staticName) }] } : node2.kind === ts$1.SyntaxKind.PrivateIdentifier ? { known: true, names: [{ displayName: node2.text, symbolName: checker.getSymbolAtLocation(node2).escapedName }] } : getLateBoundPropertyNames(node2.expression, checker);
}
exports.getLateBoundPropertyNamesOfPropertyName = getLateBoundPropertyNamesOfPropertyName;
function getSingleLateBoundPropertyNameOfPropertyName(node2, checker) {
const staticName = getPropertyName(node2);
if (staticName !== void 0)
return { displayName: staticName, symbolName: ts$1.escapeLeadingUnderscores(staticName) };
if (node2.kind === ts$1.SyntaxKind.PrivateIdentifier)
return { displayName: node2.text, symbolName: checker.getSymbolAtLocation(node2).escapedName };
const { expression } = node2;
return isTsBefore43 && isWellKnownSymbolLiterally(expression) ? getPropertyNameOfWellKnownSymbol(expression) : type_1.getPropertyNameFromType(checker.getTypeAtLocation(expression));
}
exports.getSingleLateBoundPropertyNameOfPropertyName = getSingleLateBoundPropertyNameOfPropertyName;
function unwrapParentheses(node2) {
while (node2.kind === ts$1.SyntaxKind.ParenthesizedExpression)
node2 = node2.expression;
return node2;
}
exports.unwrapParentheses = unwrapParentheses;
function formatPseudoBigInt(v) {
return `${v.negative ? "-" : ""}${v.base10Value}n`;
}
exports.formatPseudoBigInt = formatPseudoBigInt;
function hasExhaustiveCaseClauses(node2, checker) {
const caseClauses = node2.caseBlock.clauses.filter(node_1.isCaseClause);
if (caseClauses.length === 0)
return false;
const typeParts = type_1.unionTypeParts(checker.getTypeAtLocation(node2.expression));
if (typeParts.length > caseClauses.length)
return false;
const types2 = new Set(typeParts.map(getPrimitiveLiteralFromType));
if (types2.has(void 0))
return false;
const seen = /* @__PURE__ */ new Set();
for (const clause of caseClauses) {
const expressionType = checker.getTypeAtLocation(clause.expression);
if (exports.isTypeFlagSet(expressionType, ts$1.TypeFlags.Never))
continue;
const type2 = getPrimitiveLiteralFromType(expressionType);
if (types2.has(type2)) {
seen.add(type2);
} else if (type2 !== "null" && type2 !== "undefined") {
return false;
}
}
return types2.size === seen.size;
}
exports.hasExhaustiveCaseClauses = hasExhaustiveCaseClauses;
function getPrimitiveLiteralFromType(t) {
if (exports.isTypeFlagSet(t, ts$1.TypeFlags.Null))
return "null";
if (exports.isTypeFlagSet(t, ts$1.TypeFlags.Undefined))
return "undefined";
if (exports.isTypeFlagSet(t, ts$1.TypeFlags.NumberLiteral))
return `${exports.isTypeFlagSet(t, ts$1.TypeFlags.EnumLiteral) ? "enum:" : ""}${t.value}`;
if (exports.isTypeFlagSet(t, ts$1.TypeFlags.StringLiteral))
return `${exports.isTypeFlagSet(t, ts$1.TypeFlags.EnumLiteral) ? "enum:" : ""}string:${t.value}`;
if (exports.isTypeFlagSet(t, ts$1.TypeFlags.BigIntLiteral))
return formatPseudoBigInt(t.value);
if (_3_2_1.isUniqueESSymbolType(t))
return t.escapedName;
if (type_1.isBooleanLiteralType(t, true))
return "true";
if (type_1.isBooleanLiteralType(t, false))
return "false";
}
function getBaseOfClassLikeExpression(node2) {
var _a;
if (((_a = node2.heritageClauses) === null || _a === void 0 ? void 0 : _a[0].token) === ts$1.SyntaxKind.ExtendsKeyword)
return node2.heritageClauses[0].types[0];
}
exports.getBaseOfClassLikeExpression = getBaseOfClassLikeExpression;
})(util$1);
return util$1;
}
var usage = {};
var hasRequiredUsage;
function requireUsage() {
if (hasRequiredUsage)
return usage;
hasRequiredUsage = 1;
(function(exports) {
Object.defineProperty(exports, "__esModule", { value: true });
exports.collectVariableUsage = exports.getDeclarationDomain = exports.getUsageDomain = exports.UsageDomain = exports.DeclarationDomain = void 0;
const util_1 = requireUtil$1();
const ts$1 = ts;
(function(DeclarationDomain) {
DeclarationDomain[DeclarationDomain["Namespace"] = 1] = "Namespace";
DeclarationDomain[DeclarationDomain["Type"] = 2] = "Type";
DeclarationDomain[DeclarationDomain["Value"] = 4] = "Value";
DeclarationDomain[DeclarationDomain["Import"] = 8] = "Import";
DeclarationDomain[DeclarationDomain["Any"] = 7] = "Any";
})(exports.DeclarationDomain || (exports.DeclarationDomain = {}));
(function(UsageDomain) {
UsageDomain[UsageDomain["Namespace"] = 1] = "Namespace";
UsageDomain[UsageDomain["Type"] = 2] = "Type";
UsageDomain[UsageDomain["Value"] = 4] = "Value";
UsageDomain[UsageDomain["ValueOrNamespace"] = 5] = "ValueOrNamespace";
UsageDomain[UsageDomain["Any"] = 7] = "Any";
UsageDomain[UsageDomain["TypeQuery"] = 8] = "TypeQuery";
})(exports.UsageDomain || (exports.UsageDomain = {}));
function getUsageDomain(node2) {
const parent = node2.parent;
switch (parent.kind) {
case ts$1.SyntaxKind.TypeReference:
return node2.originalKeywordKind !== ts$1.SyntaxKind.ConstKeyword ? 2 : void 0;
case ts$1.SyntaxKind.ExpressionWithTypeArguments:
return parent.parent.token === ts$1.SyntaxKind.ImplementsKeyword || parent.parent.parent.kind === ts$1.SyntaxKind.InterfaceDeclaration ? 2 : 4;
case ts$1.SyntaxKind.TypeQuery:
return 5 | 8;
case ts$1.SyntaxKind.QualifiedName:
if (parent.left === node2) {
if (getEntityNameParent(parent).kind === ts$1.SyntaxKind.TypeQuery)
return 1 | 8;
return 1;
}
break;
case ts$1.SyntaxKind.ExportSpecifier:
if (parent.propertyName === void 0 || parent.propertyName === node2)
return 7;
break;
case ts$1.SyntaxKind.ExportAssignment:
return 7;
case ts$1.SyntaxKind.BindingElement:
if (parent.initializer === node2)
return 5;
break;
case ts$1.SyntaxKind.Parameter:
case ts$1.SyntaxKind.Enu
gitextract_91pjwq56/
├── .gitattributes
├── .gitignore
├── .vscode/
│ └── launch.json
├── README.md
├── cli/
│ ├── README.md
│ ├── cli.js
│ ├── compiler-dist/
│ │ ├── compiler.d.ts
│ │ ├── compiler.js
│ │ ├── readme.md
│ │ ├── shadeup-compiler.js
│ │ └── tree-sitter-shadeup.wasm
│ ├── electron/
│ │ ├── index.html
│ │ └── main.js
│ ├── index.js
│ ├── package.json
│ ├── test/
│ │ ├── main.d.ts
│ │ ├── main.js
│ │ ├── other.js
│ │ ├── other.shadeup
│ │ └── vite-project/
│ │ ├── .gitignore
│ │ ├── index.html
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── index.ts
│ │ │ ├── logoPath.shadeup
│ │ │ ├── main.d.ts
│ │ │ ├── main.js
│ │ │ ├── main.shadeup
│ │ │ ├── style.css
│ │ │ └── vite-env.d.ts
│ │ └── tsconfig.json
│ └── vite/
│ ├── .gitignore
│ ├── index.html
│ ├── main.js
│ ├── package.json
│ ├── runner.d.ts
│ ├── runner.js
│ ├── style.css
│ └── vite.config.js
├── extension/
│ └── vscode/
│ └── shadeup/
│ ├── .vscodeignore
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── Shadeup-tmLanguage.json
│ ├── client/
│ │ ├── package.json
│ │ ├── src/
│ │ │ └── extension.ts
│ │ ├── testFixture/
│ │ │ ├── completion.txt
│ │ │ └── diagnostics.txt
│ │ └── tsconfig.json
│ ├── lang.ts
│ ├── language-configuration.json
│ ├── package.json
│ ├── server/
│ │ ├── compiler-dist/
│ │ │ ├── compiler.d.ts
│ │ │ ├── compiler.js
│ │ │ ├── readme.md
│ │ │ ├── shadeup-compiler.umd.cjs
│ │ │ └── tree-sitter-shadeup.wasm
│ │ ├── package.json
│ │ ├── src/
│ │ │ └── server.ts
│ │ └── tsconfig.json
│ ├── shadeup.tmlanguage.json
│ ├── syntaxes/
│ │ └── shadeup.tmLanguage.json
│ └── tsconfig.json
├── lang/
│ ├── README.md
│ ├── shadeup/
│ │ ├── alert.ts
│ │ ├── compiler/
│ │ │ ├── assets.json
│ │ │ ├── assets.ts
│ │ │ ├── common.ts
│ │ │ ├── generateDocs.ts
│ │ │ ├── generateTsCache.ts
│ │ │ ├── interface.ts
│ │ │ ├── simple.ts
│ │ │ └── worker.ts
│ │ ├── engine/
│ │ │ ├── adapters/
│ │ │ │ ├── adapter.ts
│ │ │ │ ├── webgl.ts
│ │ │ │ └── webgpu.ts
│ │ │ ├── amd.ts
│ │ │ ├── engine-headless.ts
│ │ │ ├── engine.ts
│ │ │ ├── frame-embed.html
│ │ │ ├── frame-headless.html
│ │ │ ├── frame-preview.html
│ │ │ ├── frame.html
│ │ │ ├── gltf.js
│ │ │ ├── input/
│ │ │ │ ├── input.ts
│ │ │ │ └── keyboardKeys.ts
│ │ │ ├── requirejs.js
│ │ │ ├── setZero.ts
│ │ │ ├── shader.ts
│ │ │ ├── ui/
│ │ │ │ ├── components/
│ │ │ │ │ ├── Button.svelte
│ │ │ │ │ ├── Checkbox.svelte
│ │ │ │ │ ├── Combo.svelte
│ │ │ │ │ ├── FloatingPanel.svelte
│ │ │ │ │ ├── Group.svelte
│ │ │ │ │ ├── Host.svelte
│ │ │ │ │ ├── Label.svelte
│ │ │ │ │ ├── Slider.svelte
│ │ │ │ │ ├── Text.svelte
│ │ │ │ │ └── host.scss
│ │ │ │ ├── puck.ts
│ │ │ │ └── ui.ts
│ │ │ ├── util.ts
│ │ │ └── virtual-webgl2.js
│ │ ├── environment.ts
│ │ ├── environmentWorker.ts
│ │ ├── frame.html
│ │ ├── library/
│ │ │ ├── buffer.ts
│ │ │ ├── color.ts
│ │ │ ├── common.shadeup
│ │ │ ├── drawAttributes.ts
│ │ │ ├── drawCount.ts
│ │ │ ├── drawIndexed.ts
│ │ │ ├── examples/
│ │ │ │ ├── deferred.shadeup
│ │ │ │ ├── shadow-map.shadeup
│ │ │ │ └── transparency.shadeup
│ │ │ ├── files.ts
│ │ │ ├── geo.shadeup
│ │ │ ├── mesh.shadeup
│ │ │ ├── mesh.ts
│ │ │ ├── native.ts
│ │ │ ├── paint.ts
│ │ │ ├── physics.ts
│ │ │ ├── sdf.shadeup
│ │ │ ├── std.ts
│ │ │ ├── test.shadeup
│ │ │ ├── texture.ts
│ │ │ ├── textures.shadeup
│ │ │ ├── types.ts
│ │ │ └── ui.ts
│ │ ├── monaco/
│ │ │ └── connector.ts
│ │ ├── runner.ts
│ │ ├── symbol.ts
│ │ ├── vite.config.js
│ │ └── worker.ts
│ ├── shadeup-frontend/
│ │ ├── .gitignore
│ │ ├── f.js
│ │ ├── f.ts
│ │ ├── index.html
│ │ ├── lib/
│ │ │ ├── ariadne-ts/
│ │ │ │ └── src/
│ │ │ │ ├── _extensions.ts
│ │ │ │ ├── browser.ts
│ │ │ │ ├── data/
│ │ │ │ │ ├── Display.ts
│ │ │ │ │ ├── Formatter.ts
│ │ │ │ │ ├── Iter.ts
│ │ │ │ │ ├── Option.ts
│ │ │ │ │ ├── Range.ts
│ │ │ │ │ ├── Result.ts
│ │ │ │ │ ├── Show.ts
│ │ │ │ │ ├── Span.ts
│ │ │ │ │ └── Write.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── lib/
│ │ │ │ │ ├── Characters.ts
│ │ │ │ │ ├── Color.ts
│ │ │ │ │ ├── ColorGenerator.ts
│ │ │ │ │ ├── Config.ts
│ │ │ │ │ ├── Label.ts
│ │ │ │ │ ├── LabelInfo.ts
│ │ │ │ │ ├── Report.ts
│ │ │ │ │ ├── ReportBuilder.ts
│ │ │ │ │ ├── ReportKind.ts
│ │ │ │ │ ├── Source.ts
│ │ │ │ │ ├── SourceGroup.ts
│ │ │ │ │ └── chalk/
│ │ │ │ │ └── chalk/
│ │ │ │ │ ├── license
│ │ │ │ │ ├── readme.md
│ │ │ │ │ └── source/
│ │ │ │ │ ├── index.d.ts
│ │ │ │ │ ├── index.js
│ │ │ │ │ ├── utilities.js
│ │ │ │ │ └── vendor/
│ │ │ │ │ ├── ansi-styles/
│ │ │ │ │ │ ├── index.d.ts
│ │ │ │ │ │ └── index.js
│ │ │ │ │ └── supports-color/
│ │ │ │ │ ├── browser.d.ts
│ │ │ │ │ ├── browser.js
│ │ │ │ │ ├── index.d.ts
│ │ │ │ │ └── index.js
│ │ │ │ ├── stringFormat.ts
│ │ │ │ ├── utils/
│ │ │ │ │ ├── binary_search_by_key.ts
│ │ │ │ │ ├── include_str.ts
│ │ │ │ │ └── index.ts
│ │ │ │ └── write.ts
│ │ │ ├── environment/
│ │ │ │ ├── Errors.ts
│ │ │ │ ├── ShadeupEnvironment.ts
│ │ │ │ ├── TypescriptEnvironment.ts
│ │ │ │ ├── quickCache.json
│ │ │ │ ├── tagGraph.ts
│ │ │ │ └── validate.ts
│ │ │ ├── fast-diff/
│ │ │ │ └── diff.js
│ │ │ ├── generator/
│ │ │ │ ├── eval.js
│ │ │ │ ├── glsl.ts
│ │ │ │ ├── header.glsl
│ │ │ │ ├── header.wgsl
│ │ │ │ ├── root.ts
│ │ │ │ ├── toposort.ts
│ │ │ │ ├── transform.ts
│ │ │ │ ├── tsWalk.ts
│ │ │ │ ├── util.ts
│ │ │ │ └── wgsl.ts
│ │ │ ├── main.ts
│ │ │ ├── parser/
│ │ │ │ ├── AstContext.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── node.cjs
│ │ │ │ ├── tree-sitter-javascript.wasm
│ │ │ │ ├── tree-sitter-shadeup.wasm
│ │ │ │ ├── tree-sitter.wasm
│ │ │ │ ├── wasm.ts
│ │ │ │ └── web-tree-sitter/
│ │ │ │ └── tree-sitter.js
│ │ │ └── std/
│ │ │ ├── all.ts
│ │ │ ├── generate-static-math.ts
│ │ │ ├── global.d.ts
│ │ │ ├── math.ts
│ │ │ ├── static-math-db.ts
│ │ │ └── static-math.ts
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── index.ts
│ │ │ ├── main.ts
│ │ │ └── vite-env.d.ts
│ │ ├── test.js
│ │ ├── test.ts
│ │ ├── tsconfig.json
│ │ ├── vfs.js
│ │ └── vite.config.ts
│ └── tree-sitter/
│ ├── .gitignore
│ ├── .prettierrc
│ ├── Cargo.toml
│ ├── binding.gyp
│ ├── bindings/
│ │ ├── node/
│ │ │ ├── binding.cc
│ │ │ └── index.js
│ │ └── rust/
│ │ ├── build.rs
│ │ └── lib.rs
│ ├── build/
│ │ ├── Release/
│ │ │ ├── obj/
│ │ │ │ └── tree_sitter_shadeup_binding/
│ │ │ │ ├── bindings/
│ │ │ │ │ └── node/
│ │ │ │ │ └── binding.obj
│ │ │ │ ├── src/
│ │ │ │ │ ├── parser.obj
│ │ │ │ │ └── scanner.obj
│ │ │ │ ├── tree_sit.A95203FA.tlog/
│ │ │ │ │ ├── CL.command.1.tlog
│ │ │ │ │ ├── CL.read.1.tlog
│ │ │ │ │ ├── CL.write.1.tlog
│ │ │ │ │ ├── link.command.1.tlog
│ │ │ │ │ ├── link.read.1.tlog
│ │ │ │ │ ├── link.write.1.tlog
│ │ │ │ │ ├── tree_sitter_shadeup_binding.lastbuildstate
│ │ │ │ │ └── tree_sitter_shadeup_binding.write.1u.tlog
│ │ │ │ ├── tree_sitter_shadeup_binding.node.recipe
│ │ │ │ └── win_delay_load_hook.obj
│ │ │ ├── tree_sitter_shadeup_binding.exp
│ │ │ ├── tree_sitter_shadeup_binding.iobj
│ │ │ ├── tree_sitter_shadeup_binding.ipdb
│ │ │ ├── tree_sitter_shadeup_binding.lib
│ │ │ ├── tree_sitter_shadeup_binding.node
│ │ │ └── tree_sitter_shadeup_binding.pdb
│ │ ├── binding.sln
│ │ ├── config.gypi
│ │ ├── tree_sitter_shadeup_binding.vcxproj
│ │ └── tree_sitter_shadeup_binding.vcxproj.filters
│ ├── grammar.js
│ ├── grammer-fixed.js
│ ├── javascript.js
│ ├── package.json
│ ├── parser.exp
│ ├── parser.lib
│ ├── parser.obj
│ ├── readme.md
│ ├── scanner.obj
│ ├── shadeup-javascript.js
│ ├── src/
│ │ ├── grammar.json
│ │ ├── node-types.json
│ │ ├── parser.c
│ │ ├── scanner.c
│ │ └── tree_sitter/
│ │ └── parser.h
│ ├── test.shadeup
│ ├── tree-sitter-javascript.wasm
│ └── typescript.js
├── package/
│ ├── __lib.d.ts
│ ├── __lib.js
│ ├── __lib.shadeup
│ ├── engine-dist/
│ │ ├── DRACOLoader-4fcd2f44.js
│ │ ├── GLTFLoader-94b38cf6.js
│ │ ├── host-937690bb.js
│ │ ├── host-f3c963cd.js
│ │ ├── host-fa5c0296.js
│ │ ├── shadeup-engine.js
│ │ ├── style.css
│ │ ├── three.module-c8091b37.js
│ │ ├── ui-37189365.js
│ │ └── ui-f4b4a003.js
│ ├── engine.js
│ ├── index.js
│ ├── library.js
│ ├── main.d.ts
│ ├── math.d.ts
│ ├── package.json
│ └── util/
│ └── concat.js
├── package.json
└── unreal-engine/
├── .editorconfig
├── .gitattributes
├── .gitignore
├── .prettierignore
├── README.md
├── archive.js
├── archives/
│ └── CustomProxy_Plugin/
│ ├── ShadeupExamplePlugin.uplugin
│ ├── ShadeupExamplePlugin.uplugin.back
│ └── Source/
│ ├── CustomProxy/
│ │ ├── CustomProxy.Build.cs
│ │ ├── Private/
│ │ │ └── CustomProxy.cpp
│ │ └── Public/
│ │ └── CustomProxy.h
│ └── ShadeupTestPlugin/
│ ├── Private/
│ │ └── ShadeupExamplePlugin.cpp
│ ├── Public/
│ │ └── ShadeupExamplePlugin.h
│ └── ShadeupExamplePlugin.Build.cs
├── build/
│ └── grammar.js
├── cli.js
├── examples/
│ ├── pixel.shadeup
│ └── version2.shadeup
├── extension/
│ └── shadeup/
│ ├── .vscode/
│ │ └── launch.json
│ ├── .vscodeignore
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── language-configuration.json
│ ├── package.json
│ ├── syntaxes/
│ │ └── shadeup.tmLanguage.json
│ └── vsc-extension-quickstart.md
├── index.js
├── p.shadeup
├── package.json
├── src/
│ ├── file.js
│ ├── grammar.ne
│ ├── parse.js
│ ├── plugin_template/
│ │ ├── ShadeupExamplePlugin.uplugin
│ │ └── Source/
│ │ └── ShadeupTestPlugin/
│ │ ├── Private/
│ │ │ └── ShadeupExamplePlugin.cpp
│ │ ├── Public/
│ │ │ └── ShadeupExamplePlugin.h
│ │ └── ShadeupExamplePlugin.Build.cs
│ ├── string.ne
│ ├── template/
│ │ ├── ModulePrivate.cpp
│ │ ├── ModulePublic.h
│ │ ├── Plugin/
│ │ │ ├── MyPlugin.uplugin
│ │ │ ├── Shaders/
│ │ │ │ ├── Compute/
│ │ │ │ │ └── Private/
│ │ │ │ │ └── Template.usf
│ │ │ │ └── Factory/
│ │ │ │ └── Private/
│ │ │ │ └── Template.ush
│ │ │ └── Source/
│ │ │ └── Module/
│ │ │ ├── Private/
│ │ │ │ ├── ActorTemplate.cpp
│ │ │ │ ├── ComputeTemplate.cpp
│ │ │ │ ├── ComputeTemplate.h
│ │ │ │ ├── FactoryTemplate.cpp
│ │ │ │ ├── FactoryTemplate.h
│ │ │ │ ├── ModuleTemplate.cpp
│ │ │ │ ├── ProxyTemplate.cpp
│ │ │ │ └── ProxyTemplate.h
│ │ │ ├── Public/
│ │ │ │ ├── ActorTemplate.h
│ │ │ │ └── ModuleTemplate.h
│ │ │ └── Template.Build.cs
│ │ ├── Template.Build.cs
│ │ ├── compute.cpp
│ │ └── lib/
│ │ ├── ShadeupLib.cpp
│ │ ├── ShadeupLib.h
│ │ └── readme.md
│ ├── templates/
│ │ ├── compute/
│ │ │ └── simple-compute-shader/
│ │ │ └── Plugin/
│ │ │ ├── Shaders/
│ │ │ │ └── [MODULE]/
│ │ │ │ └── Private/
│ │ │ │ └── [NAME]/
│ │ │ │ ├── $base[NAME].usf
│ │ │ │ ├── $basemat[NAME].usf
│ │ │ │ ├── $mat[NAME].usf
│ │ │ │ ├── $pi[NAME].usf
│ │ │ │ └── $rt[NAME].usf
│ │ │ └── Source/
│ │ │ └── [MODULE]/
│ │ │ ├── Private/
│ │ │ │ └── [NAME]/
│ │ │ │ ├── [NAME].cpp
│ │ │ │ └── [NAME].h
│ │ │ └── Public/
│ │ │ └── [NAME]/
│ │ │ ├── $base[NAME]_readme.md
│ │ │ ├── $basemat[NAME]_readme.md
│ │ │ ├── $mat[NAME]_readme.md
│ │ │ ├── $pi[NAME]_readme.md
│ │ │ ├── $rt[NAME]_readme.md
│ │ │ └── [NAME].h
│ │ ├── instancing/
│ │ │ ├── compute-indirect-drawing/
│ │ │ │ └── Plugin/
│ │ │ │ ├── Shaders/
│ │ │ │ │ └── [MODULE]/
│ │ │ │ │ └── Private/
│ │ │ │ │ └── [NAME]/
│ │ │ │ │ ├── [NAME].ush
│ │ │ │ │ ├── [NAME]Compute.usf
│ │ │ │ │ └── [NAME]VertexFactory.ush
│ │ │ │ └── Source/
│ │ │ │ └── [MODULE]/
│ │ │ │ ├── Private/
│ │ │ │ │ └── [NAME]/
│ │ │ │ │ ├── [NAME]Actor.cpp
│ │ │ │ │ ├── [NAME]Component.cpp
│ │ │ │ │ ├── [NAME]SceneProxy.cpp
│ │ │ │ │ ├── [NAME]SceneProxy.h
│ │ │ │ │ ├── [NAME]VertexFactory.cpp
│ │ │ │ │ └── [NAME]VertexFactory.h
│ │ │ │ └── Public/
│ │ │ │ └── [NAME]/
│ │ │ │ ├── $base[NAME]_readme.md
│ │ │ │ ├── [NAME]Actor.h
│ │ │ │ └── [NAME]Component.h
│ │ │ └── compute-instanced-static-mesh-component/
│ │ │ └── Plugin/
│ │ │ ├── Shaders/
│ │ │ │ └── [MODULE]/
│ │ │ │ └── Private/
│ │ │ │ └── [NAME]/
│ │ │ │ ├── [NAME].ush
│ │ │ │ ├── [NAME]Compute.usf
│ │ │ │ └── [NAME]VertexFactory.ush
│ │ │ └── Source/
│ │ │ └── [MODULE]/
│ │ │ ├── Private/
│ │ │ │ └── [NAME]/
│ │ │ │ ├── [NAME]Actor.cpp
│ │ │ │ ├── [NAME]Component.cpp
│ │ │ │ ├── [NAME]SceneProxy.cpp
│ │ │ │ ├── [NAME]SceneProxy.h
│ │ │ │ ├── [NAME]VertexFactory.cpp
│ │ │ │ └── [NAME]VertexFactory.h
│ │ │ └── Public/
│ │ │ └── [NAME]/
│ │ │ ├── $inst[NAME]_readme.md
│ │ │ ├── [NAME]Actor.h
│ │ │ └── [NAME]Component.h
│ │ └── nodes/
│ │ ├── dynamic/
│ │ │ └── Plugin/
│ │ │ └── Source/
│ │ │ └── [MODULE]/
│ │ │ ├── Private/
│ │ │ │ └── [NAME]MaterialExpression.cpp
│ │ │ └── Public/
│ │ │ ├── [NAME]MaterialExpression.h
│ │ │ └── [NAME]_readme.md
│ │ ├── fn/
│ │ │ └── Plugin/
│ │ │ └── Source/
│ │ │ └── [MODULE]/
│ │ │ ├── Private/
│ │ │ │ └── [NAME]MaterialExpression.cpp
│ │ │ └── Public/
│ │ │ └── [NAME]MaterialExpression.h
│ │ ├── input/
│ │ │ └── Plugin/
│ │ │ └── Source/
│ │ │ └── [MODULE]/
│ │ │ ├── Private/
│ │ │ │ └── [NAME]MaterialExpression.cpp
│ │ │ └── Public/
│ │ │ └── [NAME]MaterialExpression.h
│ │ └── output/
│ │ └── Plugin/
│ │ └── Source/
│ │ └── [MODULE]/
│ │ ├── Private/
│ │ │ └── [NAME]MaterialExpression.cpp
│ │ └── Public/
│ │ └── [NAME]MaterialExpression.h
│ ├── types/
│ │ ├── actor.js
│ │ ├── base.js
│ │ ├── compute.js
│ │ ├── factory.js
│ │ ├── shader.js
│ │ ├── template.js
│ │ └── value.js
│ ├── util.js
│ └── whitespace.ne
├── test.hlsl
├── test.js
└── test.shadeup
Showing preview only (633K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (8274 symbols across 186 files)
FILE: cli/cli.js
function findCommonPath (line 22) | function findCommonPath(paths) {
function scanImports (line 39) | function scanImports(baseFile) {
function normalizePath (line 80) | function normalizePath(p) {
function printErrors (line 84) | function printErrors(errors, common) {
FILE: cli/compiler-dist/compiler.js
function filterDTS (line 8) | function filterDTS(files) {
function makeCompiler (line 111) | async function makeCompiler() {
function makeIncrementalCompiler (line 245) | async function makeIncrementalCompiler() {
function makeLSPCompiler (line 368) | async function makeLSPCompiler() {
FILE: cli/compiler-dist/shadeup-compiler.js
function getDefaultExportFromCjs (line 6) | function getDefaultExportFromCjs(x) {
function getAugmentedNamespace (line 9) | function getAugmentedNamespace(n) {
function hashBlocks (line 117) | function hashBlocks(w, v, p, pos, len) {
function Hash2 (line 167) | function Hash2() {
function HMAC2 (line 285) | function HMAC2(key) {
function hash (line 348) | function hash(data) {
function hmac (line 356) | function hmac(key, data) {
function fillBuffer (line 363) | function fillBuffer(buffer2, hmac2, info, counter) {
function hkdf (line 380) | function hkdf(key, salt, info, length) {
function pbkdf2 (line 406) | function pbkdf2(password, salt, iterations, dkLen) {
function cleanName (line 451) | function cleanName(name) {
function closest (line 454) | function closest(node2, cb) {
function findShadeupTags (line 462) | function findShadeupTags(declar) {
function getFunctionDeclarationFromCallExpression (line 477) | function getFunctionDeclarationFromCallExpression(checker, node2) {
function toposort (line 491) | function toposort(edges) {
function toposortinternal (line 494) | function toposortinternal(nodes, edges) {
function uniqueNodes (line 537) | function uniqueNodes(arr) {
function makeOutgoingEdges (line 546) | function makeOutgoingEdges(arr) {
function makeNodesHash (line 558) | function makeNodesHash(arr) {
function validate (line 566) | function validate(file, ast, checker) {
function validateGraph (line 607) | function validateGraph(env2, file, ast, checker) {
function isStaticPropertyAccessExpression (line 656) | function isStaticPropertyAccessExpression(checker, node2) {
function validateStatement (line 679) | function validateStatement({ checker, file }, node2) {
function validateConditionalExpression (line 691) | function validateConditionalExpression({ checker, file }, node2) {
function validateCallExpression (line 699) | function validateCallExpression({ checker, file }, node2) {
function validatePropertyAccessExpression (line 729) | function validatePropertyAccessExpression({ checker, file }, node2) {
function isTypeCompatible (line 786) | function isTypeCompatible(checker, type2, typeOther) {
function validateArrayLiteral (line 789) | function validateArrayLiteral({ checker, file }, node2) {
constant SHADER_TYPE_BLACKLIST (line 800) | const SHADER_TYPE_BLACKLIST = ["string", "null", "map"];
function validateShaderTypeUse (line 801) | function validateShaderTypeUse(env2, { checker, file }, diags, node2, ty...
function validateShaderCalls (line 834) | function validateShaderCalls(env2, vs, node2) {
function __extends (line 919) | function __extends(d, b) {
function __rest (line 938) | function __rest(s, e) {
function __decorate (line 950) | function __decorate(decorators, target, key, desc) {
function __param (line 960) | function __param(paramIndex, decorator) {
function __metadata (line 965) | function __metadata(metadataKey, metadataValue) {
function __awaiter (line 969) | function __awaiter(thisArg, _arguments, P, generator) {
function __generator (line 996) | function __generator(thisArg, body) {
function __createBinding (line 1072) | function __createBinding(o, m, k, k2) {
function __exportStar (line 1077) | function __exportStar(m, exports) {
function __values (line 1082) | function __values(o) {
function __read (line 1096) | function __read(o, n) {
function __spread (line 1117) | function __spread() {
function __spreadArrays (line 1122) | function __spreadArrays() {
function __await (line 1130) | function __await(v) {
function __asyncGenerator (line 1133) | function __asyncGenerator(thisArg, _arguments, generator) {
function __asyncDelegator (line 1169) | function __asyncDelegator(o) {
function __asyncValues (line 1182) | function __asyncValues(o) {
function __makeTemplateObject (line 1202) | function __makeTemplateObject(cooked, raw) {
function __importStar (line 1210) | function __importStar(mod) {
function __importDefault (line 1222) | function __importDefault(mod) {
function __classPrivateFieldGet (line 1225) | function __classPrivateFieldGet(receiver, privateMap) {
function __classPrivateFieldSet (line 1231) | function __classPrivateFieldSet(receiver, privateMap, value) {
method __assign (line 1240) | get __assign() {
function requireNode$4 (line 1274) | function requireNode$4() {
function requireNode$3 (line 1977) | function requireNode$3() {
function requireNode$2 (line 1995) | function requireNode$2() {
function requireNode$1 (line 2021) | function requireNode$1() {
function requireNode (line 2039) | function requireNode() {
function requireType$5 (line 2056) | function requireType$5() {
function requireType$4 (line 2134) | function requireType$4() {
function requireType$3 (line 2146) | function requireType$3() {
function requireType$2 (line 2169) | function requireType$2() {
function requireType$1 (line 2181) | function requireType$1() {
function requireTypeguard (line 2193) | function requireTypeguard() {
function require_3_2 (line 2209) | function require_3_2() {
function requireType (line 2223) | function requireType() {
function requireUtil$1 (line 2511) | function requireUtil$1() {
function requireUsage (line 4002) | function requireUsage() {
function requireControlFlow (line 4763) | function requireControlFlow() {
function requireConvertAst (line 5030) | function requireConvertAst() {
function requireUtil (line 5104) | function requireUtil() {
class GLSLCompilationError (line 5138) | class GLSLCompilationError extends Error {
method constructor (line 5139) | constructor(message, node2) {
function generateDefaultForType$2 (line 5146) | function generateDefaultForType$2(checker, _type_node) {
function getTypeFallback$2 (line 5226) | function getTypeFallback$2(checker, t) {
function followTypeReferences$1 (line 5255) | function followTypeReferences$1(t) {
function translateType$1 (line 5265) | function translateType$1(checker, t, templateFormat = false) {
function isTypeNameVector$1 (line 5390) | function isTypeNameVector$1(name) {
function getTypeNameVectorElementType$1 (line 5398) | function getTypeNameVectorElementType$1(name) {
function isTranslatedTypeNameVectorOrScalar$1 (line 5428) | function isTranslatedTypeNameVectorOrScalar$1(name) {
function isVector$1 (line 5439) | function isVector$1(checker, t) {
function getVectorElementType$1 (line 5446) | function getVectorElementType$1(checker, t) {
function isNumeric$1 (line 5453) | function isNumeric$1(checker, t) {
function escapeIdentifier$1 (line 5460) | function escapeIdentifier$1(id) {
function getVectorMask$1 (line 5466) | function getVectorMask$1(num) {
function isGLSLType$1 (line 5474) | function isGLSLType$1(name) {
function autoCastNumeric$1 (line 5477) | function autoCastNumeric$1(value, input, expected) {
function convertConciseBodyToBlock$1 (line 5489) | function convertConciseBodyToBlock$1(body) {
function compile$2 (line 5496) | function compile$2(ctx, ast, originalMapping) {
function getClosureVars$1 (line 6355) | function getClosureVars$1(checker, func) {
function getDeclarationType$1 (line 6376) | function getDeclarationType$1(checker, node2) {
class GLSLShader (line 6379) | class GLSLShader {
method constructor (line 6380) | constructor(key, source) {
function resolveFunctionName$1 (line 6387) | function resolveFunctionName$1(f) {
function resolveStructName$1 (line 6402) | function resolveStructName$1(c2) {
function isInSameScope$1 (line 6411) | function isInSameScope$1(node2, other) {
function isInShader$2 (line 6428) | function isInShader$2(node2) {
function isRootNode$1 (line 6438) | function isRootNode$1(node2) {
function isComposedFunction$1 (line 6449) | function isComposedFunction$1(checker, func) {
function resolveDeps$1 (line 6459) | function resolveDeps$1(checker, root, table = {
function resolveUniforms$1 (line 6617) | function resolveUniforms$1(checker, root) {
function isVariableDeclarationValue$1 (line 6640) | function isVariableDeclarationValue$1(checker, node2) {
function isUniformable$1 (line 6653) | function isUniformable$1(checker, decl) {
function addGLSLShader (line 6663) | function addGLSLShader(key, root, checker, env2, isComputeShader = false...
function getNodeSourceFileName$1 (line 6867) | function getNodeSourceFileName$1(node2) {
function walkNodes$2 (line 6875) | function walkNodes$2(node2, cb) {
function walkNodesWithCalls$1 (line 6879) | function walkNodesWithCalls$1(checker, node2, cb) {
function findSignatureMappingToGLSL (line 6903) | function findSignatureMappingToGLSL(checker, sym) {
function findRealSignatureMappingToGLSL (line 6920) | function findRealSignatureMappingToGLSL(checker, sig) {
function removeDoubleUnderscores$1 (line 6935) | function removeDoubleUnderscores$1(str) {
constant TYPE_BLACKLIST (line 6946) | const TYPE_BLACKLIST = [
constant RESERVED_WORDS (line 6956) | const RESERVED_WORDS = [
function generateDefaultForType$1 (line 6966) | function generateDefaultForType$1(checker, _type_node) {
function getTypeFallback$1 (line 7044) | function getTypeFallback$1(checker, t) {
function followTypeReferences (line 7073) | function followTypeReferences(t) {
function getArrayTypeInfo (line 7083) | function getArrayTypeInfo(checker, t) {
function translateType (line 7109) | function translateType(checker, t, templateFormat = false, usedInsidePot...
function isTypeNameVector (line 7247) | function isTypeNameVector(name) {
function getTypeNameVectorElementType (line 7253) | function getTypeNameVectorElementType(name) {
function getTypeNameVectorElementTypeWGSL (line 7292) | function getTypeNameVectorElementTypeWGSL(name) {
function isTranslatedTypeNameVectorOrScalar (line 7313) | function isTranslatedTypeNameVectorOrScalar(name) {
function getWGSLTypeInfo (line 7324) | function getWGSLTypeInfo(name) {
function isVector (line 7445) | function isVector(checker, t) {
function getVectorElementType (line 7452) | function getVectorElementType(checker, t) {
function isNumeric (line 7459) | function isNumeric(checker, t) {
function escapeIdentifier (line 7466) | function escapeIdentifier(id) {
function isAssignableType (line 7472) | function isAssignableType(t) {
function isGLSLType (line 7475) | function isGLSLType(name) {
function autoCastNumeric (line 7478) | function autoCastNumeric(value, input, expected, node2) {
function isUniformAccess (line 7512) | function isUniformAccess(ctx, expr) {
function accessWrap (line 7553) | function accessWrap(ctx, expr, inner) {
function getVectorMask (line 7603) | function getVectorMask(num) {
function convertConciseBodyToBlock (line 7611) | function convertConciseBodyToBlock(body) {
function getRealReturnType (line 7618) | function getRealReturnType(checker, call) {
function augmentParameter (line 7622) | function augmentParameter(checker, p) {
function augmentArgument (line 7644) | function augmentArgument(ctx, arg) {
function compile$1 (line 7656) | function compile$1(ctx, ast, originalMapping) {
function getClosureVars (line 9104) | function getClosureVars(checker, func) {
function getDeclarationType (line 9125) | function getDeclarationType(checker, node2) {
function isArrayType$1 (line 9128) | function isArrayType$1(type2, checker) {
class WGSLShader (line 9131) | class WGSLShader {
method constructor (line 9132) | constructor(key, source) {
function resolveFunctionName (line 9141) | function resolveFunctionName(f) {
function resolveStructName (line 9156) | function resolveStructName(c2) {
function isInSameScope (line 9165) | function isInSameScope(node2, other) {
function isInShader$1 (line 9182) | function isInShader$1(node2) {
function isInRoot (line 9192) | function isInRoot(node2) {
function isRootNode (line 9200) | function isRootNode(node2) {
function isComposedFunction (line 9211) | function isComposedFunction(checker, func) {
function resolveDeps (line 9221) | function resolveDeps(checker, root, table = {
function resolveUniforms (line 9407) | function resolveUniforms(checker, root) {
function isVariableDeclarationValue (line 9480) | function isVariableDeclarationValue(checker, node2) {
function isUniformable (line 9500) | function isUniformable(checker, decl) {
function isValidStructType (line 9510) | function isValidStructType(checker, type2) {
function addWGSLShader (line 9514) | function addWGSLShader(key, root, checker, env2, isComputeShader = false...
function isAlignable (line 9972) | function isAlignable(t) {
function isSpecialUniformType (line 9975) | function isSpecialUniformType(t) {
function getNodeSourceFileName (line 9978) | function getNodeSourceFileName(node2) {
function walkNodes$1 (line 9986) | function walkNodes$1(node2, cb) {
function walkNodesWithCalls (line 9990) | function walkNodesWithCalls(checker, node2, cb) {
function getSymbolAtLocationAndFollowAliases (line 10013) | function getSymbolAtLocationAndFollowAliases(checker, node2) {
function findSignatureMappingToWGSL (line 10020) | function findSignatureMappingToWGSL(checker, sym) {
function removeDoubleUnderscores (line 10037) | function removeDoubleUnderscores(str) {
class SourceNode (line 10212) | class SourceNode {
method constructor (line 10213) | constructor(startIndex, endIndex, children) {
method toString (line 10222) | toString(s) {
method print (line 10233) | print() {
function lookupIndexMapping (line 10239) | function lookupIndexMapping(indexMapping, index) {
function lookupIndexMappingRange (line 10247) | function lookupIndexMappingRange(indexMapping, start, end) {
function reverseLookupIndexMappingRange (line 10262) | function reverseLookupIndexMappingRange(indexMapping, start, end) {
function reverseLookupIndexMappingCursor (line 10277) | function reverseLookupIndexMappingCursor(indexMapping, cursor) {
function prePass (line 10290) | function prePass(ctx, ast) {
function generateDefaultForType (line 10374) | function generateDefaultForType(name) {
function isValidInteger (line 10437) | function isValidInteger(str) {
function compile (line 10444) | function compile(ctx, ast) {
function compileToString (line 11251) | function compileToString(ctx, ast) {
function isInShader (line 11260) | function isInShader(ast) {
class Parser2 (line 11273) | class Parser2 {
method constructor (line 11274) | constructor() {
method initialize (line 11277) | initialize() {
method init (line 11280) | static init(r) {
function getShadeupParser (line 12934) | async function getShadeupParser() {
class AstContext (line 12949) | class AstContext {
method constructor (line 12950) | constructor(fileName) {
method report (line 12958) | report(node2, message) {
method addImpl (line 12961) | addImpl(name, node2) {
method addImplFor (line 12968) | addImplFor(name, node2) {
function getTypeFallback (line 13506) | function getTypeFallback(checker, t) {
function getVectorLen (line 13535) | function getVectorLen(checker, type2) {
function isArrayType (line 13548) | function isArrayType(type2, checker) {
function visit (line 13557) | function visit(node2) {
function visit (line 13901) | function visit(node2) {
function visit (line 14019) | function visit(node2) {
function makeTypescriptEnvironment (line 14170) | async function makeTypescriptEnvironment(shadeupEnv) {
function diff_main (line 14240) | function diff_main(text1, text2, cursor_pos, _fix_unicode) {
function diff_compute_ (line 14271) | function diff_compute_(text1, text2) {
function diff_bisect_ (line 14312) | function diff_bisect_(text1, text2) {
function diff_bisectSplit_ (line 14397) | function diff_bisectSplit_(text1, text2, x, y) {
function diff_commonPrefix (line 14406) | function diff_commonPrefix(text1, text2) {
function diff_commonSuffix (line 14428) | function diff_commonSuffix(text1, text2) {
function diff_halfMatch_ (line 14450) | function diff_halfMatch_(text1, text2) {
function diff_cleanupMerge (line 14505) | function diff_cleanupMerge(diffs, fix_unicode) {
function is_surrogate_pair_start (line 14638) | function is_surrogate_pair_start(charCode) {
function is_surrogate_pair_end (line 14641) | function is_surrogate_pair_end(charCode) {
function starts_with_pair_end (line 14644) | function starts_with_pair_end(str) {
function ends_with_pair_start (line 14647) | function ends_with_pair_start(str) {
function remove_empty_tuples (line 14650) | function remove_empty_tuples(tuples) {
function make_edit_splice (line 14659) | function make_edit_splice(before, oldMiddle, newMiddle, after) {
function find_cursor_edit_diff (line 14670) | function find_cursor_edit_diff(oldText, newText, cursor_pos) {
function diff (line 14745) | function diff(text1, text2, cursor_pos) {
class Option (line 14779) | class Option {
method from (line 14780) | static from(obj) {
class Some (line 14786) | class Some {
method constructor (line 14787) | constructor(value) {
method map (line 14790) | map(fn) {
method map_or (line 14793) | map_or(d, fn) {
method filter (line 14796) | filter(fn) {
method or (line 14801) | or(d) {
method iter (line 14804) | iter() {
method unwrap (line 14807) | unwrap() {
method unwrap_or_else (line 14810) | unwrap_or_else(d) {
method is_some (line 14813) | is_some() {
method is_none (line 14816) | is_none() {
method equal (line 14819) | equal(other) {
method is (line 14824) | static is(o) {
class None (line 14828) | class None {
method map (line 14829) | map(fn) {
method map_or (line 14832) | map_or(d, fn) {
method filter (line 14835) | filter(fn) {
method or (line 14838) | or(d) {
method iter (line 14841) | iter() {
method unwrap (line 14844) | unwrap() {
method unwrap_or_else (line 14847) | unwrap_or_else(d) {
method is_some (line 14850) | is_some() {
method is_none (line 14853) | is_none() {
method equal (line 14856) | equal(other) {
method is (line 14859) | static is(o) {
class Ok (line 14872) | class Ok {
method constructor (line 14873) | constructor(value) {
method map (line 14876) | map(fn) {
method map_or (line 14879) | map_or(d, fn) {
method or (line 14882) | or(d) {
method is_ok (line 14885) | is_ok() {
method is_err (line 14888) | is_err() {
method unwrap (line 14891) | unwrap() {
method unwrap_or_else (line 14894) | unwrap_or_else(d) {
method is (line 14897) | static is(o) {
class Err (line 14901) | class Err {
method constructor (line 14902) | constructor(value) {
method map (line 14905) | map(fn) {
method map_or (line 14908) | map_or(d, fn) {
method or (line 14911) | or(d) {
method unwrap (line 14914) | unwrap() {
method unwrap_or_else (line 14917) | unwrap_or_else(d) {
method is_ok (line 14920) | is_ok() {
method is_err (line 14923) | is_err() {
method is (line 14926) | static is(o) {
function binary_search_by_key (line 14939) | function binary_search_by_key(arr, x, fn) {
function get_sorted_index (line 14953) | function get_sorted_index(arr, x, fn) {
function range (line 14964) | function range(start, end) {
function sort_by_key (line 14985) | function sort_by_key(arr, fn) {
function min_by_key (line 14990) | function min_by_key(arr, fn) {
class Display (line 15003) | class Display {
method constructor (line 15004) | constructor(value) {
method fg (line 15007) | fg(color) {
method bg (line 15016) | bg(color) {
method chars (line 15025) | chars() {
method map (line 15028) | map(fn) {
method display (line 15031) | display() {
method toString (line 15034) | toString() {
method unwrap_or_else (line 15037) | unwrap_or_else(d) {
class Span (line 15045) | class Span {
method constructor (line 15046) | constructor(_start, _end) {
method source (line 15051) | source() {
method start (line 15054) | set start(value) {
method start (line 15057) | get start() {
method end (line 15060) | set end(value) {
method end (line 15063) | get end() {
method len (line 15067) | len() {
method contains (line 15071) | contains(offset) {
method from (line 15077) | static from(o) {
class Range (line 15089) | class Range extends Span {
method constructor (line 15090) | constructor() {
method source (line 15094) | source() {
method len (line 15097) | len() {
method contains (line 15100) | contains(item) {
method is (line 15103) | static is(o) {
method from (line 15106) | static from(o) {
method new (line 15116) | static new(start, end) {
function ValueError (line 15120) | function ValueError(message) {
function create (line 15125) | function create(transformers) {
method constructor (line 15183) | constructor() {
method unwrap (line 15191) | unwrap() {
class Show (line 15195) | class Show {
method constructor (line 15196) | constructor(self2) {
method fmt (line 15199) | fmt(f) {
function write (line 15234) | function write(w, ...args) {
function format (line 15237) | function format(...args) {
function fromRust (line 15241) | function fromRust(node2) {
function writeln (line 15258) | function writeln(w, ...args) {
function eprintln (line 15263) | function eprintln(...args) {
class StdoutWriter (line 15266) | class StdoutWriter {
method write_str (line 15267) | write_str(s) {
method write_char (line 15270) | write_char(c2) {
method write_fmt (line 15273) | write_fmt(...args) {
class StderrWriter (line 15278) | class StderrWriter {
method write_str (line 15279) | write_str(s) {
method write_char (line 15282) | write_char(c2) {
method write_fmt (line 15285) | write_fmt(...args) {
class StringWriter (line 15290) | class StringWriter {
method constructor (line 15291) | constructor() {
method write_str (line 15294) | write_str(s) {
method write_char (line 15298) | write_char(c2) {
method write_fmt (line 15302) | write_fmt(...args) {
method map (line 15306) | map(fn) {
method unwrap (line 15309) | unwrap() {
constant ANSI_BACKGROUND_OFFSET (line 15316) | const ANSI_BACKGROUND_OFFSET = 10;
function assembleStyles (line 15384) | function assembleStyles() {
function envForceColor (line 15503) | function envForceColor() {
function translateLevel (line 15514) | function translateLevel(level) {
function _supportsColor (line 15525) | function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } =...
function createSupportsColor (line 15586) | function createSupportsColor(stream, options = {}) {
function stringReplaceAll (line 15597) | function stringReplaceAll(string, substring, replacer) {
function stringEncaseCRLFWithFirstIndex (line 15613) | function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
constant GENERATOR (line 15626) | const GENERATOR = Symbol("GENERATOR");
constant STYLER (line 15627) | const STYLER = Symbol("STYLER");
constant IS_EMPTY (line 15628) | const IS_EMPTY = Symbol("IS_EMPTY");
function createChalk (line 15644) | function createChalk(options) {
method get (line 15650) | get() {
method get (line 15662) | get() {
method get (line 15686) | get() {
method get (line 15700) | get() {
method get (line 15718) | get() {
method set (line 15721) | set(level) {
class Color (line 15789) | class Color {
function Fixed (line 15794) | function Fixed(n) {
class Config (line 15797) | class Config {
method constructor (line 15798) | constructor(cross_gap, label_attach, compact, underlines, multiline_ar...
method default (line 15808) | static default() {
method with_cross_gap (line 15826) | with_cross_gap(cross_gap) {
method with_label_attach (line 15833) | with_label_attach(label_attach) {
method with_compact (line 15840) | with_compact(compact) {
method with_underlines (line 15847) | with_underlines(underlines) {
method with_multiline_arrows (line 15854) | with_multiline_arrows(multiline_arrows) {
method with_color (line 15861) | with_color(color) {
method with_tab_width (line 15868) | with_tab_width(tab_width) {
method with_char_set (line 15875) | with_char_set(char_set) {
method error_color (line 15879) | error_color() {
method warning_color (line 15882) | warning_color() {
method advice_color (line 15885) | advice_color() {
method margin_color (line 15888) | margin_color() {
method unimportant_color (line 15891) | unimportant_color() {
method note_color (line 15894) | note_color() {
method char_width (line 15898) | char_width(c2, col) {
class Label (line 15919) | class Label {
method constructor (line 15921) | constructor(span) {
method with_message (line 15929) | with_message(msg) {
method with_color (line 15934) | with_color(color) {
method with_order (line 15948) | with_order(order) {
method with_priority (line 15961) | with_priority(priority) {
method last_offset (line 15965) | last_offset() {
method new (line 15971) | static new(obj) {
method is (line 15974) | static is(other) {
function requireHasSymbols (line 16033) | function requireHasSymbols() {
function requireImplementation$3 (line 16058) | function requireImplementation$3() {
function requireFunctionBind (line 16109) | function requireFunctionBind() {
function requireSrc (line 16119) | function requireSrc() {
function requireGetIntrinsic (line 16129) | function requireGetIntrinsic() {
function requireCallBind (line 16433) | function requireCallBind() {
function uncurryThis (line 16852) | function uncurryThis(f) {
function checkBoxedPrimitive (line 16867) | function checkBoxedPrimitive(value, prototypeValueOf) {
function isPromise (line 16881) | function isPromise(input) {
function isArrayBufferView (line 16885) | function isArrayBufferView(value) {
function isUint8Array (line 16892) | function isUint8Array(value) {
function isUint8ClampedArray (line 16896) | function isUint8ClampedArray(value) {
function isUint16Array (line 16900) | function isUint16Array(value) {
function isUint32Array (line 16904) | function isUint32Array(value) {
function isInt8Array (line 16908) | function isInt8Array(value) {
function isInt16Array (line 16912) | function isInt16Array(value) {
function isInt32Array (line 16916) | function isInt32Array(value) {
function isFloat32Array (line 16920) | function isFloat32Array(value) {
function isFloat64Array (line 16924) | function isFloat64Array(value) {
function isBigInt64Array (line 16928) | function isBigInt64Array(value) {
function isBigUint64Array (line 16932) | function isBigUint64Array(value) {
function isMapToString (line 16936) | function isMapToString(value) {
function isMap (line 16940) | function isMap(value) {
function isSetToString (line 16947) | function isSetToString(value) {
function isSet (line 16951) | function isSet(value) {
function isWeakMapToString (line 16958) | function isWeakMapToString(value) {
function isWeakMap (line 16962) | function isWeakMap(value) {
function isWeakSetToString (line 16969) | function isWeakSetToString(value) {
function isWeakSet (line 16973) | function isWeakSet(value) {
function isArrayBufferToString (line 16977) | function isArrayBufferToString(value) {
function isArrayBuffer (line 16981) | function isArrayBuffer(value) {
function isDataViewToString (line 16988) | function isDataViewToString(value) {
function isDataView (line 16992) | function isDataView(value) {
function isSharedArrayBufferToString (line 17000) | function isSharedArrayBufferToString(value) {
function isSharedArrayBuffer (line 17003) | function isSharedArrayBuffer(value) {
function isAsyncFunction (line 17013) | function isAsyncFunction(value) {
function isMapIterator (line 17017) | function isMapIterator(value) {
function isSetIterator (line 17021) | function isSetIterator(value) {
function isGeneratorObject (line 17025) | function isGeneratorObject(value) {
function isWebAssemblyCompiledModule (line 17029) | function isWebAssemblyCompiledModule(value) {
function isNumberObject (line 17033) | function isNumberObject(value) {
function isStringObject (line 17037) | function isStringObject(value) {
function isBooleanObject (line 17041) | function isBooleanObject(value) {
function isBigIntObject (line 17045) | function isBigIntObject(value) {
function isSymbolObject (line 17049) | function isSymbolObject(value) {
function isBoxedPrimitive (line 17053) | function isBoxedPrimitive(value) {
function isAnyArrayBuffer (line 17057) | function isAnyArrayBuffer(value) {
function deprecated (line 17161) | function deprecated() {
function inspect (line 17199) | function inspect(obj, opts) {
function stylizeWithColor (line 17252) | function stylizeWithColor(str, styleType) {
function stylizeNoColor (line 17260) | function stylizeNoColor(str, styleType) {
function arrayToHash (line 17263) | function arrayToHash(array) {
function formatValue (line 17270) | function formatValue(ctx, value, recurseTimes) {
function formatPrimitive (line 17347) | function formatPrimitive(ctx, value) {
function formatError (line 17361) | function formatError(value) {
function formatArray (line 17364) | function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
function formatProperty (line 17394) | function formatProperty(ctx, value, recurseTimes, visibleKeys, key, arra...
function reduceToSingleString (line 17448) | function reduceToSingleString(output, base, braces) {
function isArray (line 17460) | function isArray(ar) {
function isBoolean2 (line 17464) | function isBoolean2(arg) {
function isNull (line 17468) | function isNull(arg) {
function isNullOrUndefined (line 17472) | function isNullOrUndefined(arg) {
function isNumber2 (line 17476) | function isNumber2(arg) {
function isString2 (line 17480) | function isString2(arg) {
function isSymbol (line 17484) | function isSymbol(arg) {
function isUndefined (line 17488) | function isUndefined(arg) {
function isRegExp (line 17492) | function isRegExp(re) {
function isObject (line 17497) | function isObject(arg) {
function isDate (line 17501) | function isDate(d) {
function isError (line 17506) | function isError(e) {
function isFunction (line 17511) | function isFunction(arg) {
function isPrimitive (line 17515) | function isPrimitive(arg) {
function objectToString (line 17521) | function objectToString(o) {
function pad (line 17524) | function pad(n) {
function timestamp (line 17541) | function timestamp() {
function hasOwnProperty2 (line 17564) | function hasOwnProperty2(obj, prop) {
function fn (line 17584) | function fn() {
function callbackifyOnRejected (line 17622) | function callbackifyOnRejected(reason, cb) {
function callbackify (line 17630) | function callbackify(original) {
function requireErrors (line 17666) | function requireErrors() {
function requireAssertion_error (line 17855) | function requireAssertion_error() {
function requireEs6ObjectAssign (line 18333) | function requireEs6ObjectAssign() {
function requireIsArguments (line 18376) | function requireIsArguments() {
function requireImplementation$2 (line 18393) | function requireImplementation$2() {
function requireObjectKeys (line 18515) | function requireObjectKeys() {
function requireHasPropertyDescriptors (line 18550) | function requireHasPropertyDescriptors() {
function requireDefineProperties (line 18582) | function requireDefineProperties() {
function requireImplementation$1 (line 18633) | function requireImplementation$1() {
function requirePolyfill$1 (line 18656) | function requirePolyfill$1() {
function requireShim$1 (line 18668) | function requireShim$1() {
function requireObjectIs (line 18687) | function requireObjectIs() {
function requireImplementation (line 18707) | function requireImplementation() {
function requirePolyfill (line 18718) | function requirePolyfill() {
function requireShim (line 18733) | function requireShim() {
function requireIsNan (line 18752) | function requireIsNan() {
function requireComparisons (line 18772) | function requireComparisons() {
function requireAssert (line 19285) | function requireAssert() {
class Characters (line 19765) | class Characters {
method unicode (line 19766) | static unicode() {
method ascii (line 19789) | static ascii() {
class LabelInfo (line 19818) | class LabelInfo {
method constructor (line 19819) | constructor(kind, label) {
class ReportBuilder (line 19824) | class ReportBuilder {
method constructor (line 19825) | constructor(kind, code, msg, note, help, location, labels, config) {
method with_code (line 19836) | with_code(code) {
method set_message (line 19841) | set_message(msg) {
method with_message (line 19845) | with_message(msg) {
method set_note (line 19850) | set_note(note) {
method with_note (line 19854) | with_note(note) {
method set_help (line 19859) | set_help(note) {
method with_help (line 19863) | with_help(note) {
method add_label (line 19868) | add_label(label) {
method add_labels (line 19872) | add_labels(labels) {
method with_label (line 19876) | with_label(label) {
method with_config (line 19881) | with_config(config) {
method finish (line 19886) | finish() {
class ReportKind (line 19900) | class ReportKind {
method constructor (line 19901) | constructor(...args) {
method fmt (line 19903) | fmt(f) {
method constructor (line 19928) | constructor(s, color) {
class Cache (line 19936) | class Cache {
method from (line 19937) | static from(init) {
class Line (line 19946) | class Line {
method constructor (line 19947) | constructor(_offset, _len, _chars) {
method offset (line 19953) | offset() {
method len (line 19957) | len() {
method span (line 19961) | span() {
method chars (line 19965) | chars() {
class Source (line 19969) | class Source {
method constructor (line 19970) | constructor(_lines, _len) {
method from (line 19977) | static from(s, ...args) {
method len (line 19992) | len() {
method chars (line 19996) | chars() {
method line (line 20000) | line(idx) {
method lines (line 20005) | lines() {
method get_offset_line (line 20011) | get_offset_line(offset) {
method get_line_range (line 20031) | get_line_range(span) {
method fetch (line 20039) | fetch(_) {
method display (line 20042) | display(_) {
method is (line 20045) | static is(other) {
class IdSource (line 20049) | class IdSource extends Source {
method constructor (line 20050) | constructor(_lines, _len, data) {
method fetch (line 20054) | fetch(id) {
method display (line 20057) | display(id) {
class FnCache (line 20061) | class FnCache {
method constructor (line 20062) | constructor(sources2, get) {
method new (line 20067) | static new(get) {
method with_sources (line 20071) | with_sources(sources2) {
method fetch (line 20077) | fetch(id) {
method display (line 20085) | display(id) {
method is (line 20088) | static is(other) {
class SourceGroup (line 20092) | class SourceGroup {
method constructor (line 20093) | constructor(src_id, span, labels) {
class Report (line 20099) | class Report {
method constructor (line 20100) | constructor(kind, code, msg, note, help, location, labels, config) {
method build (line 20111) | static build(kind, src_id, offset) {
method eprint (line 20125) | eprint(init) {
method print (line 20133) | print(init) {
method printTo (line 20137) | printTo(init, writer) {
method get_source_groups (line 20141) | get_source_groups(cache) {
method write (line 20176) | write(cache, w) {
function match (line 20689) | function match(kind, matchers) {
function to_array (line 20718) | function to_array(a) {
function count (line 20727) | function count(a) {
function makeIter (line 20730) | function makeIter(arr) {
function AnsiUp3 (line 20770) | function AnsiUp3() {
function rgx (line 21123) | function rgx(tmplObj) {
function rgxG (line 21129) | function rgxG(tmplObj) {
function nicerError (line 21140) | function nicerError(e) {
class TagNode (line 21146) | class TagNode {
method constructor (line 21147) | constructor(name, tsNode) {
class TagGraph (line 21155) | class TagGraph {
method constructor (line 21156) | constructor() {
method addNode (line 21159) | addNode(name, tsNode) {
method addEdge (line 21166) | addEdge(from, to) {
method addTag (line 21180) | addTag(name, tag) {
method getNode (line 21188) | getNode(name) {
method resolveTagSourceChain (line 21191) | resolveTagSourceChain(name, tag) {
method propagateTags (line 21219) | propagateTags() {
function countLines (line 27570) | function countLines(str) {
function indexToRowColumn (line 27579) | function indexToRowColumn(str, index) {
function rowColumnToIndex (line 27592) | function rowColumnToIndex(str, row, column) {
function getDiffRange (line 27607) | function getDiffRange(a, b) {
function getReplaceRange (line 27654) | function getReplaceRange(a, b) {
function getFunctionNodeName (line 27710) | function getFunctionNodeName(node2, sourceFile) {
function canTypesBeCasted (line 27720) | function canTypesBeCasted(a, b) {
class ShadeupEnvironment (line 27733) | class ShadeupEnvironment {
method constructor (line 27734) | constructor(opts) {
method init (line 27752) | async init() {
method setAssetMapping (line 27761) | setAssetMapping(assets) {
method print (line 27765) | print(...args) {
method reset (line 27770) | reset() {
method applyTags (line 27784) | applyTags() {
method regenerate (line 27851) | async regenerate(filePath) {
method mixInShaders (line 27968) | mixInShaders(file, code) {
method mixInStructs (line 28003) | mixInStructs(root, code) {
method errors (line 28036) | errors(files2) {
method completions (line 28086) | completions(path, pos) {
method classifications (line 28160) | classifications(path) {
method hover (line 28220) | hover(path, pos) {
method getFileErrorData (line 28249) | getFileErrorData(f, estart, eend) {
method transformTSError (line 28277) | transformTSError(file, error) {
method translateSource (line 28362) | async translateSource(file, range2 = null) {
method extractFlatSymbolMap (line 28406) | extractFlatSymbolMap(rootNode) {
method writeFile (line 28423) | async writeFile(path, content, ignoreValidate = false) {
method writeFileTypescript (line 28495) | async writeFileTypescript(path, content) {
method addDiagnostic (line 28526) | addDiagnostic(path, diagnostic) {
method printNodeLocation (line 28532) | printNodeLocation(n) {
method renderShaders (line 28543) | renderShaders(path) {
method patchFile (line 28640) | patchFile(path, content, start, length) {
function walkNodes (line 28643) | function walkNodes(node2, cb) {
function hasShadeupDocTag (line 28647) | function hasShadeupDocTag(node2, tagName) {
function makeSimpleShadeupEnvironment (line 30926) | async function makeSimpleShadeupEnvironment(esnext = false, declaration ...
FILE: cli/electron/main.js
function createWindow (line 7) | function createWindow() {
FILE: cli/test/main.js
function adopt (line 156) | function adopt(value) { return value instanceof P ? value : new P(functi...
function fulfilled (line 158) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
function rejected (line 159) | function rejected(value) { try { step(generator["throw"](value)); } catc...
function step (line 160) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
function verb (line 167) | function verb(n) { return function (v) { return step([n, v]); }; }
function step (line 168) | function step(op) {
function main (line 197) | function main() {
function giveFloat (line 208) | function giveFloat() { return 1.0; }
FILE: cli/test/vite-project/src/index.ts
function sizeCanvas (line 22) | function sizeCanvas() {
FILE: cli/test/vite-project/src/main.js
function adopt (line 630) | function adopt(value) { return value instanceof P ? value : new P(functi...
function fulfilled (line 632) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
function rejected (line 633) | function rejected(value) { try { step(generator["throw"](value)); } catc...
function step (line 634) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
function verb (line 641) | function verb(n) { return function (v) { return step([n, v]); }; }
function step (line 642) | function step(op) {
function setTexture (line 681) | function setTexture(newTex) {
function setModel (line 686) | function setModel(newModel) {
function main (line 693) | function main() {
FILE: cli/vite/main.js
function sizeCanvas (line 11) | function sizeCanvas() {
FILE: cli/vite/runner.d.ts
class CustomCamera2d (line 9) | class CustomCamera2d {
FILE: extension/vscode/shadeup/client/src/extension.ts
function activate (line 18) | function activate(context: ExtensionContext) {
function deactivate (line 57) | function deactivate(): Thenable<void> | undefined {
FILE: extension/vscode/shadeup/lang.ts
type Rule (line 15) | type Rule = tm.Rule<BicepScope>;
type IncludeRule (line 16) | type IncludeRule = tm.IncludeRule<BicepScope>;
type BeginEndRule (line 17) | type BeginEndRule = tm.BeginEndRule<BicepScope>;
type MatchRule (line 18) | type MatchRule = tm.MatchRule<BicepScope>;
type Grammar (line 19) | type Grammar = tm.Grammar<BicepScope>;
type BicepScope (line 21) | type BicepScope =
function withComments (line 124) | function withComments(input: Rule[]): Rule[] {
function generateGrammar (line 299) | async function generateGrammar(): Promise<string> {
FILE: extension/vscode/shadeup/server/compiler-dist/shadeup-compiler.umd.cjs
function getDefaultExportFromCjs (line 6) | function getDefaultExportFromCjs(x) {
function getAugmentedNamespace (line 9) | function getAugmentedNamespace(n) {
function hashBlocks (line 117) | function hashBlocks(w, v, p, pos, len) {
function Hash2 (line 167) | function Hash2() {
function HMAC2 (line 285) | function HMAC2(key) {
function hash (line 348) | function hash(data) {
function hmac (line 356) | function hmac(key, data) {
function fillBuffer (line 363) | function fillBuffer(buffer2, hmac2, info, counter) {
function hkdf (line 380) | function hkdf(key, salt, info, length) {
function pbkdf2 (line 406) | function pbkdf2(password, salt, iterations, dkLen) {
function cleanName (line 451) | function cleanName(name) {
function closest (line 454) | function closest(node2, cb) {
function findShadeupTags (line 462) | function findShadeupTags(declar) {
function getFunctionDeclarationFromCallExpression (line 477) | function getFunctionDeclarationFromCallExpression(checker, node2) {
function toposort (line 491) | function toposort(edges) {
function toposortinternal (line 494) | function toposortinternal(nodes, edges) {
function uniqueNodes (line 537) | function uniqueNodes(arr) {
function makeOutgoingEdges (line 546) | function makeOutgoingEdges(arr) {
function makeNodesHash (line 558) | function makeNodesHash(arr) {
function validate (line 566) | function validate(file, ast, checker) {
function validateGraph (line 607) | function validateGraph(env2, file, ast, checker) {
function isStaticPropertyAccessExpression (line 656) | function isStaticPropertyAccessExpression(checker, node2) {
function validateStatement (line 679) | function validateStatement({ checker, file }, node2) {
function validateConditionalExpression (line 691) | function validateConditionalExpression({ checker, file }, node2) {
function validateCallExpression (line 699) | function validateCallExpression({ checker, file }, node2) {
function validatePropertyAccessExpression (line 729) | function validatePropertyAccessExpression({ checker, file }, node2) {
function isTypeCompatible (line 786) | function isTypeCompatible(checker, type2, typeOther) {
function validateArrayLiteral (line 789) | function validateArrayLiteral({ checker, file }, node2) {
function validateShaderTypeUse (line 801) | function validateShaderTypeUse(env2, { checker, file }, diags, node2, ty...
function validateShaderCalls (line 834) | function validateShaderCalls(env2, vs, node2) {
function __extends (line 919) | function __extends(d, b) {
function __rest (line 938) | function __rest(s, e) {
function __decorate (line 950) | function __decorate(decorators, target, key, desc) {
function __param (line 960) | function __param(paramIndex, decorator) {
function __metadata (line 965) | function __metadata(metadataKey, metadataValue) {
function __awaiter (line 969) | function __awaiter(thisArg, _arguments, P, generator) {
function __generator (line 996) | function __generator(thisArg, body) {
function __createBinding (line 1072) | function __createBinding(o, m, k, k2) {
function __exportStar (line 1077) | function __exportStar(m, exports3) {
function __values (line 1082) | function __values(o) {
function __read (line 1096) | function __read(o, n) {
function __spread (line 1117) | function __spread() {
function __spreadArrays (line 1122) | function __spreadArrays() {
function __await (line 1130) | function __await(v) {
function __asyncGenerator (line 1133) | function __asyncGenerator(thisArg, _arguments, generator) {
function __asyncDelegator (line 1169) | function __asyncDelegator(o) {
function __asyncValues (line 1182) | function __asyncValues(o) {
function __makeTemplateObject (line 1202) | function __makeTemplateObject(cooked, raw) {
function __importStar (line 1210) | function __importStar(mod) {
function __importDefault (line 1222) | function __importDefault(mod) {
function __classPrivateFieldGet (line 1225) | function __classPrivateFieldGet(receiver, privateMap) {
function __classPrivateFieldSet (line 1231) | function __classPrivateFieldSet(receiver, privateMap, value) {
method __assign (line 1240) | get __assign() {
function requireNode$4 (line 1274) | function requireNode$4() {
function requireNode$3 (line 1977) | function requireNode$3() {
function requireNode$2 (line 1995) | function requireNode$2() {
function requireNode$1 (line 2021) | function requireNode$1() {
function requireNode (line 2039) | function requireNode() {
function requireType$5 (line 2056) | function requireType$5() {
function requireType$4 (line 2134) | function requireType$4() {
function requireType$3 (line 2146) | function requireType$3() {
function requireType$2 (line 2169) | function requireType$2() {
function requireType$1 (line 2181) | function requireType$1() {
function requireTypeguard (line 2193) | function requireTypeguard() {
function require_3_2 (line 2209) | function require_3_2() {
function requireType (line 2223) | function requireType() {
function requireUtil$1 (line 2511) | function requireUtil$1() {
function requireUsage (line 4002) | function requireUsage() {
function requireControlFlow (line 4763) | function requireControlFlow() {
function requireConvertAst (line 5030) | function requireConvertAst() {
function requireUtil (line 5104) | function requireUtil() {
class GLSLCompilationError (line 5138) | class GLSLCompilationError extends Error {
method constructor (line 5139) | constructor(message, node2) {
function generateDefaultForType$2 (line 5146) | function generateDefaultForType$2(checker, _type_node) {
function getTypeFallback$2 (line 5226) | function getTypeFallback$2(checker, t) {
function followTypeReferences$1 (line 5255) | function followTypeReferences$1(t) {
function translateType$1 (line 5265) | function translateType$1(checker, t, templateFormat = false) {
function isTypeNameVector$1 (line 5390) | function isTypeNameVector$1(name) {
function getTypeNameVectorElementType$1 (line 5398) | function getTypeNameVectorElementType$1(name) {
function isTranslatedTypeNameVectorOrScalar$1 (line 5428) | function isTranslatedTypeNameVectorOrScalar$1(name) {
function isVector$1 (line 5439) | function isVector$1(checker, t) {
function getVectorElementType$1 (line 5446) | function getVectorElementType$1(checker, t) {
function isNumeric$1 (line 5453) | function isNumeric$1(checker, t) {
function escapeIdentifier$1 (line 5460) | function escapeIdentifier$1(id) {
function getVectorMask$1 (line 5466) | function getVectorMask$1(num) {
function isGLSLType$1 (line 5474) | function isGLSLType$1(name) {
function autoCastNumeric$1 (line 5477) | function autoCastNumeric$1(value, input, expected) {
function convertConciseBodyToBlock$1 (line 5489) | function convertConciseBodyToBlock$1(body) {
function compile$2 (line 5496) | function compile$2(ctx, ast, originalMapping) {
function getClosureVars$1 (line 6355) | function getClosureVars$1(checker, func) {
function getDeclarationType$1 (line 6376) | function getDeclarationType$1(checker, node2) {
class GLSLShader (line 6379) | class GLSLShader {
method constructor (line 6380) | constructor(key, source) {
function resolveFunctionName$1 (line 6387) | function resolveFunctionName$1(f) {
function resolveStructName$1 (line 6402) | function resolveStructName$1(c2) {
function isInSameScope$1 (line 6411) | function isInSameScope$1(node2, other) {
function isInShader$2 (line 6428) | function isInShader$2(node2) {
function isRootNode$1 (line 6438) | function isRootNode$1(node2) {
function isComposedFunction$1 (line 6449) | function isComposedFunction$1(checker, func) {
function resolveDeps$1 (line 6459) | function resolveDeps$1(checker, root, table = {
function resolveUniforms$1 (line 6617) | function resolveUniforms$1(checker, root) {
function isVariableDeclarationValue$1 (line 6640) | function isVariableDeclarationValue$1(checker, node2) {
function isUniformable$1 (line 6653) | function isUniformable$1(checker, decl) {
function addGLSLShader (line 6663) | function addGLSLShader(key, root, checker, env2, isComputeShader = false...
function getNodeSourceFileName$1 (line 6867) | function getNodeSourceFileName$1(node2) {
function walkNodes$2 (line 6875) | function walkNodes$2(node2, cb) {
function walkNodesWithCalls$1 (line 6879) | function walkNodesWithCalls$1(checker, node2, cb) {
function findSignatureMappingToGLSL (line 6903) | function findSignatureMappingToGLSL(checker, sym) {
function findRealSignatureMappingToGLSL (line 6920) | function findRealSignatureMappingToGLSL(checker, sig) {
function removeDoubleUnderscores$1 (line 6935) | function removeDoubleUnderscores$1(str) {
function generateDefaultForType$1 (line 6966) | function generateDefaultForType$1(checker, _type_node) {
function getTypeFallback$1 (line 7044) | function getTypeFallback$1(checker, t) {
function followTypeReferences (line 7073) | function followTypeReferences(t) {
function getArrayTypeInfo (line 7083) | function getArrayTypeInfo(checker, t) {
function translateType (line 7109) | function translateType(checker, t, templateFormat = false, usedInsidePot...
function isTypeNameVector (line 7247) | function isTypeNameVector(name) {
function getTypeNameVectorElementType (line 7253) | function getTypeNameVectorElementType(name) {
function getTypeNameVectorElementTypeWGSL (line 7292) | function getTypeNameVectorElementTypeWGSL(name) {
function isTranslatedTypeNameVectorOrScalar (line 7313) | function isTranslatedTypeNameVectorOrScalar(name) {
function getWGSLTypeInfo (line 7324) | function getWGSLTypeInfo(name) {
function isVector (line 7445) | function isVector(checker, t) {
function getVectorElementType (line 7452) | function getVectorElementType(checker, t) {
function isNumeric (line 7459) | function isNumeric(checker, t) {
function escapeIdentifier (line 7466) | function escapeIdentifier(id) {
function isAssignableType (line 7472) | function isAssignableType(t) {
function isGLSLType (line 7475) | function isGLSLType(name) {
function autoCastNumeric (line 7478) | function autoCastNumeric(value, input, expected, node2) {
function isUniformAccess (line 7512) | function isUniformAccess(ctx, expr) {
function accessWrap (line 7553) | function accessWrap(ctx, expr, inner) {
function getVectorMask (line 7603) | function getVectorMask(num) {
function convertConciseBodyToBlock (line 7611) | function convertConciseBodyToBlock(body) {
function getRealReturnType (line 7618) | function getRealReturnType(checker, call) {
function augmentParameter (line 7622) | function augmentParameter(checker, p) {
function augmentArgument (line 7644) | function augmentArgument(ctx, arg) {
function compile$1 (line 7656) | function compile$1(ctx, ast, originalMapping) {
function getClosureVars (line 9104) | function getClosureVars(checker, func) {
function getDeclarationType (line 9125) | function getDeclarationType(checker, node2) {
function isArrayType$1 (line 9128) | function isArrayType$1(type2, checker) {
class WGSLShader (line 9131) | class WGSLShader {
method constructor (line 9132) | constructor(key, source) {
function resolveFunctionName (line 9141) | function resolveFunctionName(f) {
function resolveStructName (line 9156) | function resolveStructName(c2) {
function isInSameScope (line 9165) | function isInSameScope(node2, other) {
function isInShader$1 (line 9182) | function isInShader$1(node2) {
function isInRoot (line 9192) | function isInRoot(node2) {
function isRootNode (line 9200) | function isRootNode(node2) {
function isComposedFunction (line 9211) | function isComposedFunction(checker, func) {
function resolveDeps (line 9221) | function resolveDeps(checker, root, table = {
function resolveUniforms (line 9407) | function resolveUniforms(checker, root) {
function isVariableDeclarationValue (line 9480) | function isVariableDeclarationValue(checker, node2) {
function isUniformable (line 9500) | function isUniformable(checker, decl) {
function isValidStructType (line 9510) | function isValidStructType(checker, type2) {
function addWGSLShader (line 9514) | function addWGSLShader(key, root, checker, env2, isComputeShader = false...
function isAlignable (line 9972) | function isAlignable(t) {
function isSpecialUniformType (line 9975) | function isSpecialUniformType(t) {
function getNodeSourceFileName (line 9978) | function getNodeSourceFileName(node2) {
function walkNodes$1 (line 9986) | function walkNodes$1(node2, cb) {
function walkNodesWithCalls (line 9990) | function walkNodesWithCalls(checker, node2, cb) {
function getSymbolAtLocationAndFollowAliases (line 10013) | function getSymbolAtLocationAndFollowAliases(checker, node2) {
function findSignatureMappingToWGSL (line 10020) | function findSignatureMappingToWGSL(checker, sym) {
function removeDoubleUnderscores (line 10037) | function removeDoubleUnderscores(str) {
class SourceNode (line 10212) | class SourceNode {
method constructor (line 10213) | constructor(startIndex, endIndex, children) {
method toString (line 10222) | toString(s) {
method print (line 10233) | print() {
function lookupIndexMapping (line 10239) | function lookupIndexMapping(indexMapping, index) {
function lookupIndexMappingRange (line 10247) | function lookupIndexMappingRange(indexMapping, start, end) {
function reverseLookupIndexMappingRange (line 10262) | function reverseLookupIndexMappingRange(indexMapping, start, end) {
function reverseLookupIndexMappingCursor (line 10277) | function reverseLookupIndexMappingCursor(indexMapping, cursor) {
function prePass (line 10290) | function prePass(ctx, ast) {
function generateDefaultForType (line 10374) | function generateDefaultForType(name) {
function isValidInteger (line 10437) | function isValidInteger(str) {
function compile (line 10444) | function compile(ctx, ast) {
function compileToString (line 11251) | function compileToString(ctx, ast) {
function isInShader (line 11260) | function isInShader(ast) {
class Parser2 (line 11273) | class Parser2 {
method constructor (line 11274) | constructor() {
method initialize (line 11277) | initialize() {
method init (line 11280) | static init(r) {
function getShadeupParser (line 12934) | async function getShadeupParser() {
class AstContext (line 12949) | class AstContext {
method constructor (line 12950) | constructor(fileName) {
method report (line 12958) | report(node2, message) {
method addImpl (line 12961) | addImpl(name, node2) {
method addImplFor (line 12968) | addImplFor(name, node2) {
function getTypeFallback (line 13506) | function getTypeFallback(checker, t) {
function getVectorLen (line 13535) | function getVectorLen(checker, type2) {
function isArrayType (line 13548) | function isArrayType(type2, checker) {
function visit (line 13557) | function visit(node2) {
function visit (line 13901) | function visit(node2) {
function visit (line 14019) | function visit(node2) {
function makeTypescriptEnvironment (line 14170) | async function makeTypescriptEnvironment(shadeupEnv) {
function diff_main (line 14240) | function diff_main(text1, text2, cursor_pos, _fix_unicode) {
function diff_compute_ (line 14271) | function diff_compute_(text1, text2) {
function diff_bisect_ (line 14312) | function diff_bisect_(text1, text2) {
function diff_bisectSplit_ (line 14397) | function diff_bisectSplit_(text1, text2, x, y) {
function diff_commonPrefix (line 14406) | function diff_commonPrefix(text1, text2) {
function diff_commonSuffix (line 14428) | function diff_commonSuffix(text1, text2) {
function diff_halfMatch_ (line 14450) | function diff_halfMatch_(text1, text2) {
function diff_cleanupMerge (line 14505) | function diff_cleanupMerge(diffs, fix_unicode) {
function is_surrogate_pair_start (line 14638) | function is_surrogate_pair_start(charCode) {
function is_surrogate_pair_end (line 14641) | function is_surrogate_pair_end(charCode) {
function starts_with_pair_end (line 14644) | function starts_with_pair_end(str) {
function ends_with_pair_start (line 14647) | function ends_with_pair_start(str) {
function remove_empty_tuples (line 14650) | function remove_empty_tuples(tuples) {
function make_edit_splice (line 14659) | function make_edit_splice(before, oldMiddle, newMiddle, after) {
function find_cursor_edit_diff (line 14670) | function find_cursor_edit_diff(oldText, newText, cursor_pos) {
function diff (line 14745) | function diff(text1, text2, cursor_pos) {
class Option (line 14779) | class Option {
method from (line 14780) | static from(obj) {
class Some (line 14786) | class Some {
method constructor (line 14787) | constructor(value) {
method map (line 14790) | map(fn) {
method map_or (line 14793) | map_or(d, fn) {
method filter (line 14796) | filter(fn) {
method or (line 14801) | or(d) {
method iter (line 14804) | iter() {
method unwrap (line 14807) | unwrap() {
method unwrap_or_else (line 14810) | unwrap_or_else(d) {
method is_some (line 14813) | is_some() {
method is_none (line 14816) | is_none() {
method equal (line 14819) | equal(other) {
method is (line 14824) | static is(o) {
class None (line 14828) | class None {
method map (line 14829) | map(fn) {
method map_or (line 14832) | map_or(d, fn) {
method filter (line 14835) | filter(fn) {
method or (line 14838) | or(d) {
method iter (line 14841) | iter() {
method unwrap (line 14844) | unwrap() {
method unwrap_or_else (line 14847) | unwrap_or_else(d) {
method is_some (line 14850) | is_some() {
method is_none (line 14853) | is_none() {
method equal (line 14856) | equal(other) {
method is (line 14859) | static is(o) {
class Ok (line 14872) | class Ok {
method constructor (line 14873) | constructor(value) {
method map (line 14876) | map(fn) {
method map_or (line 14879) | map_or(d, fn) {
method or (line 14882) | or(d) {
method is_ok (line 14885) | is_ok() {
method is_err (line 14888) | is_err() {
method unwrap (line 14891) | unwrap() {
method unwrap_or_else (line 14894) | unwrap_or_else(d) {
method is (line 14897) | static is(o) {
class Err (line 14901) | class Err {
method constructor (line 14902) | constructor(value) {
method map (line 14905) | map(fn) {
method map_or (line 14908) | map_or(d, fn) {
method or (line 14911) | or(d) {
method unwrap (line 14914) | unwrap() {
method unwrap_or_else (line 14917) | unwrap_or_else(d) {
method is_ok (line 14920) | is_ok() {
method is_err (line 14923) | is_err() {
method is (line 14926) | static is(o) {
function binary_search_by_key (line 14939) | function binary_search_by_key(arr, x, fn) {
function get_sorted_index (line 14953) | function get_sorted_index(arr, x, fn) {
function range (line 14964) | function range(start, end) {
function sort_by_key (line 14985) | function sort_by_key(arr, fn) {
function min_by_key (line 14990) | function min_by_key(arr, fn) {
class Display (line 15003) | class Display {
method constructor (line 15004) | constructor(value) {
method fg (line 15007) | fg(color) {
method bg (line 15016) | bg(color) {
method chars (line 15025) | chars() {
method map (line 15028) | map(fn) {
method display (line 15031) | display() {
method toString (line 15034) | toString() {
method unwrap_or_else (line 15037) | unwrap_or_else(d) {
class Span (line 15045) | class Span {
method constructor (line 15046) | constructor(_start, _end) {
method source (line 15051) | source() {
method start (line 15054) | set start(value) {
method start (line 15057) | get start() {
method end (line 15060) | set end(value) {
method end (line 15063) | get end() {
method len (line 15067) | len() {
method contains (line 15071) | contains(offset) {
method from (line 15077) | static from(o) {
class Range (line 15089) | class Range extends Span {
method constructor (line 15090) | constructor() {
method source (line 15094) | source() {
method len (line 15097) | len() {
method contains (line 15100) | contains(item) {
method is (line 15103) | static is(o) {
method from (line 15106) | static from(o) {
method new (line 15116) | static new(start, end) {
function ValueError (line 15120) | function ValueError(message) {
function create (line 15125) | function create(transformers) {
method constructor (line 15183) | constructor() {
method unwrap (line 15191) | unwrap() {
class Show (line 15195) | class Show {
method constructor (line 15196) | constructor(self2) {
method fmt (line 15199) | fmt(f) {
function write (line 15234) | function write(w, ...args) {
function format (line 15237) | function format(...args) {
function fromRust (line 15241) | function fromRust(node2) {
function writeln (line 15258) | function writeln(w, ...args) {
function eprintln (line 15263) | function eprintln(...args) {
class StdoutWriter (line 15266) | class StdoutWriter {
method write_str (line 15267) | write_str(s) {
method write_char (line 15270) | write_char(c2) {
method write_fmt (line 15273) | write_fmt(...args) {
class StderrWriter (line 15278) | class StderrWriter {
method write_str (line 15279) | write_str(s) {
method write_char (line 15282) | write_char(c2) {
method write_fmt (line 15285) | write_fmt(...args) {
class StringWriter (line 15290) | class StringWriter {
method constructor (line 15291) | constructor() {
method write_str (line 15294) | write_str(s) {
method write_char (line 15298) | write_char(c2) {
method write_fmt (line 15302) | write_fmt(...args) {
method map (line 15306) | map(fn) {
method unwrap (line 15309) | unwrap() {
function assembleStyles (line 15384) | function assembleStyles() {
function envForceColor (line 15503) | function envForceColor() {
function translateLevel (line 15514) | function translateLevel(level) {
function _supportsColor (line 15525) | function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } =...
function createSupportsColor (line 15586) | function createSupportsColor(stream, options = {}) {
function stringReplaceAll (line 15597) | function stringReplaceAll(string, substring, replacer) {
function stringEncaseCRLFWithFirstIndex (line 15613) | function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
function createChalk (line 15644) | function createChalk(options) {
method get (line 15650) | get() {
method get (line 15662) | get() {
method get (line 15686) | get() {
method get (line 15700) | get() {
method get (line 15718) | get() {
method set (line 15721) | set(level) {
class Color (line 15789) | class Color {
function Fixed (line 15794) | function Fixed(n) {
class Config (line 15797) | class Config {
method constructor (line 15798) | constructor(cross_gap, label_attach, compact, underlines, multiline_ar...
method default (line 15808) | static default() {
method with_cross_gap (line 15826) | with_cross_gap(cross_gap) {
method with_label_attach (line 15833) | with_label_attach(label_attach) {
method with_compact (line 15840) | with_compact(compact) {
method with_underlines (line 15847) | with_underlines(underlines) {
method with_multiline_arrows (line 15854) | with_multiline_arrows(multiline_arrows) {
method with_color (line 15861) | with_color(color) {
method with_tab_width (line 15868) | with_tab_width(tab_width) {
method with_char_set (line 15875) | with_char_set(char_set) {
method error_color (line 15879) | error_color() {
method warning_color (line 15882) | warning_color() {
method advice_color (line 15885) | advice_color() {
method margin_color (line 15888) | margin_color() {
method unimportant_color (line 15891) | unimportant_color() {
method note_color (line 15894) | note_color() {
method char_width (line 15898) | char_width(c2, col) {
class Label (line 15919) | class Label {
method constructor (line 15921) | constructor(span) {
method with_message (line 15929) | with_message(msg) {
method with_color (line 15934) | with_color(color) {
method with_order (line 15948) | with_order(order) {
method with_priority (line 15961) | with_priority(priority) {
method last_offset (line 15965) | last_offset() {
method new (line 15971) | static new(obj) {
method is (line 15974) | static is(other) {
function requireHasSymbols (line 16033) | function requireHasSymbols() {
function requireImplementation$3 (line 16058) | function requireImplementation$3() {
function requireFunctionBind (line 16109) | function requireFunctionBind() {
function requireSrc (line 16119) | function requireSrc() {
function requireGetIntrinsic (line 16129) | function requireGetIntrinsic() {
function requireCallBind (line 16433) | function requireCallBind() {
function uncurryThis (line 16852) | function uncurryThis(f) {
function checkBoxedPrimitive (line 16867) | function checkBoxedPrimitive(value, prototypeValueOf) {
function isPromise (line 16881) | function isPromise(input) {
function isArrayBufferView (line 16885) | function isArrayBufferView(value) {
function isUint8Array (line 16892) | function isUint8Array(value) {
function isUint8ClampedArray (line 16896) | function isUint8ClampedArray(value) {
function isUint16Array (line 16900) | function isUint16Array(value) {
function isUint32Array (line 16904) | function isUint32Array(value) {
function isInt8Array (line 16908) | function isInt8Array(value) {
function isInt16Array (line 16912) | function isInt16Array(value) {
function isInt32Array (line 16916) | function isInt32Array(value) {
function isFloat32Array (line 16920) | function isFloat32Array(value) {
function isFloat64Array (line 16924) | function isFloat64Array(value) {
function isBigInt64Array (line 16928) | function isBigInt64Array(value) {
function isBigUint64Array (line 16932) | function isBigUint64Array(value) {
function isMapToString (line 16936) | function isMapToString(value) {
function isMap (line 16940) | function isMap(value) {
function isSetToString (line 16947) | function isSetToString(value) {
function isSet (line 16951) | function isSet(value) {
function isWeakMapToString (line 16958) | function isWeakMapToString(value) {
function isWeakMap (line 16962) | function isWeakMap(value) {
function isWeakSetToString (line 16969) | function isWeakSetToString(value) {
function isWeakSet (line 16973) | function isWeakSet(value) {
function isArrayBufferToString (line 16977) | function isArrayBufferToString(value) {
function isArrayBuffer (line 16981) | function isArrayBuffer(value) {
function isDataViewToString (line 16988) | function isDataViewToString(value) {
function isDataView (line 16992) | function isDataView(value) {
function isSharedArrayBufferToString (line 17000) | function isSharedArrayBufferToString(value) {
function isSharedArrayBuffer (line 17003) | function isSharedArrayBuffer(value) {
function isAsyncFunction (line 17013) | function isAsyncFunction(value) {
function isMapIterator (line 17017) | function isMapIterator(value) {
function isSetIterator (line 17021) | function isSetIterator(value) {
function isGeneratorObject (line 17025) | function isGeneratorObject(value) {
function isWebAssemblyCompiledModule (line 17029) | function isWebAssemblyCompiledModule(value) {
function isNumberObject (line 17033) | function isNumberObject(value) {
function isStringObject (line 17037) | function isStringObject(value) {
function isBooleanObject (line 17041) | function isBooleanObject(value) {
function isBigIntObject (line 17045) | function isBigIntObject(value) {
function isSymbolObject (line 17049) | function isSymbolObject(value) {
function isBoxedPrimitive (line 17053) | function isBoxedPrimitive(value) {
function isAnyArrayBuffer (line 17057) | function isAnyArrayBuffer(value) {
function deprecated (line 17161) | function deprecated() {
function inspect (line 17199) | function inspect(obj, opts) {
function stylizeWithColor (line 17252) | function stylizeWithColor(str, styleType) {
function stylizeNoColor (line 17260) | function stylizeNoColor(str, styleType) {
function arrayToHash (line 17263) | function arrayToHash(array) {
function formatValue (line 17270) | function formatValue(ctx, value, recurseTimes) {
function formatPrimitive (line 17347) | function formatPrimitive(ctx, value) {
function formatError (line 17361) | function formatError(value) {
function formatArray (line 17364) | function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
function formatProperty (line 17394) | function formatProperty(ctx, value, recurseTimes, visibleKeys, key, arra...
function reduceToSingleString (line 17448) | function reduceToSingleString(output, base, braces) {
function isArray (line 17460) | function isArray(ar) {
function isBoolean2 (line 17464) | function isBoolean2(arg) {
function isNull (line 17468) | function isNull(arg) {
function isNullOrUndefined (line 17472) | function isNullOrUndefined(arg) {
function isNumber2 (line 17476) | function isNumber2(arg) {
function isString2 (line 17480) | function isString2(arg) {
function isSymbol (line 17484) | function isSymbol(arg) {
function isUndefined (line 17488) | function isUndefined(arg) {
function isRegExp (line 17492) | function isRegExp(re) {
function isObject (line 17497) | function isObject(arg) {
function isDate (line 17501) | function isDate(d) {
function isError (line 17506) | function isError(e) {
function isFunction (line 17511) | function isFunction(arg) {
function isPrimitive (line 17515) | function isPrimitive(arg) {
function objectToString (line 17521) | function objectToString(o) {
function pad (line 17524) | function pad(n) {
function timestamp (line 17541) | function timestamp() {
function hasOwnProperty2 (line 17564) | function hasOwnProperty2(obj, prop) {
function fn (line 17584) | function fn() {
function callbackifyOnRejected (line 17622) | function callbackifyOnRejected(reason, cb) {
function callbackify (line 17630) | function callbackify(original) {
function requireErrors (line 17666) | function requireErrors() {
function requireAssertion_error (line 17855) | function requireAssertion_error() {
function requireEs6ObjectAssign (line 18333) | function requireEs6ObjectAssign() {
function requireIsArguments (line 18376) | function requireIsArguments() {
function requireImplementation$2 (line 18393) | function requireImplementation$2() {
function requireObjectKeys (line 18515) | function requireObjectKeys() {
function requireHasPropertyDescriptors (line 18550) | function requireHasPropertyDescriptors() {
function requireDefineProperties (line 18582) | function requireDefineProperties() {
function requireImplementation$1 (line 18633) | function requireImplementation$1() {
function requirePolyfill$1 (line 18656) | function requirePolyfill$1() {
function requireShim$1 (line 18668) | function requireShim$1() {
function requireObjectIs (line 18687) | function requireObjectIs() {
function requireImplementation (line 18707) | function requireImplementation() {
function requirePolyfill (line 18718) | function requirePolyfill() {
function requireShim (line 18733) | function requireShim() {
function requireIsNan (line 18752) | function requireIsNan() {
function requireComparisons (line 18772) | function requireComparisons() {
function requireAssert (line 19285) | function requireAssert() {
class Characters (line 19765) | class Characters {
method unicode (line 19766) | static unicode() {
method ascii (line 19789) | static ascii() {
class LabelInfo (line 19818) | class LabelInfo {
method constructor (line 19819) | constructor(kind, label) {
class ReportBuilder (line 19824) | class ReportBuilder {
method constructor (line 19825) | constructor(kind, code, msg, note, help, location, labels, config) {
method with_code (line 19836) | with_code(code) {
method set_message (line 19841) | set_message(msg) {
method with_message (line 19845) | with_message(msg) {
method set_note (line 19850) | set_note(note) {
method with_note (line 19854) | with_note(note) {
method set_help (line 19859) | set_help(note) {
method with_help (line 19863) | with_help(note) {
method add_label (line 19868) | add_label(label) {
method add_labels (line 19872) | add_labels(labels) {
method with_label (line 19876) | with_label(label) {
method with_config (line 19881) | with_config(config) {
method finish (line 19886) | finish() {
class ReportKind (line 19900) | class ReportKind {
method constructor (line 19901) | constructor(...args) {
method fmt (line 19903) | fmt(f) {
method constructor (line 19928) | constructor(s, color) {
class Cache (line 19936) | class Cache {
method from (line 19937) | static from(init) {
class Line (line 19946) | class Line {
method constructor (line 19947) | constructor(_offset, _len, _chars) {
method offset (line 19953) | offset() {
method len (line 19957) | len() {
method span (line 19961) | span() {
method chars (line 19965) | chars() {
class Source (line 19969) | class Source {
method constructor (line 19970) | constructor(_lines, _len) {
method from (line 19977) | static from(s, ...args) {
method len (line 19992) | len() {
method chars (line 19996) | chars() {
method line (line 20000) | line(idx) {
method lines (line 20005) | lines() {
method get_offset_line (line 20011) | get_offset_line(offset) {
method get_line_range (line 20031) | get_line_range(span) {
method fetch (line 20039) | fetch(_) {
method display (line 20042) | display(_) {
method is (line 20045) | static is(other) {
class IdSource (line 20049) | class IdSource extends Source {
method constructor (line 20050) | constructor(_lines, _len, data) {
method fetch (line 20054) | fetch(id) {
method display (line 20057) | display(id) {
class FnCache (line 20061) | class FnCache {
method constructor (line 20062) | constructor(sources2, get) {
method new (line 20067) | static new(get) {
method with_sources (line 20071) | with_sources(sources2) {
method fetch (line 20077) | fetch(id) {
method display (line 20085) | display(id) {
method is (line 20088) | static is(other) {
class SourceGroup (line 20092) | class SourceGroup {
method constructor (line 20093) | constructor(src_id, span, labels) {
class Report (line 20099) | class Report {
method constructor (line 20100) | constructor(kind, code, msg, note, help, location, labels, config) {
method build (line 20111) | static build(kind, src_id, offset) {
method eprint (line 20125) | eprint(init) {
method print (line 20133) | print(init) {
method printTo (line 20137) | printTo(init, writer) {
method get_source_groups (line 20141) | get_source_groups(cache) {
method write (line 20176) | write(cache, w) {
function match (line 20689) | function match(kind, matchers) {
function to_array (line 20718) | function to_array(a) {
function count (line 20727) | function count(a) {
function makeIter (line 20730) | function makeIter(arr) {
function AnsiUp3 (line 20770) | function AnsiUp3() {
function rgx (line 21123) | function rgx(tmplObj) {
function rgxG (line 21129) | function rgxG(tmplObj) {
function nicerError (line 21140) | function nicerError(e) {
class TagNode (line 21146) | class TagNode {
method constructor (line 21147) | constructor(name, tsNode) {
class TagGraph (line 21155) | class TagGraph {
method constructor (line 21156) | constructor() {
method addNode (line 21159) | addNode(name, tsNode) {
method addEdge (line 21166) | addEdge(from, to) {
method addTag (line 21180) | addTag(name, tag) {
method getNode (line 21188) | getNode(name) {
method resolveTagSourceChain (line 21191) | resolveTagSourceChain(name, tag) {
method propagateTags (line 21219) | propagateTags() {
function countLines (line 27570) | function countLines(str) {
function indexToRowColumn (line 27579) | function indexToRowColumn(str, index) {
function rowColumnToIndex (line 27592) | function rowColumnToIndex(str, row, column) {
function getDiffRange (line 27607) | function getDiffRange(a, b) {
function getReplaceRange (line 27654) | function getReplaceRange(a, b) {
function getFunctionNodeName (line 27710) | function getFunctionNodeName(node2, sourceFile) {
function canTypesBeCasted (line 27720) | function canTypesBeCasted(a, b) {
class ShadeupEnvironment (line 27733) | class ShadeupEnvironment {
method constructor (line 27734) | constructor(opts) {
method init (line 27752) | async init() {
method setAssetMapping (line 27761) | setAssetMapping(assets) {
method print (line 27765) | print(...args) {
method reset (line 27770) | reset() {
method applyTags (line 27784) | applyTags() {
method regenerate (line 27851) | async regenerate(filePath) {
method mixInShaders (line 27968) | mixInShaders(file, code) {
method mixInStructs (line 28003) | mixInStructs(root, code) {
method errors (line 28036) | errors(files2) {
method completions (line 28086) | completions(path, pos) {
method classifications (line 28160) | classifications(path) {
method hover (line 28220) | hover(path, pos) {
method getFileErrorData (line 28249) | getFileErrorData(f, estart, eend) {
method transformTSError (line 28277) | transformTSError(file, error) {
method translateSource (line 28362) | async translateSource(file, range2 = null) {
method extractFlatSymbolMap (line 28406) | extractFlatSymbolMap(rootNode) {
method writeFile (line 28423) | async writeFile(path, content, ignoreValidate = false) {
method writeFileTypescript (line 28495) | async writeFileTypescript(path, content) {
method addDiagnostic (line 28526) | addDiagnostic(path, diagnostic) {
method printNodeLocation (line 28532) | printNodeLocation(n) {
method renderShaders (line 28543) | renderShaders(path) {
method patchFile (line 28640) | patchFile(path, content, start, length) {
function walkNodes (line 28643) | function walkNodes(node2, cb) {
function hasShadeupDocTag (line 28647) | function hasShadeupDocTag(node2, tagName) {
function makeSimpleShadeupEnvironment (line 30926) | async function makeSimpleShadeupEnvironment(esnext = false, declaration ...
FILE: extension/vscode/shadeup/server/src/server.ts
type ShadeupFileOutput (line 37) | type ShadeupFileOutput = {
type ShadeupRenderedFile (line 43) | type ShadeupRenderedFile = {
type ShadeupDiagnostic (line 48) | type ShadeupDiagnostic = {
function indexToRowColumn (line 59) | function indexToRowColumn(str: string, index: number) {
function rowColumnToIndex (line 73) | function rowColumnToIndex(str: string, row: number, column: number) {
type IndexMapping (line 89) | type IndexMapping = [number, number, number, number][];
type SourceString (line 90) | type SourceString = {
type ShadeupGenericDiagnostic (line 95) | type ShadeupGenericDiagnostic = {
function lookupIndexMappingRange (line 102) | function lookupIndexMappingRange(
function findFile (line 122) | function findFile(path: string) {
function tsDiagnosticToShadeupDiagnostic (line 126) | function tsDiagnosticToShadeupDiagnostic(diag: {
function genericDiagnosticToShadeupDiagnostic (line 177) | function genericDiagnosticToShadeupDiagnostic(
function delay (line 210) | function delay(ms: number) {
constant TOKEN_TYPES (line 215) | const TOKEN_TYPES = [
constant TOKEN_MAP (line 229) | const TOKEN_MAP = {
function cleanPath (line 322) | function cleanPath(path: string) {
function getTokenBuilder (line 334) | function getTokenBuilder(document: TextDocument): SemanticTokensBuilder {
function displayPartsToString (line 481) | function displayPartsToString(parts?: ts.SymbolDisplayPart[]): string {
FILE: lang/shadeup-frontend/lib/ariadne-ts/src/_extensions.ts
type Array (line 2) | interface Array<T> {
type Number (line 40) | interface Number {
FILE: lang/shadeup-frontend/lib/ariadne-ts/src/data/Display.ts
type Display (line 5) | interface Display {
method constructor (line 15) | constructor(value: string | Display) {
method fg (line 18) | fg(color: Option<ColorFn> | ColorFn): this {
method bg (line 27) | bg(color: Option<ColorFn> | ColorFn): this {
method chars (line 36) | chars(): string {
method map (line 39) | map(fn: (d: string) => string): Display {
method display (line 42) | display(): string {
method toString (line 45) | toString(): string {
method unwrap_or_else (line 48) | unwrap_or_else(d: () => string): string {
class Display (line 14) | class Display implements Display {
method constructor (line 15) | constructor(value: string | Display) {
method fg (line 18) | fg(color: Option<ColorFn> | ColorFn): this {
method bg (line 27) | bg(color: Option<ColorFn> | ColorFn): this {
method chars (line 36) | chars(): string {
method map (line 39) | map(fn: (d: string) => string): Display {
method display (line 42) | display(): string {
method toString (line 45) | toString(): string {
method unwrap_or_else (line 48) | unwrap_or_else(d: () => string): string {
FILE: lang/shadeup-frontend/lib/ariadne-ts/src/data/Formatter.ts
type Alignment (line 4) | enum Alignment {
type Formatter (line 10) | interface Formatter {
method unwrap (line 38) | unwrap() {
FILE: lang/shadeup-frontend/lib/ariadne-ts/src/data/Iter.ts
class Iter (line 1) | class Iter {}
FILE: lang/shadeup-frontend/lib/ariadne-ts/src/data/Option.ts
method from (line 13) | static from<T>(obj: T | undefined | null): Option<T> {
class Some (line 20) | class Some<T> implements Option<T> {
method constructor (line 21) | constructor(private value: T) {}
method map (line 22) | map<R>(fn: (value: T) => R): Option<R> {
method map_or (line 25) | map_or<R>(d: R, fn: (val: T) => R): R {
method filter (line 28) | filter(fn: (m: T) => boolean): Option<T> {
method or (line 32) | or(d: Option<T>): Option<T> {
method iter (line 35) | iter(): T[] {
method unwrap (line 38) | unwrap(): T {
method unwrap_or_else (line 41) | unwrap_or_else(d: () => T): T {
method is_some (line 44) | is_some(): this is Some<T> {
method is_none (line 47) | is_none(): this is None<T> {
method equal (line 50) | equal(other: Option<T>): boolean {
method is (line 55) | static is<T>(o: Option<T>): o is Some<T> {
class None (line 60) | class None<T> implements Option<T> {
method map (line 61) | map<R>(fn: (value: T) => R): Option<R> {
method map_or (line 64) | map_or<R>(d: R, fn: (val: T) => R): R {
method filter (line 67) | filter(fn: (m: T) => boolean): Option<T> {
method or (line 70) | or(d: Option<T>): Option<T> {
method iter (line 73) | iter(): T[] {
method unwrap (line 76) | unwrap(): T {
method unwrap_or_else (line 79) | unwrap_or_else(d: () => T): T {
method is_some (line 82) | is_some(): this is Some<T> {
method is_none (line 85) | is_none(): this is None<T> {
method equal (line 88) | equal(other: Option<T>): boolean {
method is (line 91) | static is<T>(o: Option<T>): o is None<T> {
FILE: lang/shadeup-frontend/lib/ariadne-ts/src/data/Range.ts
class Range (line 4) | class Range extends Span {
method source (line 7) | public source(): any {
method len (line 11) | public len(): number {
method contains (line 14) | public contains(item: any): boolean {
method is (line 18) | static is(o: any): o is Range {
method from (line 22) | static from(o: SpanInit): Range {
method new (line 34) | static new(start: number, end: number): Span {
FILE: lang/shadeup-frontend/lib/ariadne-ts/src/data/Result.ts
type Result (line 1) | type Result<T, E> = Ok<T, E> | Err<T, E>;
class Ok (line 3) | class Ok<T, E> {
method constructor (line 4) | constructor(private value: T) {}
method map (line 5) | map<R>(fn: (value: T) => R): Result<R, E> {
method map_or (line 8) | map_or<R>(d: R, fn: (val: T) => R): Result<R, E> {
method or (line 11) | or(d: Result<T, E>): Result<T, E> {
method is_ok (line 14) | is_ok(): this is Ok<T, E> { return true }
method is_err (line 15) | is_err(): this is Err<T, E> { return false }
method unwrap (line 16) | unwrap(): T {
method unwrap_or_else (line 19) | unwrap_or_else<R>(d: (v: T) => R): R {
method is (line 22) | static is<T, E>(o: Result<T, E>): o is Ok<T, E> {
class Err (line 27) | class Err<T, E> {
method constructor (line 28) | constructor(private value: E) {}
method map (line 29) | map<R>(fn: (value: E) => R): Result<R, E> {
method map_or (line 32) | map_or<R>(d: R, fn: (val: T) => R): Result<R, E> {
method or (line 35) | or(d: Result<T, E>): Result<T, E> {
method unwrap (line 38) | unwrap(): E {
method unwrap_or_else (line 41) | unwrap_or_else<R>(d: (v: E) => R): R {
method is_ok (line 44) | is_ok(): this is Ok<T, E> { return false }
method is_err (line 45) | is_err(): this is Err<T, E> { return true }
method is (line 46) | static is<T, E>(o: Result<T, E>): o is Err<T, E> {
FILE: lang/shadeup-frontend/lib/ariadne-ts/src/data/Show.ts
class Show (line 8) | class Show {
method constructor (line 9) | constructor(public self: any) {}
method fmt (line 10) | fmt(f: Formatter): void {
FILE: lang/shadeup-frontend/lib/ariadne-ts/src/data/Span.ts
type SpanInit (line 4) | type SpanInit = [src: string, range: Range] | [start: number, end: number];
class Span (line 6) | class Span {
method constructor (line 7) | constructor(
method source (line 15) | source() { return this.SourceId }
method start (line 17) | set start(value: number) { this._start = value }
method start (line 18) | get start(): number { return this._start }
method end (line 19) | set end(value: number) { this._end = value }
method end (line 20) | get end(): number { return this._end }
method len (line 23) | len(): number {
method contains (line 28) | contains(offset: number): boolean {
method from (line 34) | static from(o: SpanInit) {
FILE: lang/shadeup-frontend/lib/ariadne-ts/src/data/Write.ts
type Write (line 4) | interface Write {
class StdoutWriter (line 10) | class StdoutWriter implements Write {
method write_str (line 11) | write_str(s: string): Result<null, Error> {
method write_char (line 14) | write_char(c: string): Result<null, Error> {
method write_fmt (line 17) | write_fmt(...args: any[]): Result<null, Error> {
class StderrWriter (line 23) | class StderrWriter implements Write {
method write_str (line 24) | write_str(s: string): Result<null, Error> {
method write_char (line 27) | write_char(c: string): Result<null, Error> {
method write_fmt (line 30) | write_fmt(...args: any[]): Result<null, Error> {
class StringWriter (line 36) | class StringWriter implements Write {
method write_str (line 38) | write_str(s: string): Result<null, Error> {
method write_char (line 42) | write_char(c: string): Result<null, Error> {
method write_fmt (line 46) | write_fmt(...args: any[]): Result<null, Error> {
method map (line 50) | map(fn: (value: string) => any) {
method unwrap (line 53) | unwrap() {
FILE: lang/shadeup-frontend/lib/ariadne-ts/src/lib/Characters.ts
type iCharacters (line 2) | interface iCharacters {
method unicode (line 30) | static unicode(): iCharacters {
method ascii (line 54) | static ascii(): iCharacters {
FILE: lang/shadeup-frontend/lib/ariadne-ts/src/lib/Color.ts
type ColorFn (line 20) | type ColorFn = ((s: string) => string) | ChalkInstance;
function Fixed (line 26) | function Fixed(n: number) {
FILE: lang/shadeup-frontend/lib/ariadne-ts/src/lib/ColorGenerator.ts
class ColorGenerator (line 6) | class ColorGenerator {
method constructor (line 7) | constructor(
method from_state (line 15) | static from_state(state: [number, number, number], min_brightness: num...
method new (line 20) | static new(): ColorGenerator {
method next (line 25) | next(out?: [number, ColorFn][]): ColorFn {
method default (line 44) | static default(): ColorGenerator {
FILE: lang/shadeup-frontend/lib/ariadne-ts/src/lib/Config.ts
class Config (line 5) | class Config {
method constructor (line 7) | constructor(
method default (line 18) | static default(): Config {
method with_cross_gap (line 36) | with_cross_gap(cross_gap: boolean): this {
method with_label_attach (line 43) | with_label_attach(label_attach: LabelAttach): this {
method with_compact (line 50) | with_compact(compact: boolean): this {
method with_underlines (line 57) | with_underlines(underlines: boolean): this {
method with_multiline_arrows (line 64) | with_multiline_arrows(multiline_arrows: boolean): this {
method with_color (line 71) | with_color(color: boolean): this {
method with_tab_width (line 78) | with_tab_width(tab_width: number): this {
method with_char_set (line 85) | with_char_set(char_set: CharSet): this {
method error_color (line 90) | error_color(): Option<ColorFn> {
method warning_color (line 93) | warning_color(): Option<ColorFn> {
method advice_color (line 96) | advice_color(): Option<ColorFn> {
method margin_color (line 99) | margin_color(): Option<ColorFn> {
method unimportant_color (line 102) | unimportant_color():Option<ColorFn> {
method note_color (line 105) | note_color(): Option<ColorFn> {
method char_width (line 110) | char_width(c: string, col: number): [Display, number] {
type LabelAttach (line 123) | enum LabelAttach {
type CharSet (line 133) | enum CharSet {
FILE: lang/shadeup-frontend/lib/ariadne-ts/src/lib/Label.ts
type Label (line 7) | interface Label<S extends Range> {
method constructor (line 17) | constructor(span: S) {
method with_message (line 26) | with_message(msg: string): this {
method with_color (line 32) | with_color(color: ColorFn): this {
method with_order (line 47) | with_order(order: number): this {
method with_priority (line 61) | with_priority(priority: number): this {
method last_offset (line 66) | last_offset(): number {
method new (line 72) | static new<S extends Range, Init extends SpanInit>(obj: Init): Label<S> {
method is (line 76) | static is<S extends Range>(other: any): other is Label<S>{
class Label (line 15) | class Label<S> {
method constructor (line 17) | constructor(span: S) {
method with_message (line 26) | with_message(msg: string): this {
method with_color (line 32) | with_color(color: ColorFn): this {
method with_order (line 47) | with_order(order: number): this {
method with_priority (line 61) | with_priority(priority: number): this {
method last_offset (line 66) | last_offset(): number {
method new (line 72) | static new<S extends Range, Init extends SpanInit>(obj: Init): Label<S> {
method is (line 76) | static is<S extends Range>(other: any): other is Label<S>{
FILE: lang/shadeup-frontend/lib/ariadne-ts/src/lib/LabelInfo.ts
type LabelKind (line 5) | enum LabelKind {
class LabelInfo (line 10) | class LabelInfo<S extends Range> {
method constructor (line 11) | constructor(
FILE: lang/shadeup-frontend/lib/ariadne-ts/src/lib/Report.ts
type iReport (line 30) | interface iReport<S extends Span> {
class Report (line 44) | class Report<S extends Span> implements iReport<S> {
method constructor (line 45) | constructor(
method build (line 57) | static build<S extends Span, Id extends string>(
method eprint (line 77) | eprint(init: CacheInit): void {
method print (line 86) | print(init: CacheInit): void {
method printTo (line 91) | printTo(init: CacheInit, writer: Write): void {
method get_source_groups (line 96) | private get_source_groups(cache: Cache<S['SourceId']>): SourceGroup<S>...
method write (line 139) | private write<C extends Cache<string>, W extends Write>(cache: C, w: W...
type MatchResult (line 837) | type MatchResult<T> = T extends abstract new (...args: any) => infer RT ...
function match (line 839) | function match<T, R>(kind: T, matchers: [T, (arg: MatchResult<T>) => R][...
function to_array (line 869) | function to_array<a>(a: Iterator<a>) {
function count (line 879) | function count<a>(a: Iterator<a>) {
function makeIter (line 883) | function makeIter<T extends any[] | string>(arr: T) {
FILE: lang/shadeup-frontend/lib/ariadne-ts/src/lib/ReportBuilder.ts
type iReportBuilder (line 10) | interface iReportBuilder<S extends Span> {
class ReportBuilder (line 21) | class ReportBuilder<S extends Span> {
method constructor (line 22) | constructor(
method with_code (line 33) | with_code(code: number | string): this {
method set_message (line 39) | set_message(msg: string) {
method with_message (line 44) | with_message(msg: string): this {
method set_note (line 50) | set_note(note: string) {
method with_note (line 55) | with_note(note: string): this {
method set_help (line 61) | set_help(note: string) {
method with_help (line 66) | with_help(note: string): this {
method add_label (line 72) | add_label(label: Label<S>) {
method add_labels (line 77) | add_labels(labels: Label<S>[]) {
method with_label (line 82) | with_label(label: Label<S>): this {
method with_config (line 88) | with_config(config: Config): this {
method finish (line 94) | finish(): iReport<S> {
FILE: lang/shadeup-frontend/lib/ariadne-ts/src/lib/ReportKind.ts
class ReportKind (line 6) | class ReportKind {
method constructor (line 7) | constructor(...args: any[]) {}
method fmt (line 8) | fmt(f: Formatter): any {
method constructor (line 29) | constructor(public s: any, public color: any) {
FILE: lang/shadeup-frontend/lib/ariadne-ts/src/lib/Source.ts
type ErrMsg (line 11) | type ErrMsg = string;
type CacheInit (line 13) | type CacheInit = [id: string, source: Source] | Source | FnCache<string,...
method from (line 25) | static from(init: CacheInit) {
class Line (line 34) | class Line {
method constructor (line 35) | constructor(private _offset: number, private _len: number, private _ch...
method offset (line 37) | offset(): number {
method len (line 42) | len(): number {
method span (line 47) | span(): Range {
method chars (line 52) | chars(): string {
class Source (line 60) | class Source implements Cache<string> {
method constructor (line 61) | constructor(private _lines: Line[], private _len: number) {}
method from (line 66) | static from(s: string, ...args: any[]): Source {
method len (line 83) | len(): number {
method chars (line 88) | chars(): string {
method line (line 95) | line(idx: number): Option<Line> {
method lines (line 101) | lines(): Line[] {
method get_offset_line (line 108) | get_offset_line(offset: number): Option<[Line, number, number]> {
method get_line_range (line 129) | get_line_range(span: Span): Range {
method fetch (line 139) | fetch(_: any): Result<Source, ErrMsg> {
method display (line 142) | display(_: any): Option<Displayable> {
method is (line 146) | static is(other: any): other is Source {
class IdSource (line 151) | class IdSource extends Source {
method constructor (line 152) | constructor(_lines: Line[], _len: number, public data: [id: string, so...
method fetch (line 155) | fetch(id: string): Result<Source, ErrMsg> {
method display (line 158) | display(id: string): Option<Display> {
type PathBuf (line 163) | type PathBuf = {};
type Path (line 164) | type Path = {
class FileCache (line 171) | class FileCache implements Cache<Path> {
method constructor (line 172) | constructor(public files: Map<PathBuf, Source>) {}
method default (line 174) | static default(): FileCache {
method fetch (line 178) | fetch(path: Path): Result<Source, ErrMsg> {
method display (line 186) | display(path: Path): Option<Displayable> {
method is (line 190) | static is(other: any): other is FileCache {
class FnCache (line 196) | class FnCache<Id, F extends Function> implements Cache<Id> {
method constructor (line 197) | constructor(public sources: Map<Id, Source>, public get: F) {}
method new (line 200) | static new<Id, F extends Function>(get: F): FnCache<Id, F> {
method with_sources (line 205) | with_sources(sources: [Id, Source][]): this {
method fetch (line 212) | fetch(id: any): Result<Source, ErrMsg> {
method display (line 220) | display(id: any): Option<Displayable> {
method is (line 224) | static is(other: any): other is FnCache<any, any> {
function sources (line 230) | function sources<Id extends string, S, I extends Array<[string, string]>>(
FILE: lang/shadeup-frontend/lib/ariadne-ts/src/lib/SourceGroup.ts
class SourceGroup (line 5) | class SourceGroup<S extends Span> {
method constructor (line 6) | constructor(
FILE: lang/shadeup-frontend/lib/ariadne-ts/src/lib/chalk/chalk/source/index.d.ts
type Options (line 7) | interface Options {
type ChalkInstance (line 27) | interface ChalkInstance {
type Modifiers (line 263) | type Modifiers = ModifierName;
type ForegroundColor (line 272) | type ForegroundColor = ForegroundColorName;
type BackgroundColor (line 281) | type BackgroundColor = BackgroundColorName;
type Color (line 290) | type Color = ColorName;
FILE: lang/shadeup-frontend/lib/ariadne-ts/src/lib/chalk/chalk/source/index.js
constant GENERATOR (line 11) | const GENERATOR = Symbol('GENERATOR');
constant STYLER (line 12) | const STYLER = Symbol('STYLER');
constant IS_EMPTY (line 13) | const IS_EMPTY = Symbol('IS_EMPTY');
class Chalk (line 33) | class Chalk {
method constructor (line 34) | constructor(options) {
function createChalk (line 49) | function createChalk(options) {
method get (line 57) | get() {
method get (line 70) | get() {
method get (line 101) | get() {
method get (line 116) | get() {
method get (line 134) | get() {
method set (line 137) | set(level) {
FILE: lang/shadeup-frontend/lib/ariadne-ts/src/lib/chalk/chalk/source/utilities.js
function stringReplaceAll (line 2) | function stringReplaceAll(string, substring, replacer) {
function stringEncaseCRLFWithFirstIndex (line 21) | function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
FILE: lang/shadeup-frontend/lib/ariadne-ts/src/lib/chalk/chalk/source/vendor/ansi-styles/index.d.ts
type CSPair (line 1) | interface CSPair { // eslint-disable-line @typescript-eslint/naming-conv...
type ColorBase (line 13) | interface ColorBase {
type Modifier (line 26) | interface Modifier {
type ForegroundColor (line 75) | interface ForegroundColor {
type BackgroundColor (line 105) | interface BackgroundColor {
type ConvertColor (line 135) | interface ConvertColor {
type ModifierName (line 186) | type ModifierName = keyof Modifier;
type ForegroundColorName (line 193) | type ForegroundColorName = keyof ForegroundColor;
type BackgroundColorName (line 200) | type BackgroundColorName = keyof BackgroundColor;
type ColorName (line 207) | type ColorName = ForegroundColorName | BackgroundColorName;
FILE: lang/shadeup-frontend/lib/ariadne-ts/src/lib/chalk/chalk/source/vendor/ansi-styles/index.js
constant ANSI_BACKGROUND_OFFSET (line 1) | const ANSI_BACKGROUND_OFFSET = 10;
function assembleStyles (line 73) | function assembleStyles() {
FILE: lang/shadeup-frontend/lib/ariadne-ts/src/lib/chalk/chalk/source/vendor/supports-color/index.d.ts
type Options (line 3) | type Options = {
type ColorSupportLevel (line 19) | type ColorSupportLevel = 0 | 1 | 2 | 3;
type ColorSupport (line 24) | type ColorSupport = {
type ColorInfo (line 46) | type ColorInfo = ColorSupport | false;
FILE: lang/shadeup-frontend/lib/ariadne-ts/src/lib/chalk/chalk/source/vendor/supports-color/index.js
function hasFlag (line 3) | function hasFlag(flag, argv) {
function envForceColor (line 28) | function envForceColor() {
function translateLevel (line 42) | function translateLevel(level) {
function _supportsColor (line 55) | function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } =...
function createSupportsColor (line 152) | function createSupportsColor(stream, options = {}) {
FILE: lang/shadeup-frontend/lib/ariadne-ts/src/stringFormat.ts
function ValueError (line 2) | function ValueError(message) {
function create (line 9) | function create(transformers) {
FILE: lang/shadeup-frontend/lib/ariadne-ts/src/utils/binary_search_by_key.ts
function binary_search_by_key (line 4) | function binary_search_by_key<T>(arr: T[], x: any, fn: (o: T) => number)...
function get_sorted_index (line 31) | function get_sorted_index(arr: any[], x: any, fn: any) {
FILE: lang/shadeup-frontend/lib/ariadne-ts/src/utils/include_str.ts
function include_str (line 4) | function include_str(path: string): string {
FILE: lang/shadeup-frontend/lib/ariadne-ts/src/utils/index.ts
function range (line 5) | function range(start: number, end: number) {
function clamp (line 22) | function clamp(value: number, min: number, max: number): number {
function wrapping_add_usize (line 26) | function wrapping_add_usize(lhs: number, rhs: number): number {
function sort_by_key (line 44) | function sort_by_key<T>(arr: T[], fn: (a: T) => number | string): void {
function min_by_key (line 50) | function min_by_key<T>(arr: T[], fn: (value: T) => number): Option<T> {
function toCamelCase (line 69) | function toCamelCase(str: string) {
FILE: lang/shadeup-frontend/lib/ariadne-ts/src/write.ts
type Displayable (line 9) | type Displayable<T = any, E = any> =
function write (line 17) | function write<W extends Write>(w: W, ...args: Displayable[]) {
function format (line 21) | function format(...args: Displayable[]): string {
function fromRust (line 26) | function fromRust(node: Displayable): string {
function writeln (line 44) | function writeln<W extends Write>(w: W, ...args: Displayable[]) {
function eprintln (line 50) | function eprintln(...args: Displayable[]): void {
FILE: lang/shadeup-frontend/lib/environment/Errors.ts
function nicerError (line 3) | function nicerError(e: ts.DiagnosticMessageChain | ts.DiagnosticRelatedI...
FILE: lang/shadeup-frontend/lib/environment/ShadeupEnvironment.ts
function countLines (line 36) | function countLines(str: string) {
type ShadeupGenericDiagnostic (line 46) | type ShadeupGenericDiagnostic = {
type SymbolRange (line 52) | type SymbolRange = {
type ShadeupFile (line 57) | type ShadeupFile = {
type DiffRange (line 70) | type DiffRange = {
type ClassificationRanges (line 79) | type ClassificationRanges = {
function indexToRowColumn (line 83) | function indexToRowColumn(str: string, index: number) {
function rowColumnToIndex (line 97) | function rowColumnToIndex(str: string, row: number, column: number) {
function getDiffRange (line 113) | function getDiffRange(a: string, b: string) {
function getReplaceRange (line 167) | function getReplaceRange(a: string, b: string) {
function getFunctionNodeName (line 232) | function getFunctionNodeName(
function canTypesBeCasted (line 248) | function canTypesBeCasted(a: string, b: string) {
constant USING_QUICK_CACHE (line 265) | const USING_QUICK_CACHE = true;
class ShadeupEnvironment (line 267) | class ShadeupEnvironment {
method constructor (line 281) | constructor() {}
method init (line 283) | async init() {
method setAssetMapping (line 295) | setAssetMapping(assets: [string, [string, string]][]) {
method print (line 300) | print(...args: any[]) {
method reset (line 306) | reset() {
method applyTags (line 320) | applyTags() {
method regenerate (line 404) | async regenerate(filePath?: string[]) {
method mixInShaders (line 548) | mixInShaders(file: ShadeupFile, code: string) {
method mixInStructs (line 597) | mixInStructs(root: ts.SourceFile, code: string): string {
method errors (line 634) | errors(files?: string[]) {
method completions (line 702) | completions(path: string, pos: number) {
method classifications (line 786) | classifications(path: string): ClassificationRanges {
method hover (line 860) | hover(path: string, pos: number) {
method getFileErrorData (line 899) | getFileErrorData(f: ts.SourceFile, estart: number, eend: number) {
method transformTSError (line 943) | transformTSError(file: ShadeupFile, error: ts.Diagnostic) {
method translateSource (line 1039) | async translateSource(file: ShadeupFile, range: DiffRange | null = nul...
method extractFlatSymbolMap (line 1103) | extractFlatSymbolMap(rootNode: Parser.SyntaxNode): SymbolRange[] {
method writeFile (line 1125) | async writeFile(path: string, content: string, ignoreValidate = false) {
method writeFileTypescript (line 1213) | async writeFileTypescript(path: string, content: string) {
method addDiagnostic (line 1250) | addDiagnostic(path: string, diagnostic: ts.Diagnostic) {
method printNodeLocation (line 1258) | printNodeLocation(n: ts.Node) {
method renderShaders (line 1270) | renderShaders(path: string): { glsl: GLSLShader; wgsl: WGSLShader }[] {
method patchFile (line 1388) | patchFile(path: string, content: string, start: number, length: number...
function walkNodes (line 1391) | function walkNodes(node: ts.Node, cb: (node: ts.Node) => void) {
function hasShadeupDocTag (line 1396) | function hasShadeupDocTag(node: ts.Node, tagName: string) {
function hasWorkgroupDocTag (line 1401) | function hasWorkgroupDocTag(node: ts.Node) {
FILE: lang/shadeup-frontend/lib/environment/TypescriptEnvironment.ts
type TypescriptEnvironment (line 24) | type TypescriptEnvironment = {
function makeTypescriptEnvironment (line 30) | async function makeTypescriptEnvironment(shadeupEnv: ShadeupEnvironment) {
FILE: lang/shadeup-frontend/lib/environment/tagGraph.ts
class TagNode (line 3) | class TagNode {
method constructor (line 10) | constructor(name: string, tsNode?: ts.Node) {
class TagGraph (line 19) | class TagGraph {
method constructor (line 21) | constructor() {
method addNode (line 25) | addNode(name: string, tsNode?: ts.Node) {
method addEdge (line 33) | addEdge(from: string, to: string) {
method addTag (line 50) | addTag(name: string, tag: string) {
method getNode (line 60) | getNode(name: string) {
method resolveTagSourceChain (line 64) | resolveTagSourceChain(name: string, tag: string): string[] {
method propagateTags (line 96) | propagateTags() {
FILE: lang/shadeup-frontend/lib/environment/validate.ts
type VisitorSignature (line 16) | type VisitorSignature = {
function printNode (line 23) | function printNode(node: ts.Node) {
function printFlagsSymbol (line 27) | function printFlagsSymbol(flags: number) {
function printFlagsType (line 36) | function printFlagsType(flags: number) {
function validate (line 46) | function validate(
function validateGraph (line 100) | function validateGraph(
function hasAnyFlag (line 165) | function hasAnyFlag(flags: number, ...flag: number[]) {
function isStaticPropertyAccessExpression (line 169) | function isStaticPropertyAccessExpression(
function validateStatement (line 205) | function validateStatement({ checker, file }: VisitorSignature, node: ts...
function validateConditionalExpression (line 223) | function validateConditionalExpression(
function validateCallExpression (line 247) | function validateCallExpression({ checker, file }: VisitorSignature, nod...
function validatePropertyAccessExpression (line 285) | function validatePropertyAccessExpression(
function isTypeCompatible (line 361) | function isTypeCompatible(checker: ts.TypeChecker, type: ts.Type, typeOt...
function validateArrayLiteral (line 365) | function validateArrayLiteral(
constant SHADER_TYPE_BLACKLIST (line 410) | const SHADER_TYPE_BLACKLIST = ['string', 'null', 'map'];
function validateShaderTypeUse (line 411) | function validateShaderTypeUse(
function validateShaderCalls (line 454) | function validateShaderCalls(
FILE: lang/shadeup-frontend/lib/fast-diff/diff.js
function diff_main (line 43) | function diff_main(text1, text2, cursor_pos, _fix_unicode) {
function diff_compute_ (line 92) | function diff_compute_(text1, text2) {
function diff_bisect_ (line 159) | function diff_bisect_(text1, text2) {
function diff_bisectSplit_ (line 278) | function diff_bisectSplit_(text1, text2, x, y) {
function diff_commonPrefix (line 298) | function diff_commonPrefix(text1, text2) {
function diff_commonSuffix (line 332) | function diff_commonSuffix(text1, text2) {
function diff_halfMatch_ (line 373) | function diff_halfMatch_(text1, text2) {
function diff_cleanupMerge (line 456) | function diff_cleanupMerge(diffs, fix_unicode) {
function is_surrogate_pair_start (line 625) | function is_surrogate_pair_start(charCode) {
function is_surrogate_pair_end (line 629) | function is_surrogate_pair_end(charCode) {
function starts_with_pair_end (line 633) | function starts_with_pair_end(str) {
function ends_with_pair_start (line 637) | function ends_with_pair_start(str) {
function remove_empty_tuples (line 641) | function remove_empty_tuples(tuples) {
function make_edit_splice (line 651) | function make_edit_splice(before, oldMiddle, newMiddle, after) {
function find_cursor_edit_diff (line 663) | function find_cursor_edit_diff(oldText, newText, cursor_pos) {
function diff (line 750) | function diff(text1, text2, cursor_pos) {
FILE: lang/shadeup-frontend/lib/generator/glsl.ts
constant TYPE_BLACKLIST (line 20) | const TYPE_BLACKLIST = [
constant RESERVED_WORDS (line 31) | const RESERVED_WORDS = ['attribute', 'sample', 'varying', 'uniform', 'la...
class GLSLCompilationError (line 33) | class GLSLCompilationError extends Error {
method constructor (line 35) | constructor(public message: string, public node: ts.Node) {
function generateDefaultForType (line 41) | function generateDefaultForType(checker: ts.TypeChecker, _type_node: ts....
function getTypeFallback (line 128) | function getTypeFallback(checker: ts.TypeChecker, t: ts.Type) {
function followTypeReferences (line 156) | function followTypeReferences(t: ts.Type) {
function getTypeArgument (line 167) | function getTypeArgument(t: ts.Type, i: number) {
function translateType (line 175) | function translateType(checker: ts.TypeChecker, t: ts.Type, templateForm...
function isTypeNameVector (line 314) | function isTypeNameVector(name: string) {
function getTypeNameVectorElementType (line 324) | function getTypeNameVectorElementType(name: string) {
function isTranslatedTypeNameVectorOrScalar (line 364) | function isTranslatedTypeNameVectorOrScalar(name: string) {
function isVector (line 377) | function isVector(checker: ts.TypeChecker, t: ts.Type) {
function getVectorElementType (line 385) | function getVectorElementType(checker: ts.TypeChecker, t: ts.Type) {
function isNumeric (line 393) | function isNumeric(checker: ts.TypeChecker, t: ts.Type) {
function escapeIdentifier (line 401) | function escapeIdentifier(id: string) {
function makeWalker (line 408) | function makeWalker() {
type TsAstContext (line 420) | type TsAstContext = {
function getVectorMask (line 426) | function getVectorMask(num: number) {
function isGLSLType (line 435) | function isGLSLType(name: string): boolean {
function autoCastNumeric (line 454) | function autoCastNumeric(value: SourceNode, input: string, expected: str...
function convertConciseBodyToBlock (line 467) | function convertConciseBodyToBlock(body: ts.ConciseBody) {
function compile (line 474) | function compile(
function getClosureVars (line 1488) | function getClosureVars(checker: ts.TypeChecker, func: ts.ConciseBody) {
function getDeclarationType (line 1510) | function getDeclarationType(
function tsIsStatement (line 1521) | function tsIsStatement(node: ts.Node) {
class GLSLShader (line 1547) | class GLSLShader {
method constructor (line 1554) | constructor(key: string, source: string) {
function resolveFunctionName (line 1560) | function resolveFunctionName(f: ts.FunctionDeclaration | ts.MethodDeclar...
function resolveStructName (line 1580) | function resolveStructName(c: ts.ClassDeclaration) {
function isInSameScope (line 1592) | function isInSameScope(node: ts.Node, other: ts.Node) {
function isInShader (line 1623) | function isInShader(node: ts.Node) {
function isRootNode (line 1638) | function isRootNode(node: ts.Node) {
type DepsTable (line 1656) | type DepsTable = {
function isPrimitiveType (line 1687) | function isPrimitiveType(type: ts.Type) {
function isComposedFunction (line 1692) | function isComposedFunction(
function resolveDeps (line 1708) | function resolveDeps(
function resolveUniforms (line 1927) | function resolveUniforms(checker: ts.TypeChecker, root: ts.Node) {
function isVariableDeclarationValue (line 1953) | function isVariableDeclarationValue(checker: ts.TypeChecker, node: ts.No...
function isUniformable (line 1968) | function isUniformable(
function addGLSLShader (line 1983) | function addGLSLShader(
function getNodeSourceFileName (line 2231) | function getNodeSourceFileName(node: ts.Node) {
function walkNodes (line 2241) | function walkNodes(node: ts.Node, cb: (node: ts.Node) => void) {
function walkNodesWithCalls (line 2246) | function walkNodesWithCalls(checker: ts.TypeChecker, node: ts.Node, cb: ...
function findSignatureMappingToGLSL (line 2281) | function findSignatureMappingToGLSL(checker: ts.TypeChecker, sym: ts.Sym...
function findRealSignatureMappingToGLSL (line 2299) | function findRealSignatureMappingToGLSL(checker: ts.TypeChecker, sig: ts...
function removeDoubleUnderscores (line 2317) | function removeDoubleUnderscores(str: string) {
FILE: lang/shadeup-frontend/lib/generator/root.ts
type IndexMapping (line 181) | type IndexMapping = [number, number, number, number][];
type SourceString (line 182) | type SourceString = {
class SourceNode (line 187) | class SourceNode {
method constructor (line 192) | constructor(
method toString (line 207) | public toString(s: SourceString) {
method print (line 219) | public print(): string {
function getTypeFallback (line 226) | function getTypeFallback(checker: ts.TypeChecker, t: ts.Type) {
function followTypeReferences (line 253) | function followTypeReferences(t: ts.Type) {
function removeDoubleUnderscores (line 267) | function removeDoubleUnderscores(str: string) {
function resolveStructName (line 271) | function resolveStructName(c: ts.ClassDeclaration) {
function translateType (line 286) | function translateType(
function lookupIndexMapping (line 417) | function lookupIndexMapping(
function reverseLookupIndexMapping (line 429) | function reverseLookupIndexMapping(
function lookupIndexMappingRange (line 442) | function lookupIndexMappingRange(
function reverseLookupIndexMappingRange (line 462) | function reverseLookupIndexMappingRange(
function reverseLookupIndexMappingCursor (line 482) | function reverseLookupIndexMappingCursor(
function getNamedChild (line 503) | function getNamedChild(node: SyntaxNode, name: string) {
function prePass (line 507) | function prePass(ctx: AstContext, ast: SyntaxNode) {
function generateDefaultForType (line 618) | function generateDefaultForType(name: string) {
function isValidInteger (line 686) | function isValidInteger(str: string) {
function compile (line 695) | function compile(ctx: AstContext, ast: SyntaxNode): SourceNode {
function compileToString (line 1741) | function compileToString(ctx: AstContext, ast: SyntaxNode): string {
function isInShader (line 1752) | function isInShader(ast: SyntaxNode) {
FILE: lang/shadeup-frontend/lib/generator/toposort.ts
function toposort (line 8) | function toposort(edges) {
function toposortinternal (line 12) | function toposortinternal(nodes, edges) {
function uniqueNodes (line 71) | function uniqueNodes(arr) {
function makeOutgoingEdges (line 81) | function makeOutgoingEdges(arr) {
function makeNodesHash (line 92) | function makeNodesHash(arr) {
FILE: lang/shadeup-frontend/lib/generator/transform.ts
function getTypeFallback (line 11) | function getTypeFallback(checker: ts.TypeChecker, t: ts.Type) {
function isNumericType (line 38) | function isNumericType(checker: ts.TypeChecker, type: ts.Type) {
function getVectorLen (line 48) | function getVectorLen(checker: ts.TypeChecker, type: ts.Type) {
function isArrayType (line 67) | function isArrayType(type: ts.Type, checker: ts.TypeChecker): boolean {
function visit (line 84) | function visit(node) {
function visit (line 471) | function visit(node) {
function visit (line 602) | function visit(node) {
function visit (line 872) | function visit(node) {
FILE: lang/shadeup-frontend/lib/generator/tsWalk.ts
type TSVisitData (line 4) | type TSVisitData = {
type TSVisitHandler (line 19) | type TSVisitHandler = (data: TSVisitData) => SourceNode | string;
type TSVisitMapper (line 21) | type TSVisitMapper = {
FILE: lang/shadeup-frontend/lib/generator/util.ts
function resolveNodeName (line 3) | function resolveNodeName(c: ts.Node) {
function cleanName (line 7) | function cleanName(name: string) {
function closest (line 15) | function closest(node: ts.Node, cb: (node: ts.Node) => boolean) {
function findShadeupTags (line 26) | function findShadeupTags(declar: ts.FunctionDeclaration | ts.MethodDecla...
function getFunctionDeclarationFromCallExpression (line 43) | function getFunctionDeclarationFromCallExpression(
FILE: lang/shadeup-frontend/lib/generator/wgsl.ts
constant TYPE_BLACKLIST (line 32) | const TYPE_BLACKLIST = [
constant RESERVED_WORDS (line 43) | const RESERVED_WORDS = [
function generateDefaultForType (line 54) | function generateDefaultForType(checker: ts.TypeChecker, _type_node: ts....
function getTypeFallback (line 137) | function getTypeFallback(checker: ts.TypeChecker, t: ts.Type) {
function followTypeReferences (line 165) | function followTypeReferences(t: ts.Type) {
function getTypeArgument (line 176) | function getTypeArgument(t: ts.Type, i: number) {
function getArrayTypeInfo (line 184) | function getArrayTypeInfo(checker: ts.TypeChecker, t: ts.Type) {
function translateType (line 228) | function translateType(
function isTypeNameVector (line 397) | function isTypeNameVector(name: string) {
function getTypeNameVectorElementType (line 415) | function getTypeNameVectorElementType(name: string): [string, number] {
function getTypeNameVectorElementTypeWGSL (line 467) | function getTypeNameVectorElementTypeWGSL(name: string) {
function isTranslatedTypeNameVectorOrScalar (line 495) | function isTranslatedTypeNameVectorOrScalar(name: string) {
function getWGSLTypeInfo (line 508) | function getWGSLTypeInfo(name: string) {
function isVector (line 630) | function isVector(checker: ts.TypeChecker, t: ts.Type) {
function getVectorElementType (line 638) | function getVectorElementType(checker: ts.TypeChecker, t: ts.Type): [str...
function isNumeric (line 646) | function isNumeric(checker: ts.TypeChecker, t: ts.Type) {
function escapeIdentifier (line 654) | function escapeIdentifier(id: string) {
function makeWalker (line 661) | function makeWalker() {
type TsAstContext (line 673) | type TsAstContext = {
function isAssignableType (line 687) | function isAssignableType(t: string) {
function isGLSLType (line 691) | function isGLSLType(name: string): boolean {
function autoCastNumeric (line 704) | function autoCastNumeric(
function isUniformAccess (line 745) | function isUniformAccess(ctx: TsAstContext, expr: ts.Expression) {
function accessWrap (line 796) | function accessWrap(ctx: TsAstContext, expr: ts.Expression, inner: Sourc...
function getVectorMask (line 856) | function getVectorMask(num: number) {
function convertConciseBodyToBlock (line 865) | function convertConciseBodyToBlock(body: ts.ConciseBody) {
function getRealReturnType (line 873) | function getRealReturnType(checker: ts.TypeChecker, call: ts.CallExpress...
function augmentParameter (line 878) | function augmentParameter(checker: ts.TypeChecker, p: ts.ParameterDeclar...
function augmentArgument (line 901) | function augmentArgument(ctx: TsAstContext, arg: ts.Expression): SourceN...
function compile (line 921) | function compile(
function getClosureVars (line 2631) | function getClosureVars(checker: ts.TypeChecker, func: ts.ConciseBody) {
function getDeclarationType (line 2653) | function getDeclarationType(
function isArrayType (line 2664) | function isArrayType(type: ts.Type, checker: ts.TypeChecker): boolean {
function tsIsStatement (line 2668) | function tsIsStatement(node: ts.Node) {
type UniformKeyValuePair (line 2694) | type UniformKeyValuePair = [string, UniformValueType];
type PrimitiveVectorSizes (line 2696) | type PrimitiveVectorSizes = '' | '2' | '3' | '4';
type PrimitiveUniformType (line 2697) | type PrimitiveUniformType =
class UniformValue (line 2703) | class UniformValue {
method constructor (line 2708) | constructor(valueType: UniformValueType, value: any, order: number = 0) {
type UniformValueType (line 2715) | type UniformValueType =
class WGSLShader (line 2740) | class WGSLShader {
method constructor (line 2749) | constructor(key: string, source: string) {
function resolveFunctionName (line 2755) | function resolveFunctionName(f: ts.FunctionDeclaration | ts.MethodDeclar...
function resolveStructName (line 2775) | function resolveStructName(c: ts.ClassDeclaration) {
function isInSameScope (line 2787) | function isInSameScope(node: ts.Node, other: ts.Node) {
function isInShader (line 2818) | function isInShader(node: ts.Node) {
function isInRoot (line 2833) | function isInRoot(node: ts.Node) {
function isRootNode (line 2850) | function isRootNode(node: ts.Node) {
type DepsTable (line 2868) | type DepsTable = {
function isPrimitiveType (line 2899) | function isPrimitiveType(type: ts.Type) {
function isComposedFunction (line 2904) | function isComposedFunction(
function resolveDeps (line 2920) | function resolveDeps(
function resolveUniforms (line 3183) | function resolveUniforms(checker: ts.TypeChecker, root: ts.Node) {
function isVariableDeclarationValue (line 3281) | function isVariableDeclarationValue(checker: ts.TypeChecker, node: ts.No...
function isUniformable (line 3303) | function isUniformable(
function isValidStructType (line 3318) | function isValidStructType(checker: ts.TypeChecker, type: ts.Type): bool...
function addWGSLShader (line 3322) | function addWGSLShader(
function isAlignable (line 3901) | function isAlignable(t: string) {
function isSpecialUniformType (line 3905) | function isSpecialUniformType(t: string) {
function getNodeSourceFileName (line 3911) | function getNodeSourceFileName(node: ts.Node) {
function walkNodes (line 3921) | function walkNodes(node: ts.Node, cb: (node: ts.Node) => void) {
function walkNodesWithCalls (line 3926) | function walkNodesWithCalls(checker: ts.TypeChecker, node: ts.Node, cb: ...
function getTypeFlags (line 3955) | function getTypeFlags(flags: ts.TypeFlags) {
function getObjectFlags (line 3965) | function getObjectFlags(flags: ts.ObjectFlags) {
function getSymbolAtLocationAndFollowAliases (line 3975) | function getSymbolAtLocationAndFollowAliases(
function findSignatureMappingToWGSL (line 3989) | function findSignatureMappingToWGSL(checker: ts.TypeChecker, sym: ts.Sym...
function removeDoubleUnderscores (line 4007) | function removeDoubleUnderscores(str: string) {
FILE: lang/shadeup-frontend/lib/main.ts
function initTest (line 9) | async function initTest() {
FILE: lang/shadeup-frontend/lib/parser/AstContext.ts
type AstDiagnostic (line 4) | type AstDiagnostic = {
class AstContext (line 9) | class AstContext {
method constructor (line 17) | constructor(fileName: string) {
method report (line 21) | report(node: SyntaxNode, message: string) {
method addImpl (line 25) | addImpl(name: string, node: SyntaxNode) {
method addImplFor (line 33) | addImplFor(name: string, node: SyntaxNode) {
FILE: lang/shadeup-frontend/lib/parser/index.ts
function isBrowser (line 7) | function isBrowser() {
function getShadeupParser (line 17) | async function getShadeupParser() {
FILE: lang/shadeup-frontend/lib/parser/web-tree-sitter/tree-sitter.js
class Parser (line 7) | class Parser {
method constructor (line 8) | constructor() {
method initialize (line 12) | initialize() {
method init (line 16) | static init(moduleOptions) {
FILE: lang/shadeup-frontend/lib/std/all.ts
class Mesh (line 20) | class Mesh {
method constructor (line 30) | constructor(prefils: {
method getVertices (line 49) | getVertices() {
method getTriangles (line 53) | getTriangles() {
method getNormals (line 57) | getNormals() {
method getTangents (line 61) | getTangents() {
method getBitangents (line 65) | getBitangents() {
method getUVs (line 69) | getUVs() {
method getColors (line 73) | getColors() {
function print (line 83) | function print(...args: any[]) {
function flush (line 94) | async function flush() {
function stat (line 106) | function stat(name: string, value: any) {
function statGraph (line 119) | function statGraph(name: string, value: float, sampleRate: int = 1) {
type FnPass (line 145) | type FnPass<T> = (a: T) => void;
function infer (line 147) | function infer<I, O, C>(fn: (a: I, b: O) => void): shader<I, O, C> {
function compute (line 177) | function compute(workgroups: int3, computeShader: shader<any, any, any>) {
function globalVarInit (line 206) | function globalVarInit<T>(
function globalVarGet (line 230) | function globalVarGet(fileName, varName) {
type ToString (line 238) | interface ToString {
type HashableType (line 242) | type HashableType =
function hashableTypeToString (line 255) | function hashableTypeToString(k: HashableType) {
type Array (line 273) | interface Array<T> {
function sleep (line 334) | function sleep(seconds: float) {
type array (line 338) | type array<T> = Array<T>;
function array (line 339) | function array<T>(count: number, initializer: any = null): array<T> {
class map (line 349) | class map<K extends HashableType, V> {
method constructor (line 352) | constructor(entries?: [K, V][]) {
method __index (line 359) | __index(key: K): V {
method __index_assign (line 367) | __index_assign(key: K, value: V) {
method __index_assign_op (line 371) | __index_assign_op(op_fn: (a: V, b: V) => V, key: K, value: V) {
method delete (line 375) | delete(key: K) {
method has (line 379) | has(key: K): bool {
method keys (line 383) | keys(): K[] {
method values (line 387) | values(): V[] {
method new (line 391) | static new<K extends HashableType, V>(entries?: [K, V][]): map<K, V> {
function __makeMap (line 398) | function __makeMap<V>(initial: { [key: string | number]: V }): map<strin...
function __deepClone (line 402) | function __deepClone(value: any) {
type Spatial2d (line 422) | interface Spatial2d {
type Spatial3d (line 431) | interface Spatial3d {
class time (line 440) | class time {
method start (line 442) | static start(name?: string) {
method stop (line 447) | static stop(name?: string): float {
method now (line 465) | static now(): float {
FILE: lang/shadeup-frontend/lib/std/global.d.ts
type float (line 25) | type float = number & { _opaque_float: 2 };
type int (line 26) | type int = number & { _opaque_int: 1 } & float;
type Symbol (line 96) | interface Symbol {
type PropertyKey (line 104) | type PropertyKey = string | number | symbol;
type PropertyDescriptor (line 106) | interface PropertyDescriptor {
type PropertyDescriptorMap (line 115) | interface PropertyDescriptorMap {
type Object (line 119) | interface Object {
type ObjectConstructor (line 151) | interface ObjectConstructor {
type Function (line 276) | interface Function {
type FunctionConstructor (line 310) | interface FunctionConstructor {
type ThisParameterType (line 325) | type ThisParameterType<T> = T extends (this: infer U, ...args: never) =>...
type OmitThisParameter (line 330) | type OmitThisParameter<T> = unknown extends ThisParameterType<T>
type CallableFunction (line 336) | interface CallableFunction extends Function {
type NewableFunction (line 377) | interface NewableFunction extends Function {
type IArguments (line 417) | interface IArguments {
type String (line 423) | interface String {
type StringConstructor (line 550) | interface StringConstructor {
type Boolean (line 562) | interface Boolean {
type BooleanConstructor (line 567) | interface BooleanConstructor {
type Number (line 575) | interface Number {
type NumberConstructor (line 604) | interface NumberConstructor {
type TemplateStringsArray (line 637) | interface TemplateStringsArray extends ReadonlyArray<string> {
type ImportMeta (line 647) | interface ImportMeta {}
type ImportCallOptions (line 655) | interface ImportCallOptions {
type ImportAssertions (line 662) | interface ImportAssertions {
type Math (line 666) | interface Math {
type Date (line 778) | interface Date {
type DateConstructor (line 931) | interface DateConstructor {
type RegExpMatchArray (line 985) | interface RegExpMatchArray extends Array<string> {
type RegExpExecArray (line 1000) | interface RegExpExecArray extends Array<string> {
type RegExp (line 1015) | interface RegExp {
type RegExpConstructor (line 1047) | interface RegExpConstructor {
type Error (line 1097) | interface Error {
type ErrorConstructor (line 1103) | interface ErrorConstructor {
type EvalError (line 1111) | interface EvalError extends Error {}
type EvalErrorConstructor (line 1113) | interface EvalErrorConstructor extends ErrorConstructor {
type RangeError (line 1121) | interface RangeError extends Error {}
type RangeErrorConstructor (line 1123) | interface RangeErrorConstructor extends ErrorConstructor {
type ReferenceError (line 1131) | interface ReferenceError extends Error {}
type ReferenceErrorConstructor (line 1133) | interface ReferenceErrorConstructor extends ErrorConstructor {
type SyntaxError (line 1141) | interface SyntaxError extends Error {}
type SyntaxErrorConstructor (line 1143) | interface SyntaxErrorConstructor extends ErrorConstructor {
type TypeError (line 1151) | interface TypeError extends Error {}
type TypeErrorConstructor (line 1153) | interface TypeErrorConstructor extends ErrorConstructor {
type URIError (line 1161) | interface URIError extends Error {}
type URIErrorConstructor (line 1163) | interface URIErrorConstructor extends ErrorConstructor {
type JSON (line 1171) | interface JSON {
type ReadonlyArray (line 1208) | interface ReadonlyArray<T> {
type ConcatArray (line 1363) | interface ConcatArray<T> {
type Array (line 1370) | interface Array<T> {
type ArrayConstructor (line 1574) | interface ArrayConstructor {
type TypedPropertyDescriptor (line 1587) | interface TypedPropertyDescriptor<T> {
type PromiseConstructorLike (line 1596) | type PromiseConstructorLike = new <T>(
type PromiseLike (line 1600) | interface PromiseLike<T> {
type Promise (line 1616) | interface Promise<T> {
type Awaited (line 1641) | type Awaited<T> = T extends null | undefined
type ArrayLike (line 1649) | interface ArrayLike<T> {
type Partial (line 1657) | type Partial<T> = {
type Required (line 1664) | type Required<T> = {
type Readonly (line 1671) | type Readonly<T> = {
type Pick (line 1678) | type Pick<T, K extends keyof T> = {
type Record (line 1685) | type Record<K extends keyof any, T> = {
type Exclude (line 1692) | type Exclude<T, U> = T extends U ? never : T;
type Extract (line 1697) | type Extract<T, U> = T extends U ? T : never;
type Omit (line 1702) | type Omit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>;
type NonNullable (line 1707) | type NonNullable<T> = T & {};
type Parameters (line 1712) | type Parameters<T extends (...args: any) => any> = T extends (...args: i...
type ConstructorParameters (line 1717) | type ConstructorParameters<T extends abstract new (...args: any) => any>...
type ReturnType (line 1726) | type ReturnType<T extends (...args: any) => any> = T extends (...args: a...
type InstanceType (line 1731) | type InstanceType<T extends abstract new (...args: any) => any> = T exte...
type Uppercase (line 1740) | type Uppercase<S extends string> = intrinsic;
type Lowercase (line 1745) | type Lowercase<S extends string> = intrinsic;
type Capitalize (line 1750) | type Capitalize<S extends string> = intrinsic;
type Uncapitalize (line 1755) | type Uncapitalize<S extends string> = intrinsic;
type ThisType (line 1760) | interface ThisType<T> {}
type ArrayBuffer (line 1768) | interface ArrayBuffer {
type ArrayBufferTypes (line 1783) | interface ArrayBufferTypes {
type ArrayBufferLike (line 1786) | type ArrayBufferLike = ArrayBufferTypes[keyof ArrayBufferTypes];
type ArrayBufferConstructor (line 1788) | interface ArrayBufferConstructor {
type ArrayBufferView (line 1795) | interface ArrayBufferView {
type DataView (line 1812) | interface DataView {
type DataViewConstructor (line 1940) | interface DataViewConstructor {
type Int8Array (line 1954) | interface Int8Array {
type Int8ArrayConstructor (line 2264) | interface Int8ArrayConstructor {
type Uint8Array (line 2301) | interface Uint8Array {
type Uint8ArrayConstructor (line 2612) | interface Uint8ArrayConstructor {
type Uint8ClampedArray (line 2649) | interface Uint8ClampedArray {
type Uint8ClampedArrayConstructor (line 2960) | interface Uint8ClampedArrayConstructor {
type Int16Array (line 3001) | interface Int16Array {
type Int16ArrayConstructor (line 3311) | interface Int16ArrayConstructor {
type Uint16Array (line 3348) | interface Uint16Array {
type Uint16ArrayConstructor (line 3659) | interface Uint16ArrayConstructor {
type Int32Array (line 3695) | interface Int32Array {
type Int32ArrayConstructor (line 4006) | interface Int32ArrayConstructor {
type Uint32Array (line 4043) | interface Uint32Array {
type Uint32ArrayConstructor (line 4353) | interface Uint32ArrayConstructor {
type Float32Array (line 4390) | interface Float32Array {
type Float32ArrayConstructor (line 4701) | interface Float32ArrayConstructor {
type Float64Array (line 4738) | interface Float64Array {
type Float64ArrayConstructor (line 5049) | interface Float64ArrayConstructor {
type CollatorOptions (line 5087) | interface CollatorOptions {
type ResolvedCollatorOptions (line 5115) | interface ResolvedCollatorOptions {
type Collator (line 5125) | interface Collator {
type NumberFormatOptions (line 5135) | interface NumberFormatOptions {
type ResolvedNumberFormatOptions (line 5148) | interface ResolvedNumberFormatOptions {
type NumberFormat (line 5161) | interface NumberFormat {
type DateTimeFormatOptions (line 5172) | interface DateTimeFormatOptions {
type ResolvedDateTimeFormatOptions (line 5195) | interface ResolvedDateTimeFormatOptions {
type DateTimeFormat (line 5212) | interface DateTimeFormat {
type String (line 5224) | interface String {
type Number (line 5234) | interface Number {
type Date (line 5243) | interface Date {
FILE: lang/shadeup-frontend/lib/std/math.ts
type bool (line 1) | type bool = boolean;
type float (line 2) | type float = number & { _opaque_float: 2 };
type int (line 3) | type int = number & { _opaque_int: 1 } & float;
type uint (line 4) | type uint = number & { _opaque_uint: 1 };
type scalar (line 5) | type scalar = float | int | uint;
type float2 (line 7) | type float2 = [float, float] & { _opaque_vector_float_2: 2; length: 2 };
type float3 (line 8) | type float3 = [float, float, float] & { _opaque_vector_float_3: 3; lengt...
type float4 (line 9) | type float4 = [float, float, float, float] & { _opaque_vector_float_4: 4...
type int2 (line 10) | type int2 = [int, int] & { _opaque_vector_int_2: 2 } & float2;
type int3 (line 11) | type int3 = [int, int, int] & { _opaque_vector_int_3: 3 } & float3;
type int4 (line 12) | type int4 = [int, int, int, int] & { _opaque_vector_int_4: 4 } & float4;
type uint2 (line 14) | type uint2 = [uint, uint] & { _opaque_vector_uint_2: 2 } & float2;
type uint3 (line 15) | type uint3 = [uint, uint, uint] & { _opaque_vector_uint_3: 3 } & float3;
type uint4 (line 16) | type uint4 = [uint, uint, uint, uint] & { _opaque_vector_uint_4: 4 } & f...
type uint8 (line 18) | type uint8 = number & { _opaque_uint8: 1 };
type anyFloat (line 20) | type anyFloat = float2 | float3 | float4;
type anyInt (line 21) | type anyInt = int2 | int3 | int4;
type anyUint (line 22) | type anyUint = uint2 | uint3 | uint4;
type vector2 (line 24) | type vector2 = float2 | int2 | uint2;
type vector3 (line 25) | type vector3 = float3 | int3 | uint3;
type vector4 (line 26) | type vector4 = float4 | int4 | uint4;
type vector (line 28) | type vector = vector2 | vector3 | vector4;
type vectorOrScalar (line 30) | type vectorOrScalar = vector | scalar;
type float2x2 (line 32) | interface float2x2 extends Omit<[float, float, float, float], '__index'> {
type float3x3 (line 38) | interface float3x3
type float4x4 (line 45) | interface float4x4
function isVector (line 72) | function isVector(v: vectorOrScalar): v is vector {
function isScalar (line 76) | function isScalar(v: vectorOrScalar): v is scalar {
function isMatrix (line 80) | function isMatrix(v: number[]): v is float2x2 | float3x3 | float4x4 {
function float2x2 (line 89) | function float2x2(...args: float[]): float2x2 {
function float3x3 (line 115) | function float3x3(...args: float[]): float3x3 {
function applyMatrix4x4Methods (line 126) | function applyMatrix4x4Methods(arr: float4x4): void {
function applyMatrix3x3Methods (line 169) | function applyMatrix3x3Methods(arr: float3x3): void {
function applyMatrix2x2Methods (line 211) | function applyMatrix2x2Methods(arr: float2x2): void {
function float4x4 (line 273) | function float4x4(...args: float[]): float4x4 {
function float (line 285) | function float(x: number): float {
function int (line 290) | function int(x: number): int {
function uint (line 295) | function uint(x: number): uint {
function float2 (line 305) | function float2(...args: (vectorOrScalar | number)[]): float2 {
function float3 (line 318) | function float3(...args: (vectorOrScalar | number)[]): float3 {
function float4 (line 340) | function float4(...args: (vectorOrScalar | number)[]): float4 {
function int2 (line 350) | function int2(...args: (vectorOrScalar | number)[]): int2 {
function int3 (line 363) | function int3(...args: (vectorOrScalar | number)[]): int3 {
function int4 (line 385) | function int4(...args: (vectorOrScalar | number)[]): int4 {
function uint2 (line 393) | function uint2(...args: (vectorOrScalar | number)[]): uint2 {
function uint3 (line 405) | function uint3(...args: (vectorOrScalar | number)[]): uint3 {
function uint4 (line 423) | function uint4(...args: (vectorOrScalar | number)[]): uint4 {
function uint8 (line 427) | function uint8(x: number): uint8 {
function componentMath (line 431) | function componentMath(a: any, b: any, f: (a: number, b: number) => numb...
function componentMathSingular (line 470) | function componentMathSingular(a: vectorOrScalar, f: (a: number) => numb...
type cCallCb (line 481) | type cCallCb = (a: number, b: number) => number;
type cCallCbSingle (line 482) | type cCallCbSingle = (a: number) => number;
function cCall (line 489) | function cCall(cb: cCallCb, a: vectorOrScalar, b: vectorOrScalar): vecto...
type vectorOverload_2to1_3to3 (line 493) | type vectorOverload_2to1_3to3 = {
type vectorOverload_2to1_3to3_4to4 (line 506) | type vectorOverload_2to1_3to3_4to4 = {
type vectorOverload_2to1_3to1_4to1 (line 523) | type vectorOverload_2to1_3to1_4to1 = {
type componentOverload (line 541) | type componentOverload = {
type componentOverloadMatch (line 603) | type componentOverloadMatch = {
type componentOverloadSingular (line 629) | type componentOverloadSingular = {
type componentOverloadSingularFloat (line 647) | type componentOverloadSingularFloat = {
type componentOverloadMatrix (line 660) | type componentOverloadMatrix = {
function componentOp (line 684) | function componentOp(cb: cCallCb) {
function componentOpMatch (line 689) | function componentOpMatch(cb: cCallCb) {
function componentOpSingular (line 695) | function componentOpSingular(cb: cCallCbSingle) {
function componentOpSingularFloat (line 701) | function componentOpSingularFloat(cb: cCallCbSingle) {
type matrix (line 722) | type matrix = float2x2 | float3x3 | float4x4;
function matrixMul (line 724) | function matrixMul(a: matrix, b: matrix): matrix {
function matrixInversefloat2x2 (line 912) | function matrixInversefloat2x2(m: float2x2): float2x2 {
function matrixInversefloat3x3 (line 924) | function matrixInversefloat3x3(m: float3x3): float3x3 {
function matrixInversefloat4x4 (line 955) | function matrixInversefloat4x4(m: float4x4): float4x4 {
function matrixTransposefloat2x2 (line 1026) | function matrixTransposefloat2x2(m: float2x2): float2x2 {
function matrixTransposefloat3x3 (line 1035) | function matrixTransposefloat3x3(m: float3x3): float3x3 {
function matrixTransposefloat4x4 (line 1049) | function matrixTransposefloat4x4(m: float4x4): float4x4 {
function matrixMul2x2float2 (line 1070) | function matrixMul2x2float2(a: float2x2, b: float2): float2 {
function matrixMul3x3float3 (line 1082) | function matrixMul3x3float3(a: float3x3, b: float3): float3 {
function matrixMul4x4float4 (line 1094) | function matrixMul4x4float4(a: float4x4, b: float4): float4 {
function matrixMulfloat22x2 (line 1106) | function matrixMulfloat22x2(a: float2, b: float2x2): float2 {
function matrixMulfloat33x3 (line 1118) | function matrixMulfloat33x3(a: float3, b: float3x3): float3 {
function matrixMulfloat44x4 (line 1130) | function matrixMulfloat44x4(a: float4, b: float4x4): float4 {
function inverse (line 1148) | function inverse(a: float2x2 | float3x3 | float4x4): float2x2 | float3x3...
function transpose (line 1162) | function transpose(a: float2x2 | float3x3 | float4x4): float2x2 | float3...
function wrap (line 1315) | function wrap(x: float, low: float, high: float): float {
function rand (line 1338) | function rand(seed?: float): float {
function rand2 (line 1351) | function rand2(seed: float2): float {
function rand3 (line 1360) | function rand3(seed: float3): float {
function pingpong (line 1368) | function pingpong(x: float, length: float): float {
function vectorMath_2to1_3to3 (line 1373) | function vectorMath_2to1_3to3(
function vectorMath_2to1_3to3_4to4 (line 1388) | function vectorMath_2to1_3to3_4to4(
function vectorMath_2to1_3to1_4to1 (line 1405) | function vectorMath_2to1_3to1_4to1(
function cross2 (line 1423) | function cross2(a: float2, b: float2): any {
function cross3 (line 1427) | function cross3(a: float3, b: float3): any {
function dot2 (line 1433) | function dot2(a: float2, b: float2): any {
function dot3 (line 1437) | function dot3(a: float3, b: float3): any {
function dot4 (line 1441) | function dot4(a: float4, b: float4): any {
function lerp1 (line 1448) | function lerp1(a: float, b: float, t: float): float {
function lerp2 (line 1452) | function lerp2(a: float2, b: float2, t: float): float2 {
function lerp3 (line 1456) | function lerp3(a: float3, b: float3, t: float): float3 {
function lerp4 (line 1460) | function lerp4(a: float4, b: float4, t: float): float4 {
function lerp2x2 (line 1469) | function lerp2x2(a: float2x2, b: float2x2, t: float): float2x2 {
function lerp3x3 (line 1478) | function lerp3x3(a: float3x3, b: float3x3, t: float): float3x3 {
function lerp4x4 (line 1492) | function lerp4x4(a: float4x4, b: float4x4, t: float): float4x4 {
function lerp (line 1522) | function lerp(a: any, b: any, t: float): any {
function bilerp (line 1576) | function bilerp(a: any, b: any, c: any, d: any, u: float, v: float): any {
function length (line 1586) | function length(a: any): any {
function dist (line 1605) | function dist<T extends vectorOrScalar>(a: T, b: T): float {
function normalize (line 1617) | function normalize(a: any): any {
function reflect (line 1637) | function reflect(a: any, b: any): any {
function reflect2 (line 1649) | function reflect2(b, a) {
function reflect3 (line 1654) | function reflect3(b, a) {
function reflect4 (line 1659) | function reflect4(b, a) {
function refract (line 1674) | function refract(a: any, b: any, eta: number): any {
function refract2 (line 1686) | function refract2(b, a, eta) {
function refract3 (line 1697) | function refract3(b, a, eta) {
function refract4 (line 1709) | function refract4(b, a, eta) {
function degrees (line 1723) | function degrees(a: float): float {
function radians (line 1728) | function radians(a: float): float {
function step (line 1739) | function step(edge: any, x: any): any {
function _smoothstep (line 1755) | function _smoothstep(a, b, x) {
function smoothstep (line 1766) | function smoothstep(a: any, b: any, x: any): any {
function componentReduce (line 1776) | function componentReduce(vectors: vector[], cb: (a: scalar[]) => scalar) {
function min (line 1801) | function min<T extends vectorOrScalar>(...args: T[]): T {
function max (line 1841) | function max<T extends vectorOrScalar>(...args: T[]): T {
function clamp (line 1882) | function clamp(arg: any, min: any, max: any): any {
function saturate (line 1900) | function saturate(arg: any): any {
function eq (line 1906) | function eq(a: any, b: any): bool {
function makeVector (line 2043) | function makeVector() {
type swizChar (line 2062) | type swizChar = 'x' | 'y' | 'z' | 'w' | 'r' | 'g' | 'b' | 'a';
type swizStr4 (line 2063) | type swizStr4 = `${swizChar}${swizChar}${swizChar}${swizChar}`;
type swizStr3 (line 2064) | type swizStr3 = `${swizChar}${swizChar}${swizChar}`;
type swizStr2 (line 2065) | type swizStr2 = `${swizChar}${swizChar}`;
type swizStr1 (line 2066) | type swizStr1 = `${swizChar}`;
type swizStr4Ord (line 2067) | type swizStr4Ord = `xyzw` | `rgba` | `xxxx` | `rrrr`;
type swizStr3Ord (line 2068) | type swizStr3Ord = `xyz` | `rgb` | `xxx` | `rrr`;
type swizStr2Ord (line 2069) | type swizStr2Ord = `xy` | `rg` | `xx` | `rr`;
type swizStr1Ord (line 2070) | type swizStr1Ord = `x` | `r`;
function testDocComment (line 2105) | function testDocComment() {
function swizzle (line 2188) | function swizzle(v: any, swiz: string, assign?: any) {
function intifyVector (line 2229) | function intifyVector(v: vector) {
class atomic_internal (line 2261) | class atomic_internal<T extends uint | int> {
method constructor (line 2264) | constructor(value: T) {
method load (line 2271) | load(): T {
method store (line 2275) | store(value: T): void {
method add (line 2281) | add(value: T): T {
method sub (line 2288) | sub(value: T): T {
method max (line 2295) | max(value: T): T {
method min (line 2302) | min(value: T): T {
method and (line 2309) | and(value: T): T {
method or (line 2316) | or(value: T): T {
method xor (line 2323) | xor(value: T): T {
method exchange (line 2330) | exchange(value: T): T {
method compareExchangeWeak (line 2337) | compareExchangeWeak(compare: T, value: T): __atomic_compare_exchange_r...
type __atomic_compare_exchange_result (line 2350) | type __atomic_compare_exchange_result<T extends uint | int> = {
type atomic (line 2355) | type atomic<T extends uint | int> = atomic_internal<T>;
function atomic (line 2357) | function atomic<T extends uint | int>(value: T): atomic<T> {
function workgroupBarrier (line 2370) | function workgroupBarrier() {}
function storageBarrier (line 2379) | function storageBarrier() {}
function workgroupUniformLoad (line 2386) | function workgroupUniformLoad<T>(p: T): T {
function discard (line 2399) | function discard() {}
function ddx (line 2408) | function ddx<T extends scalar | vector>(value: T): T {
function ddy (line 2420) | function ddy<T extends scalar | vector>(value: T): T {
function ddxFine (line 2428) | function ddxFine<T extends scalar | vector>(value: T): T {
function ddyFine (line 2436) | function ddyFine<T extends scalar | vector>(value: T): T {
function ddxCoarse (line 2444) | function ddxCoarse<T extends scalar | vector>(value: T): T {
function ddyCoarse (line 2452) | function ddyCoarse<T extends scalar | vector>(value: T): T {
function bitcast (line 2460) | function bitcast<T extends scalar>(value: scalar): T {
FILE: lang/shadeup-frontend/lib/std/static-math.ts
method add_1_1 (line 8) | add_1_1(a: number, b: number): number { return a + b; }
method add_2_1 (line 9) | add_2_1(a: [number, number], b: number): [number, number] { return [a[0]...
method add_1_2 (line 10) | add_1_2(a: number, b: [number, number]): [number, number] { return [a + ...
method add_2_2 (line 11) | add_2_2(a: [number, number], b: [number, number]): [number, number] { re...
method add_3_1 (line 12) | add_3_1(a: [number, number, number], b: number): [number, number, number...
method add_1_3 (line 13) | add_1_3(a: number, b: [number, number, number]): [number, number, number...
method add_3_3 (line 14) | add_3_3(a: [number, number, number], b: [number, number, number]): [numb...
method add_4_1 (line 15) | add_4_1(a: [number, number, number, number], b: number): [number, number...
method add_1_4 (line 16) | add_1_4(a: number, b: [number, number, number, number]): [number, number...
method add_4_4 (line 17) | add_4_4(a: [number, number, number, number], b: [number, number, number,...
method sub_1_1 (line 18) | sub_1_1(a: number, b: number): number { return a - b; }
method sub_2_1 (line 19) | sub_2_1(a: [number, number], b: number): [number, number] { return [a[0]...
method sub_1_2 (line 20) | sub_1_2(a: number, b: [number, number]): [number, number] { return [a - ...
method sub_2_2 (line 21) | sub_2_2(a: [number, number], b: [number, number]): [number, number] { re...
method sub_3_1 (line 22) | sub_3_1(a: [number, number, number], b: number): [number, number, number...
method sub_1_3 (line 23) | sub_1_3(a: number, b: [number, number, number]): [number, number, number...
method sub_3_3 (line 24) | sub_3_3(a: [number, number, number], b: [number, number, number]): [numb...
method sub_4_1 (line 25) | sub_4_1(a: [number, number, number, number], b: number): [number, number...
method sub_1_4 (line 26) | sub_1_4(a: number, b: [number, number, number, number]): [number, number...
method sub_4_4 (line 27) | sub_4_4(a: [number, number, number, number], b: [number, number, number,...
method div_1_1 (line 28) | div_1_1(a: number, b: number): number { return a / b; }
method div_2_1 (line 29) | div_2_1(a: [number, number], b: number): [number, number] { return [a[0]...
method div_1_2 (line 30) | div_1_2(a: number, b: [number, number]): [number, number] { return [a / ...
method div_2_2 (line 31) | div_2_2(a: [number, number], b: [number, number]): [number, number] { re...
method div_3_1 (line 32) | div_3_1(a: [number, number, number], b: number): [number, number, number...
method div_1_3 (line 33) | div_1_3(a: number, b: [number, number, number]): [number, number, number...
method div_3_3 (line 34) | div_3_3(a: [number, number, number], b: [number, number, number]): [numb...
method div_4_1 (line 35) | div_4_1(a: [number, number, number, number], b: number): [number, number...
method div_1_4 (line 36) | div_1_4(a: number, b: [number, number, number, number]): [number, number...
method div_4_4 (line 37) | div_4_4(a: [number, number, number, number], b: [number, number, number,...
method mul_1_1 (line 38) | mul_1_1(a: number, b: number): number { return a * b; }
method mul_2_1 (line 39) | mul_2_1(a: [number, number], b: number): [number, number] { return [a[0]...
method mul_1_2 (line 40) | mul_1_2(a: number, b: [number, number]): [number, number] { return [a * ...
method mul_2_2 (line 41) | mul_2_2(a: [number, number], b: [number, number]): [number, number] { re...
method mul_3_1 (line 42) | mul_3_1(a: [number, number, number], b: number): [number, number, number...
method mul_1_3 (line 43) | mul_1_3(a: number, b: [number, number, number]): [number, number, number...
method mul_3_3 (line 44) | mul_3_3(a: [number, number, number], b: [number, number, number]): [numb...
method mul_4_1 (line 45) | mul_4_1(a: [number, number, number, number], b: number): [number, number...
method mul_1_4 (line 46) | mul_1_4(a: number, b: [number, number, number, number]): [number, number...
method mul_4_4 (line 47) | mul_4_4(a: [number, number, number, number], b: [number, number, number,...
method mod_1_1 (line 48) | mod_1_1(a: number, b: number): number { return a % b; }
method mod_2_1 (line 49) | mod_2_1(a: [number, number], b: number): [number, number] { return [a[0]...
method mod_1_2 (line 50) | mod_1_2(a: number, b: [number, number]): [number, number] { return [a % ...
method mod_2_2 (line 51) | mod_2_2(a: [number, number], b: [number, number]): [number, number] { re...
method mod_3_1 (line 52) | mod_3_1(a: [number, number, number], b: number): [number, number, number...
method mod_1_3 (line 53) | mod_1_3(a: number, b: [number, number, number]): [number, number, number...
method mod_3_3 (line 54) | mod_3_3(a: [number, number, number], b: [number, number, number]): [numb...
method mod_4_1 (line 55) | mod_4_1(a: [number, number, number, number], b: number): [number, number...
method mod_1_4 (line 56) | mod_1_4(a: number, b: [number, number, number, number]): [number, number...
method mod_4_4 (line 57) | mod_4_4(a: [number, number, number, number], b: [number, number, number,...
method bitand_1_1 (line 58) | bitand_1_1(a: number, b: number): number { return a & b; }
method bitand_2_1 (line 59) | bitand_2_1(a: [number, number], b: number): [number, number] { return [a...
method bitand_1_2 (line 60) | bitand_1_2(a: number, b: [number, number]): [number, number] { return [a...
method bitand_2_2 (line 61) | bitand_2_2(a: [number, number], b: [number, number]): [number, number] {...
method bitand_3_1 (line 62) | bitand_3_1(a: [number, number, number], b: number): [number, number, num...
method bitand_1_3 (line 63) | bitand_1_3(a: number, b: [number, number, number]): [number, number, num...
method bitand_3_3 (line 64) | bitand_3_3(a: [number, number, number], b: [number, number, number]): [n...
method bitand_4_1 (line 65) | bitand_4_1(a: [number, number, number, number], b: number): [number, num...
method bitand_1_4 (line 66) | bitand_1_4(a: number, b: [number, number, number, number]): [number, num...
method bitand_4_4 (line 67) | bitand_4_4(a: [number, number, number, number], b: [number, number, numb...
method bitor_1_1 (line 68) | bitor_1_1(a: number, b: number): number { return a | b; }
method bitor_2_1 (line 69) | bitor_2_1(a: [number, number], b: number): [number, number] { return [a[...
method bitor_1_2 (line 70) | bitor_1_2(a: number, b: [number, number]): [number, number] { return [a ...
method bitor_2_2 (line 71) | bitor_2_2(a: [number, number], b: [number, number]): [number, number] { ...
method bitor_3_1 (line 72) | bitor_3_1(a: [number, number, number], b: number): [number, number, numb...
method bitor_1_3 (line 73) | bitor_1_3(a: number, b: [number, number, number]): [number, number, numb...
method bitor_3_3 (line 74) | bitor_3_3(a: [number, number, number], b: [number, number, number]): [nu...
method bitor_4_1 (line 75) | bitor_4_1(a: [number, number, number, number], b: number): [number, numb...
method bitor_1_4 (line 76) | bitor_1_4(a: number, b: [number, number, number, number]): [number, numb...
method bitor_4_4 (line 77) | bitor_4_4(a: [number, number, number, number], b: [number, number, numbe...
method bitxor_1_1 (line 78) | bitxor_1_1(a: number, b: number): number { return a ^ b; }
method bitxor_2_1 (line 79) | bitxor_2_1(a: [number, number], b: number): [number, number] { return [a...
method bitxor_1_2 (line 80) | bitxor_1_2(a: number, b: [number, number]): [number, number] { return [a...
method bitxor_2_2 (line 81) | bitxor_2_2(a: [number, number], b: [number, number]): [number, number] {...
method bitxor_3_1 (line 82) | bitxor_3_1(a: [number, number, number], b: number): [number, number, num...
method bitxor_1_3 (line 83) | bitxor_1_3(a: number, b: [number, number, number]): [number, number, num...
method bitxor_3_3 (line 84) | bitxor_3_3(a: [number, number, number], b: [number, number, number]): [n...
method bitxor_4_1 (line 85) | bitxor_4_1(a: [number, number, number, number], b: number): [number, num...
method bitxor_1_4 (line 86) | bitxor_1_4(a: number, b: [number, number, number, number]): [number, num...
method bitxor_4_4 (line 87) | bitxor_4_4(a: [number, number, number, number], b: [number, number, numb...
method lshift_1_1 (line 88) | lshift_1_1(a: number, b: number): number { return a << b; }
method lshift_2_1 (line 89) | lshift_2_1(a: [number, number], b: number): [number, number] { return [a...
method lshift_1_2 (line 90) | lshift_1_2(a: number, b: [number, number]): [number, number] { return [a...
method lshift_2_2 (line 91) | lshift_2_2(a: [number, number], b: [number, number]): [number, number] {...
method lshift_3_1 (line 92) | lshift_3_1(a: [number, number, number], b: number): [number, number, num...
method lshift_1_3 (line 93) | lshift_1_3(a: number, b: [number, number, number]): [number, number, num...
method lshift_3_3 (line 94) | lshift_3_3(a: [number, number, number], b: [number, number, number]): [n...
method lshift_4_1 (line 95) | lshift_4_1(a: [number, number, number, number], b: number): [number, num...
method lshift_1_4 (line 96) | lshift_1_4(a: number, b: [number, number, number, number]): [number, num...
method lshift_4_4 (line 97) | lshift_4_4(a: [number, number, number, number], b: [number, number, numb...
method rshift_1_1 (line 98) | rshift_1_1(a: number, b: number): number { return a >> b; }
method rshift_2_1 (line 99) | rshift_2_1(a: [number, number], b: number): [number, number] { return [a...
method rshift_1_2 (line 100) | rshift_1_2(a: number, b: [number, number]): [number, number] { return [a...
method rshift_2_2 (line 101) | rshift_2_2(a: [number, number], b: [number, number]): [number, number] {...
method rshift_3_1 (line 102) | rshift_3_1(a: [number, number, number], b: number): [number, number, num...
method rshift_1_3 (line 103) | rshift_1_3(a: number, b: [number, number, number]): [number, number, num...
method rshift_3_3 (line 104) | rshift_3_3(a: [number, number, number], b: [number, number, number]): [n...
method rshift_4_1 (line 105) | rshift_4_1(a: [number, number, number, number], b: number): [number, num...
method rshift_1_4 (line 106) | rshift_1_4(a: number, b: [number, number, number, number]): [number, num...
method rshift_4_4 (line 107) | rshift_4_4(a: [number, number, number, number], b: [number, number, numb...
method bitnot_1 (line 108) | bitnot_1(a: number): number { return ~a; }
method bitnot_2 (line 109) | bitnot_2(a: [number, number]): [number, number] { return [~a[0], ~a[1]]; }
method bitnot_3 (line 110) | bitnot_3(a: [number, number, number]): [number, number, number] { return...
method bitnot_4 (line 111) | bitnot_4(a: [number, number, number, number]): [number, number, number, ...
method negate_1 (line 112) | negate_1(a: number): number { return -a; }
method negate_2 (line 113) | negate_2(a: [number, number]): [number, number] { return [-a[0], -a[1]]; }
method negate_3 (line 114) | negate_3(a: [number, number, number]): [number, number, number] { return...
method negate_4 (line 115) | negate_4(a: [number, number, number, number]): [number, number, number, ...
method positive_1 (line 116) | positive_1(a: number): number { return Math.abs(a); }
method positive_2 (line 117) | positive_2(a: [number, number]): [number, number] { return [Math.abs(a[0...
method positive_3 (line 118) | positive_3(a: [number, number, number]): [number, number, number] { retu...
method positive_4 (line 119) | positive_4(a: [number, number, number, number]): [number, number, number...
method abs_1 (line 120) | abs_1(a: number): number { return Math.abs(a); }
method abs_2 (line 121) | abs_2(a: [number, number]): [number, number] { return [Math.abs(a[0]), M...
method abs_3 (line 122) | abs_3(a: [number, number, number]): [number, number, number] { return [M...
method abs_4 (line 123) | abs_4(a: [number, number, number, number]): [number, number, number, num...
method floor_1 (line 124) | floor_1(a: number): number { return Math.floor(a); }
method floor_2 (line 125) | floor_2(a: [number, number]): [number, number] { return [Math.floor(a[0]...
method floor_3 (line 126) | floor_3(a: [number, number, number]): [number, number, number] { return ...
method floor_4 (line 127) | floor_4(a: [number, number, number, number]): [number, number, number, n...
method ceil_1 (line 128) | ceil_1(a: number): number { return Math.ceil(a); }
method ceil_2 (line 129) | ceil_2(a: [number, number]): [number, number] { return [Math.ceil(a[0]),...
method ceil_3 (line 130) | ceil_3(a: [number, number, number]): [number, number, number] { return [...
method ceil_4 (line 131) | ceil_4(a: [number, number, number, number]): [number, number, number, nu...
method round_1 (line 132) | round_1(a: number): number { return Math.round(a); }
method round_2 (line 133) | round_2(a: [number, number]): [number, number] { return [Math.round(a[0]...
method round_3 (line 134) | round_3(a: [number, number, number]): [number, number, number] { return ...
method round_4 (line 135) | round_4(a: [number, number, number, number]): [number, number, number, n...
method sign_1 (line 136) | sign_1(a: number): number { return Math.sign(a); }
method sign_2 (line 137) | sign_2(a: [number, number]): [number, number] { return [Math.sign(a[0]),...
method sign_3 (line 138) | sign_3(a: [number, number, number]): [number, number, number] { return [...
method sign_4 (line 139) | sign_4(a: [number, number, number, number]): [number, number, number, nu...
method cos_1 (line 140) | cos_1(a: number): number { return Math.cos(a); }
method cos_2 (line 141) | cos_2(a: [number, number]): [number, number] { return [Math.cos(a[0]), M...
method cos_3 (line 142) | cos_3(a: [number, number, number]): [number, number, number] { return [M...
method cos_4 (line 143) | cos_4(a: [number, number, number, number]): [number, number, number, num...
method sin_1 (line 144) | sin_1(a: number): number { return Math.sin(a); }
method sin_2 (line 145) | sin_2(a: [number, number]): [number, number] { return [Math.sin(a[0]), M...
method sin_3 (line 146) | sin_3(a: [number, number, number]): [number, number, number] { return [M...
method sin_4 (line 147) | sin_4(a: [number, number, number, number]): [number, number, number, num...
method tan_1 (line 148) | tan_1(a: number): number { return Math.tan(a); }
method tan_2 (line 149) | tan_2(a: [number, number]): [number, number] { return [Math.tan(a[0]), M...
method tan_3 (line 150) | tan_3(a: [number, number, number]): [number, number, number] { return [M...
method tan_4 (line 151) | tan_4(a: [number, number, number, number]): [number, number, number, num...
method acos_1 (line 152) | acos_1(a: number): number { return Math.acos(a); }
method acos_2 (line 153) | acos_2(a: [number, number]): [number, number] { return [Math.acos(a[0]),...
method acos_3 (line 154) | acos_3(a: [number, number, number]): [number, number, number] { return [...
method acos_4 (line 155) | acos_4(a: [number, number, number, number]): [number, number, number, nu...
method asin_1 (line 156) | asin_1(a: number): number { return Math.asin(a); }
method asin_2 (line 157) | asin_2(a: [number, number]): [number, number] { return [Math.asin(a[0]),...
method asin_3 (line 158) | asin_3(a: [number, number, number]): [number, number, number] { return [...
method asin_4 (line 159) | asin_4(a: [number, number, number, number]): [number, number, number, nu...
method atan_1 (line 160) | atan_1(a: number): number { return Math.atan(a); }
method atan_2 (line 161) | atan_2(a: [number, number]): [number, number] { return [Math.atan(a[0]),...
method atan_3 (line 162) | atan_3(a: [number, number, number]): [number, number, number] { return [...
method atan_4 (line 163) | atan_4(a: [number, number, number, number]): [number, number, number, nu...
method cosh_1 (line 164) | cosh_1(a: number): number { return Math.cosh(a); }
method cosh_2 (line 165) | cosh_2(a: [number, number]): [number, number] { return [Math.cosh(a[0]),...
method cosh_3 (line 166) | cosh_3(a: [number, number, number]): [number, number, number] { return [...
method cosh_4 (line 167) | cosh_4(a: [number, number, number, number]): [number, number, number, nu...
method sinh_1 (line 168) | sinh_1(a: number): number { return Math.sinh(a); }
method sinh_2 (line 169) | sinh_2(a: [number, number]): [number, number] { return [Math.sinh(a[0]),...
method sinh_3 (line 170) | sinh_3(a: [number, number, number]): [number, number, number] { return [...
method sinh_4 (line 171) | sinh_4(a: [number, number, number, number]): [number, number, number, nu...
method tanh_1 (line 172) | tanh_1(a: number): number { return Math.tanh(a); }
method tanh_2 (line 173) | tanh_2(a: [number, number]): [number, number] { return [Math.tanh(a[0]),...
method tanh_3 (line 174) | tanh_3(a: [number, number, number]): [number, number, number] { return [...
method tanh_4 (line 175) | tanh_4(a: [number, number, number, number]): [number, number, number, nu...
method acosh_1 (line 176) | acosh_1(a: number): number { return Math.acosh(a); }
method acosh_2 (line 177) | acosh_2(a: [number, number]): [number, number] { return [Math.acosh(a[0]...
method acosh_3 (line 178) | acosh_3(a: [number, number, number]): [number, number, number] { return ...
method acosh_4 (line 179) | acosh_4(a: [number, number, number, number]): [number, number, number, n...
method asinh_1 (line 180) | asinh_1(a: number): number { return Math.asinh(a); }
method asinh_2 (line 181) | asinh_2(a: [number, number]): [number, number] { return [Math.asinh(a[0]...
method asinh_3 (line 182) | asinh_3(a: [number, number, number]): [number, number, number] { return ...
method asinh_4 (line 183) | asinh_4(a: [number, number, number, number]): [number, number, number, n...
method atanh_1 (line 184) | atanh_1(a: number): number { return Math.atanh(a); }
method atanh_2 (line 185) | atanh_2(a: [number, number]): [number, number] { return [Math.atanh(a[0]...
method atanh_3 (line 186) | atanh_3(a: [number, number, number]): [number, number, number] { return ...
method atanh_4 (line 187) | atanh_4(a: [number, number, number, number]): [number, number, number, n...
method exp_1 (line 188) | exp_1(a: number): number { return Math.exp(a); }
method exp_2 (line 189) | exp_2(a: [number, number]): [number, number] { return [Math.exp(a[0]), M...
method exp_3 (line 190) | exp_3(a: [number, number, number]): [number, number, number] { return [M...
method exp_4 (line 191) | exp_4(a: [number, number, number, number]): [number, number, number, num...
method log_1 (line 192) | log_1(a: number): number { return Math.log(a); }
method log_2 (line 193) | log_2(a: [number, number]): [number, number] { return [Math.log(a[0]), M...
method log_3 (line 194) | log_3(a: [number, number, number]): [number, number, number] { return [M...
method log_4 (line 195) | log_4(a: [number, number, number, number]): [number, number, number, num...
method log2_1 (line 196) | log2_1(a: number): number { return Math.log2(a); }
method log2_2 (line 197) | log2_2(a: [number, number]): [number, number] { return [Math.log2(a[0]),...
method log2_3 (line 198) | log2_3(a: [number, number, number]): [number, number, number] { return [...
method log2_4 (line 199) | log2_4(a: [number, number, number, number]): [number, number, number, nu...
method log10_1 (line 200) | log10_1(a: number): number { return Math.log10(a); }
method log10_2 (line 201) | log10_2(a: [number, number]): [number, number] { return [Math.log10(a[0]...
method log10_3 (line 202) | log10_3(a: [number, number, number]): [number, number, number] { return ...
method log10_4 (line 203) | log10_4(a: [number, number, number, number]): [number, number, number, n...
method sqrt_1 (line 204) | sqrt_1(a: number): number { return Math.sqrt(a); }
method sqrt_2 (line 205) | sqrt_2(a: [number, number]): [number, number] { return [Math.sqrt(a[0]),...
method sqrt_3 (line 206) | sqrt_3(a: [number, number, number]): [number, number, number] { return [...
method sqrt_4 (line 207) | sqrt_4(a: [number, number, number, number]): [number, number, number, nu...
method int_2_1_1 (line 208) | int_2_1_1(a: number, b: number): [number, number] { return [a|0, b|0]; }
method int_2_2 (line 209) | int_2_2(a: [number, number]): [number, number] { return [a[0]|0, a[1]|0]; }
method int_3_1_1_1 (line 210) | int_3_1_1_1(a: number, b: number, c: number): [number, number, number] {...
method int_3_2_1 (line 211) | int_3_2_1(a: [number, number], b: number): [number, number, number] { re...
method int_3_1_2 (line 212) | int_3_1_2(a: number, b: [number, number]): [number, number, number] { re...
method int_3_3 (line 213) | int_3_3(a: [number, number, number]): [number, number, number] { return ...
method int_4_1_1_1_1 (line 214) | int_4_1_1_1_1(a: number, b: number, c: number, d: number): [number, numb...
method int_4_2_1_1 (line 215) | int_4_2_1_1(a: [number, number], b: number, c: number): [number, number,...
method int_4_1_2_1 (line 216) | int_4_1_2_1(a: number, b: [number, number], c: number): [number, number,...
method int_4_1_1_2 (line 217) | int_4_1_1_2(a: number, b: number, c: [number, number]): [number, number,...
method int_4_3_1 (line 218) | int_4_3_1(a: [number, number, number], b: number): [number, number, numb...
method int_4_1_3 (line 219) | int_4_1_3(a: number, b: [number, number, number]): [number, number, numb...
method int_4_2_2 (line 220) | int_4_2_2(a: [number, number], b: [number, number]): [number, number, nu...
method int_4_4 (line 221) | int_4_4(a: [number, number, number, number]): [number, number, number, n...
method float_2_1_1 (line 222) | float_2_1_1(a: number, b: number): [number, number] { return [a, b]; }
method float_2_2 (line 223) | float_2_2(a: [number, number]): [number, number] { return [a[0], a[1]]; }
method float_3_1_1_1 (line 224) | float_3_1_1_1(a: number, b: number, c: number): [number, number, number]...
method float_3_2_1 (line 225) | float_3_2_1(a: [number, number], b: number): [number, number, number] { ...
method float_3_1_2 (line 226) | float_3_1_2(a: number, b: [number, number]): [number, number, number] { ...
method float_3_3 (line 227) | float_3_3(a: [number, number, number]): [number, number, number] { retur...
method float_4_1_1_1_1 (line 228) | float_4_1_1_1_1(a: number, b: number, c: number, d: number): [number, nu...
method float_4_2_1_1 (line 229) | float_4_2_1_1(a: [number, number], b: number, c: number): [number, numbe...
method float_4_1_2_1 (line 230) | float_4_1_2_1(a: number, b: [number, number], c: number): [number, numbe...
method float_4_1_1_2 (line 231) | float_4_1_1_2(a: number, b: number, c: [number, number]): [number, numbe...
method float_4_3_1 (line 232) | float_4_3_1(a: [number, number, number], b: number): [number, number, nu...
method float_4_1_3 (line 233) | float_4_1_3(a: number, b: [number, number, number]): [number, number, nu...
method float_4_2_2 (line 234) | float_4_2_2(a: [number, number], b: [number, number]): [number, number, ...
method float_4_4 (line 235) | float_4_4(a: [number, number, number, number]): [number, number, number,...
method uint_2_1_1 (line 236) | uint_2_1_1(a: number, b: number): [number, number] { return [a>>>0, b>>>...
method uint_2_2 (line 237) | uint_2_2(a: [number, number]): [number, number] { return [a[0]>>>0, a[1]...
method uint_3_1_1_1 (line 238) | uint_3_1_1_1(a: number, b: number, c: number): [number, number, number] ...
method uint_3_2_1 (line 239) | uint_3_2_1(a: [number, number], b: number): [number, number, number] { r...
method uint_3_1_2 (line 240) | uint_3_1_2(a: number, b: [number, number]): [number, number, number] { r...
method uint_3_3 (line 241) | uint_3_3(a: [number, number, number]): [number, number, number] { return...
method uint_4_1_1_1_1 (line 242) | uint_4_1_1_1_1(a: number, b: number, c: number, d: number): [number, num...
method uint_4_2_1_1 (line 243) | uint_4_2_1_1(a: [number, number], b: number, c: number): [number, number...
method uint_4_1_2_1 (line 244) | uint_4_1_2_1(a: number, b: [number, number], c: number): [number, number...
method uint_4_1_1_2 (line 245) | uint_4_1_1_2(a: number, b: number, c: [number, number]): [number, number...
method uint_4_3_1 (line 246) | uint_4_3_1(a: [number, number, number], b: number): [number, number, num...
method uint_4_1_3 (line 247) | uint_4_1_3(a: number, b: [number, number, number]): [number, number, num...
method uint_4_2_2 (line 248) | uint_4_2_2(a: [number, number], b: [number, number]): [number, number, n...
method uint_4_4 (line 249) | uint_4_4(a: [number, number, number, number]): [number, number, number, ...
FILE: lang/shadeup-frontend/test.js
function watch (line 4) | function watch(options) {
FILE: lang/shadeup-frontend/test.ts
function watch (line 3) | function watch(options: ts.CompilerOptions) {
FILE: lang/shadeup/alert.ts
type ShadeupAlert (line 1) | type ShadeupAlert = {
FILE: lang/shadeup/compiler/assets.ts
function buildAssetsFile (line 5) | function buildAssetsFile(content: string) {
FILE: lang/shadeup/compiler/common.ts
type ShadeupFileOutput (line 5) | type ShadeupFileOutput = {
type ShadeupRenderedFile (line 11) | type ShadeupRenderedFile = {
type ShadeupDiagnostic (line 16) | type ShadeupDiagnostic = {
type MessageWorkerToMain (line 27) | type MessageWorkerToMain = {
type WriteFileMessage (line 53) | type WriteFileMessage = {
type GetCompletionsMessage (line 60) | type GetCompletionsMessage = {
type GetHoverMessage (line 65) | type GetHoverMessage = {
type MessageMainToWorker (line 70) | type MessageMainToWorker = {
FILE: lang/shadeup/compiler/generateDocs.ts
type DocFunction (line 19) | type DocFunction = {
type DocProp (line 33) | type DocProp = {
type DocModule (line 40) | type DocModule = {
type DocClass (line 46) | type DocClass = {
type Doc (line 53) | type Doc = {
function generateDocs (line 60) | async function generateDocs() {
function isNodeExported (line 440) | function isNodeExported(node: ts.Node): boolean {
FILE: lang/shadeup/compiler/generateTsCache.ts
function generateTsCache (line 19) | async function generateTsCache() {
FILE: lang/shadeup/compiler/interface.ts
type ShadeupWorkspaceDiagnosticEvent (line 13) | type ShadeupWorkspaceDiagnosticEvent = {
type ShadeupWorkspaceOutputEvent (line 17) | type ShadeupWorkspaceOutputEvent = {
class ShadeupWorkspaceInterface (line 21) | class ShadeupWorkspaceInterface extends EventTarget {
method constructor (line 47) | constructor(worker: Worker) {
method setupWorker (line 53) | setupWorker(worker: Worker) {
method catchUpWorker (line 144) | catchUpWorker() {
method flushWrites (line 157) | flushWrites(): Promise<void> {
method replayOutput (line 168) | replayOutput() {
method updateCachedFiles (line 173) | updateCachedFiles(files: ShadeupRenderedFile[]) {
method applyClassifications (line 184) | applyClassifications(path: string, encoded: ts.Classifications) {
method dispatchOutputEvent (line 195) | dispatchOutputEvent(files: ShadeupRenderedFile[]) {
method on (line 218) | on(event: string, listener: (evt: CustomEvent<any>) => void) {
method off (line 235) | off(event: string, listener: (evt: CustomEvent<any>) => void) {
method processQueue (line 239) | processQueue() {
method enqueueMessage (line 247) | enqueueMessage(msg: MessageMainToWorker) {
method enqueueMessageWithResponse (line 255) | async enqueueMessageWithResponse(msg: MessageMainToWorker): Promise<Me...
method trySendWrite (line 262) | trySendWrite(path: string, ignoreErrors = false) {
method writeFile (line 277) | writeFile(path: string, contents: string, ignoreErrors = false) {
method writeFileWithResponse (line 293) | writeFileWithResponse(path: string, contents: string, ignoreErrors = f...
method writeFileTypescript (line 324) | writeFileTypescript(path: string, contents: string) {
method sendMessage (line 333) | sendMessage(msg: MessageMainToWorker) {
method sendMessageWithResponse (line 346) | sendMessageWithResponse(msg: MessageMainToWorker): Promise<MessageWork...
method connectEditor (line 359) | async connectEditor(path: string, monacoFilename: string, editor: Mona...
method getCompletions (line 365) | async getCompletions(path: string, position: number) {
method getHover (line 377) | async getHover(path: string, position: number) {
method reset (line 389) | reset() {
method assets (line 399) | assets(assets: [string, [string, string]][]) {
function makeShadeupWorkspace (line 404) | async function makeShadeupWorkspace(): Promise<ShadeupWorkspaceInterface> {
FILE: lang/shadeup/compiler/simple.ts
function makeSimpleShadeupEnvironment (line 5) | async function makeSimpleShadeupEnvironment() {
FILE: lang/shadeup/compiler/worker.ts
function findFile (line 64) | function findFile(path: string) {
function tsDiagnosticToShadeupDiagnostic (line 68) | function tsDiagnosticToShadeupDiagnostic(diag: {
function genericDiagnosticToShadeupDiagnostic (line 105) | function genericDiagnosticToShadeupDiagnostic(
function delay (line 134) | function delay(ms: number) {
FILE: lang/shadeup/engine/adapters/adapter.ts
type ShaderType (line 8) | type ShaderType = 'vertex' | 'fragment' | 'compute' | 'vertex-indexed';
type ShaderCodeMapping (line 9) | type ShaderCodeMapping = {
type ShaderParamsMapping (line 14) | type ShaderParamsMapping = {
class GenericShader (line 24) | class GenericShader {
method constructor (line 32) | constructor(code: string, type: ShaderType) {
type UniformKeyValuePair (line 38) | type UniformKeyValuePair = [string, UniformValueType];
type PrimitiveVectorSizes (line 40) | type PrimitiveVectorSizes = '' | '2' | '3' | '4';
type PrimitiveUniformType (line 41) | type PrimitiveUniformType =
class UniformValue (line 50) | class UniformValue {
method constructor (line 54) | constructor(valueType: UniformValueType, value: any) {
type UniformValueType (line 60) | type UniformValueType =
function makePrimitiveUniform (line 92) | function makePrimitiveUniform(type: UniformValueType, value: any): Unifo...
class UniformPayload (line 96) | class UniformPayload {
type ShaderTextureType (line 100) | type ShaderTextureType =
type ShaderBindingOptions (line 105) | type ShaderBindingOptions = {
type ShaderDepthCompareMode (line 110) | type ShaderDepthCompareMode =
class ShaderDispatch (line 120) | class ShaderDispatch {
method constructor (line 149) | constructor(type: 'draw' | 'compute') {
method setVertexUniform (line 155) | setVertexUniform(name: string, value: UniformValue) {
method setFragmentUniform (line 159) | setFragmentUniform(name: string, value: UniformValue) {
method setVertexShader (line 163) | setVertexShader(shader: GenericShader) {
method setFragmentShader (line 167) | setFragmentShader(shader: GenericShader) {
method setComputeShader (line 171) | setComputeShader(shader: GenericShader) {
method setGeometry (line 175) | setGeometry(geometry: Mesh) {
method setIndexBuffer (line 179) | setIndexBuffer(indexBuffer: buffer<int>) {
class GraphicsAdapter (line 184) | class GraphicsAdapter {
method constructor (line 188) | constructor(cnvs: HTMLCanvasElement | null) {
method clear (line 192) | clear(
method draw (line 197) | draw() {}
method init (line 199) | init() {}
method addEventListener (line 201) | addEventListener(name: string, callback: any) {
method removeEventListener (line 210) | removeEventListener(name: string, callback: any) {
method triggerEvent (line 218) | triggerEvent(name: string, ...args: any[]) {
method dispatch (line 226) | dispatch(
method activateDrawContext (line 235) | activateDrawContext() {
method activatePaintContext (line 241) | activatePaintContext() {
method switchContext (line 248) | switchContext(mode: 'paint' | 'draw') {
method drawImage (line 253) | drawImage(image: HTMLCanvasElement, x: number, y: number, width: numbe...
method downloadImage (line 255) | async downloadImage(): Promise<Uint32Array | Int32Array | Float32Array...
method uploadImage (line 258) | uploadImage(
method setViewport (line 262) | setViewport(width: number, height: number) {}
method getOrCreateShader (line 264) | getOrCreateShader(
method createShader (line 272) | createShader(code: ShaderCodeMapping, type: ShaderType): GenericShader {
method unbindTexture (line 276) | unbindTexture(texture: ShadeupTexture2d) {}
method dispose (line 278) | dispose() {}
method flush (line 280) | flush() {
method waitForDraw (line 284) | waitForDraw(): Promise<void> {
FILE: lang/shadeup/engine/adapters/webgl.ts
function indexToRowColumn (line 16) | function indexToRowColumn(str: string, index: number) {
type WithCachedUniformLocation (line 30) | type WithCachedUniformLocation = {
constant TRANSPOSE_MATRICES_UNIFORM (line 34) | const TRANSPOSE_MATRICES_UNIFORM = false;
function rowColumnToIndex (line 43) | function rowColumnToIndex(str: string, row: number, column: number) {
class WebGLAdapter (line 60) | class WebGLAdapter extends GraphicsAdapter {
method init (line 73) | init() {
method setupImageDrawing (line 99) | setupImageDrawing() {
method drawImage (line 160) | drawImage(
method getGL (line 238) | getGL(): WebGL2RenderingContext {
method setViewport (line 246) | setViewport(width: number, height: number) {
method getOrCreateShader (line 252) | getOrCreateShader(
method createShader (line 455) | createShader(code: ShaderCodeMapping, type: ShaderType) {
method clear (line 486) | clear() {
method getProgramVertexPixel (line 493) | getProgramVertexPixel(
method unbindTexture (line 543) | unbindTexture(texture: ShadeupTexture2d) {
method flush (line 554) | flush(): void {
method getTextureUnit (line 560) | getTextureUnit(texture: ShadeupTexture2d | TexImageSource) {
method setUniform (line 655) | setUniform(
method dispatchDraw (line 751) | dispatchDraw(
method dispatchDrawIndexed (line 1043) | dispatchDrawIndexed(
method dispatchDrawCount (line 1128) | dispatchDrawCount(
method getOrCreateBuffer (line 1179) | getOrCreateBuffer(buf: buffer<any>, binding: number): WebGLBuffer {
method dispatch (line 1207) | dispatch(
method genNativeShader (line 1227) | genNativeShader(code: string, type: number) {
FILE: lang/shadeup/engine/adapters/webgpu.ts
constant CACHE_PIPELINES (line 29) | const CACHE_PIPELINES = false;
class WebGPUMeshData (line 201) | class WebGPUMeshData {
method constructor (line 208) | constructor(
type ShaderUniformCachePayload (line 231) | type ShaderUniformCachePayload = {
type PipelinePreDispatchCommands (line 242) | type PipelinePreDispatchCommands = ((encoder: GPUCommandEncoder) => void...
type DrawPipelinePayload (line 244) | type DrawPipelinePayload = {
type ComputePipelinePayload (line 256) | type ComputePipelinePayload = {
constant FORMATS (line 312) | const FORMATS: { [key in TextureComponentType]: GPUTextureFormat } & { u...
constant CAN_BLEND (line 327) | const CAN_BLEND: { [key in TextureComponentType]: boolean } & { uint8: b...
class WebGPUAdapter (line 342) | class WebGPUAdapter extends GraphicsAdapter {
method getValueSize (line 377) | getValueSize(vt: UniformValueType) {
method init (line 381) | init() {
method startDispatch (line 482) | startDispatch() {
method endDispatch (line 491) | endDispatch() {
method trace (line 514) | trace(id: string, data: any) {
method drawImage (line 518) | drawImage(image: HTMLCanvasElement, x: number, y: number, width: numbe...
method genericBufferFlags (line 632) | genericBufferFlags() {
method copyBufferToBuffer (line 636) | copyBufferToBuffer<T>(from: buffer<T>, to: buffer<T>) {
method downloadBuffer (line 649) | async downloadBuffer(buf: buffer<any>) {
method uploadBuffer (line 710) | uploadBuffer(buf: buffer<any>) {
method downloadImage (line 748) | async downloadImage() {
method uploadImage (line 825) | uploadImage(
method getGPU (line 893) | getGPU(): {
method setViewport (line 909) | setViewport(width: number, height: number) {
method translateFormatToGPUType (line 928) | translateFormatToGPUType(type: TextureComponentType): string {
method getOrCreateShader (line 969) | getOrCreateShader(
method createShader (line 1355) | createShader(code: ShaderCodeMapping, type: ShaderType) {
method clear (line 1390) | clear(immediate = false, color: number | [number, number, number, numb...
method fill (line 1437) | fill(color: [number, number, number, number], immediate = false) {
method unbindTexture (line 1468) | unbindTexture(texture: ShadeupTexture2d) {}
method getOrCreateMeshData (line 1470) | getOrCreateMeshData(mesh: Mesh) {
method flushStorage (line 1576) | flushStorage() {
method buildUniformKey (line 1594) | buildUniformKey(generatedUniforms: GeneratedUniforms): (number | strin...
method buildUniformsForPipeline (line 1662) | buildUniformsForPipeline(
method writeStructuredBuffer (line 2579) | writeStructuredBuffer(
method readStructuredBuffer (line 2593) | readStructuredBuffer(structure: UniformValueType, buffer: ArrayBuffer,...
method buildComputePipeline (line 2683) | buildComputePipeline(
method setupDrawPipeline (line 2736) | setupDrawPipeline(
method buildDrawPipeline (line 2880) | buildDrawPipeline(
method getTexture (line 2998) | getTexture(): GPUTexture {
method getStorageTexture (line 3010) | getStorageTexture(): GPUTexture {
method enqueueCommand (line 3041) | enqueueCommand(
method enqueueCleanupCommand (line 3060) | enqueueCleanupCommand(command: () => void | undefined | (() => void | ...
method dispatchCompute (line 3066) | dispatchCompute(dispatch: ShaderDispatch) {
method writeSpecialBuffer (line 3145) | writeSpecialBuffer(buffer: GPUBuffer, data: Float32Array) {
method beforeScreenDraw (line 3152) | beforeScreenDraw() {
method dispatchDraw (line 3198) | dispatchDraw(
method dispatchDrawIndexed (line 3412) | dispatchDrawIndexed(
method dispatchDrawCount (line 3562) | dispatchDrawCount(
method flush (line 3701) | flush(): Promise<void> {
method drawImageRender (line 3753) | drawImageRender(texture: GPUTexture, toTexture: GPUTexture): void {
method copyToOtherCanvas (line 3985) | async copyToOtherCanvas(canvas: HTMLCanvasElement): Promise<void> {
method copyToCanvas (line 4012) | copyToCanvas() {
method dispatch (line 4058) | dispatch(
method dispose (line 4080) | dispose(): void {
method destroyBuffer (line 4086) | destroyBuffer(buf: buffer<any>): void {
method waitForDraw (line 4094) | waitForDraw(): Promise<void> {
method getOrCreateBuffer (line 4101) | getOrCreateBuffer(buf: buffer<any>, extraFlags: GPUBufferUsageFlags | ...
constant TYPE_SIZES_NATIVE (line 4185) | const TYPE_SIZES_NATIVE = {
constant TRANSPOSE_MATRICES_UNIFORM (line 4205) | const TRANSPOSE_MATRICES_UNIFORM = false;
constant TYPE_SIZES (line 4206) | const TYPE_SIZES = {
function getValueSize (line 4232) | function getValueSize(val: UniformValueType): number {
function generateArrayBuffer (line 4278) | function generateArrayBuffer(
type WebGPUSpecialUniform (line 4514) | type WebGPUSpecialUniform =
type GeneratedUniforms (line 4556) | type GeneratedUniforms = {
function generateUniforms (line 4562) | function generateUniforms(
function writeBufferStructure (line 4689) | function writeBufferStructure(
type DrawOptions (line 4896) | type DrawOptions = {
function printImage (line 4904) | function printImage(url: string, size = 10, afterRead?: () => void) {
FILE: lang/shadeup/engine/amd.ts
function globalDefine (line 7) | function globalDefine(name: string, deps: string[], callback: Function):...
function globalRequire (line 47) | function globalRequire(deps: string[]): any {
FILE: lang/shadeup/engine/engine.ts
function __shadeup_register_libs (line 39) | function __shadeup_register_libs(libs: string[]) {
function sizeCanvas (line 113) | function sizeCanvas() {
function rebuildAdapter (line 163) | function rebuildAdapter() {
function resetFrameContext (line 218) | function resetFrameContext() {
function updateFrameContext (line 268) | function updateFrameContext() {
function clear (line 341) | function clear() {
function frameLoop (line 377) | async function frameLoop() {
function __shadeup_gen_native_shader (line 616) | function __shadeup_gen_native_shader(code: ShaderCodeMapping, type: Shad...
function __shadeup_gen_shader (line 624) | function __shadeup_gen_shader(
function __shadeup_make_shader_inst (line 635) | function __shadeup_make_shader_inst(
type TextureComponentType (line 652) | type TextureComponentType = `${'float' | 'int' | 'uint'}${'' | '2' | '3'...
class ShadeupTexture3d (line 654) | class ShadeupTexture3d {
method constructor (line 670) | constructor() {}
method __index (line 673) | __index(index: [number, number, number]): number[] {
method __index_assign (line 678) | __index_assign(index: [number, number, number], value: number[]) {
class ShadeupTexture2d (line 687) | class ShadeupTexture2d {
method constructor (line 713) | constructor() {
method destroy (line 717) | destroy() {
method download (line 721) | async download() {
method getData (line 743) | getData(): Uint32Array | Float32Array | Uint8Array | Int32Array {
method downloadAsync (line 747) | downloadAsync(): Promise<void> {
method __index (line 752) | __index(index: [number, number]): number[] | number {
method init (line 765) | init() {
method __index_assign (line 858) | __index_assign(index: [number, number], value: number[] | number) {
method fillCpuData (line 868) | fillCpuData() {
method sample (line 886) | sample(pos: [number, number]): number[] {
method cpuFlush (line 890) | cpuFlush() {
method upload (line 895) | upload() {
method flush (line 899) | flush(flushStorage = true) {
method drawAdvanced (line 921) | drawAdvanced(config: {
method draw (line 1011) | draw(first: Mesh | any | shader<any, any>, second?: shader<any, any>, ...
method _draw_fullscreen (line 1024) | _draw_fullscreen(pixelShaderInst: ShadeupShaderInstance) {
method _draw_geometry (line 1129) | _draw_geometry(
method drawIndexed (line 1175) | drawIndexed(
method clear (line 1222) | clear(color: float | [number, number, number, number] | 'auto' = 'auto...
method drawCount (line 1231) | drawCount(
method drawInstanced (line 1276) | drawInstanced(
function shadeupMakeTextureInternal (line 1431) | function shadeupMakeTextureInternal(
function shadeupMakeTextureFromImageLike (line 1516) | function shadeupMakeTextureFromImageLike(
function serializeValueToHtml (line 1641) | function serializeValueToHtml(value: any) {
function splitNumberPlaces (line 1828) | function splitNumberPlaces(num: number) {
function activateFreeFly (line 1867) | function activateFreeFly() {
function activateOrbit (line 1875) | function activateOrbit() {
function quaternionFromAxisAngle (line 1970) | function quaternionFromAxisAngle(
function normalizeVector3 (line 1980) | function normalizeVector3(v: [number, number, number]): [number, number,...
function quaternionRotate (line 2075) | function quaternionRotate(
function quaternionMul (line 2092) | function quaternionMul(
function quaternionMulQuaternion (line 2110) | function quaternionMulQuaternion(
function lerp (line 2233) | function lerp(a: number, b: number, t: number) {
function quaternionFromEuler (line 2236) | function quaternionFromEuler(euler: [number, number, number]): [number, ...
function cross (line 2252) | function cross(a: [number, number, number], b: [number, number, number])...
function movementFrame (line 2258) | function movementFrame() {
function __shadeup_dispatch_compute (line 2396) | function __shadeup_dispatch_compute(
function __shadeup_dispatch_compute_indirect (line 2424) | function __shadeup_dispatch_compute_indirect(
function __shadeup_dispatch_draw_advanced (line 2454) | function __shadeup_dispatch_draw_advanced(config: {
function __shadeup_dispatch_draw (line 2538) | function __shadeup_dispatch_draw(pixelShaderInst: ShadeupShaderInstance) {
function makeFullscreenQuadGeometry (line 2639) | function makeFullscreenQuadGeometry() {
function __shadeup_dispatch_draw_geometry (line 2690) | function __shadeup_dispatch_draw_geometry(
function __shadeup_dispatch_draw_indexed (line 2733) | function __shadeup_dispatch_draw_indexed(
function __shadeup_dispatch_draw_instanced_indexed (line 2776) | function __shadeup_dispatch_draw_instanced_indexed(
function __shadeup_dispatch_draw_instanced (line 2822) | function __shadeup_dispatch_draw_instanced(
function __shadeup_dispatch_draw_count (line 2867) | function __shadeup_dispatch_draw_count(
function __shadeup_get_struct (line 2909) | function __shadeup_get_struct(name) {
function __shadeup_register_struct (line 2914) | function __shadeup_register_struct(fields, cls) {
function __shadeup_error (line 2921) | function __shadeup_error(err, context) {
function loadLib (line 2949) | async function loadLib(name: string) {
function loadLibs (line 2962) | async function loadLibs() {
function loadAssets (line 2971) | async function loadAssets() {
function printImage (line 3531) | function printImage(url: string, size = 10) {
function bubbleToParent (line 3552) | function bubbleToParent(e: Event) {
function handleKeyDown (line 3572) | function handleKeyDown(e: KeyboardEvent) {
function getFfmpeg (line 3603) | async function getFfmpeg(): Promise<any> {
FILE: lang/shadeup/engine/gltf.js
method addEventListener (line 1) | addEventListener(e,t){this._listeners===void 0&&(this._listeners={});let...
method hasEventListener (line 1) | hasEventListener(e,t){if(this._listeners===void 0)return!1;let n=this._l...
method removeEventListener (line 1) | removeEventListener(e,t){if(this._listeners===void 0)return;let i=this._...
method dispatchEvent (line 1) | dispatchEvent(e){if(this._listeners===void 0)return;let n=this._listener...
function Wt (line 1) | function Wt(){let s=Math.random()*4294967295|0,e=Math.random()*429496729...
function pt (line 1) | function pt(s,e,t){return Math.max(e,Math.min(t,s))}
function Oo (line 1) | function Oo(s,e){return(s%e+e)%e}
function Bh (line 1) | function Bh(s,e,t,n,i){return n+(s-e)*(i-n)/(t-e)}
function zh (line 1) | function zh(s,e,t){return s!==e?(t-s)/(e-s):0}
function qi (line 1) | function qi(s,e,t){return(1-t)*s+t*e}
function kh (line 1) | function kh(s,e,t,n){return qi(s,e,1-Math.exp(-t*n))}
function Hh (line 1) | function Hh(s,e=1){return e-Math.abs(Oo(s,e*2)-e)}
function Vh (line 1) | function Vh(s,e,t){return s<=e?0:s>=t?1:(s=(s-e)/(t-e),s*s*(3-2*s))}
function Gh (line 1) | function Gh(s,e,t){return s<=e?0:s>=t?1:(s=(s-e)/(t-e),s*s*s*(s*(s*6-15)...
function Wh (line 1) | function Wh(s,e){return s+Math.floor(Math.random()*(e-s+1))}
function Xh (line 1) | function Xh(s,e){return s+Math.random()*(e-s)}
function qh (line 1) | function qh(s){return s*(.5-Math.random())}
function Yh (line 1) | function
Copy disabled (too large)
Download .json
Condensed preview — 402 files, each showing path, character count, and a content snippet. Download the .json file for the full structured content (18,249K chars).
[
{
"path": ".gitattributes",
"chars": 66,
"preview": "# Auto detect text files and perform LF normalization\n* text=auto\n"
},
{
"path": ".gitignore",
"chars": 2008,
"preview": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\nlerna-debug.log*\n.pnpm-debug.log*\n\n# Diagnostic reports"
},
{
"path": ".vscode/launch.json",
"chars": 574,
"preview": "// A launch configuration that launches the extension inside a new window\n// Use IntelliSense to learn about possible at"
},
{
"path": "README.md",
"chars": 813,
"preview": "<p align=\"center\"><a href=\"https://unreal.shadeup.dev\" target=\"_blank\" rel=\"noopener noreferrer\"><img width=\"200\" src=\"h"
},
{
"path": "cli/README.md",
"chars": 1806,
"preview": "<p align=\"center\"><a href=\"https://shadeup.dev\" target=\"_blank\" rel=\"noopener noreferrer\"><img width=\"200\" src=\"https://"
},
{
"path": "cli/cli.js",
"chars": 8377,
"preview": "#!/usr/bin/env node\n\nimport colors from \"colors\";\nimport path from \"path\";\nimport fs from \"fs\";\nimport os from \"os\";\nimp"
},
{
"path": "cli/compiler-dist/compiler.d.ts",
"chars": 49,
"preview": "export function makeLSPCompiler(): Promise<any>;\n"
},
{
"path": "cli/compiler-dist/compiler.js",
"chars": 10180,
"preview": "import { makeSimpleShadeupEnvironment } from \"./shadeup-compiler.js\";\nimport Parser from \"web-tree-sitter\";\nimport minif"
},
{
"path": "cli/compiler-dist/readme.md",
"chars": 270,
"preview": "modify the output of shadeup-compiler.js to:\n\n1. remove the tree sitter wasm strings\n2. Replace getShadeupParse with:\n\na"
},
{
"path": "cli/compiler-dist/shadeup-compiler.js",
"chars": 1826727,
"preview": "import ts from \"typescript\";\nimport require$$0$1 from \"path\";\nimport require$$1 from \"fs\";\nimport { createDefaultMapFrom"
},
{
"path": "cli/electron/index.html",
"chars": 571,
"preview": "<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\" />\n <title>Shadeup Preview</title>\n <meta\n http-equ"
},
{
"path": "cli/electron/main.js",
"chars": 671,
"preview": "import { app, BrowserWindow } from \"electron/main\";\nimport path from \"node:path\";\nconst __dirname = path.dirname(\n new "
},
{
"path": "cli/index.js",
"chars": 47,
"preview": "throw new Error(\"This is a CLI only package\");\n"
},
{
"path": "cli/package.json",
"chars": 745,
"preview": "{\n \"name\": \"@shadeup/cli\",\n \"version\": \"1.3.0\",\n \"description\": \"\",\n \"main\": \"index.js\",\n \"type\": \"module\",\n \"scri"
},
{
"path": "cli/test/main.d.ts",
"chars": 118,
"preview": "import * as __ from \"/std_math\";\nexport declare function main(): void;\nexport declare function giveFloat(): __.float;\n"
},
{
"path": "cli/test/main.js",
"chars": 8397,
"preview": "\nimport { bindShadeupEngine } from \"shadeup\";\n\nexport const makeShadeupInstance = bindShadeupEngine((define, localEngine"
},
{
"path": "cli/test/other.js",
"chars": 0,
"preview": ""
},
{
"path": "cli/test/other.shadeup",
"chars": 59,
"preview": "pub fn drawer() {\n\treturn shader { out.color = 1.xxxx; };\n}"
},
{
"path": "cli/test/vite-project/.gitignore",
"chars": 253,
"preview": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndis"
},
{
"path": "cli/test/vite-project/index.html",
"chars": 624,
"preview": "<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <meta charset=\"UTF-8\" />\n <link rel=\"icon\" type=\"image/svg+xml\" href=\"/"
},
{
"path": "cli/test/vite-project/package.json",
"chars": 270,
"preview": "{\n \"name\": \"vite-project\",\n \"private\": true,\n \"version\": \"0.0.0\",\n \"type\": \"module\",\n \"scripts\": {\n \"dev\": \"vite"
},
{
"path": "cli/test/vite-project/src/index.ts",
"chars": 853,
"preview": "import { makeShadeupInstance } from \"./main\";\n\nconst canvas = document.querySelector<HTMLCanvasElement>(\"#canvas\")!;\n(as"
},
{
"path": "cli/test/vite-project/src/logoPath.shadeup",
"chars": 2697,
"preview": "\n\npub const testVal = 12;\n\npub const logoPath = [\n\n(331.8819682214535,309.37499982761074),\n(371.32282194357356,303.64633"
},
{
"path": "cli/test/vite-project/src/main.d.ts",
"chars": 1545,
"preview": "import * as __ from \"shadeup/math\";\n\ndeclare namespace ShadeupFiles {\n declare namespace main {\n /**__SHADEUP_STRUCT"
},
{
"path": "cli/test/vite-project/src/main.js",
"chars": 41777,
"preview": "import { bindShadeupEngine } from \"shadeup\";\n\nexport const makeShadeupInstance = bindShadeupEngine((define, localEngineC"
},
{
"path": "cli/test/vite-project/src/main.shadeup",
"chars": 951,
"preview": "// Create a cube at the origin (0.xyz)\n// with a size of 100 units (100.xyz)\nlet cube = mesh::box(0.xyz, 100.xyz);\nlet t"
},
{
"path": "cli/test/vite-project/src/style.css",
"chars": 1530,
"preview": ":root {\n font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;\n line-height: 1.5;\n font-weight: 400;\n\n"
},
{
"path": "cli/test/vite-project/src/vite-env.d.ts",
"chars": 38,
"preview": "/// <reference types=\"vite/client\" />\n"
},
{
"path": "cli/test/vite-project/tsconfig.json",
"chars": 527,
"preview": "{\n \"compilerOptions\": {\n \"target\": \"ES2020\",\n \"useDefineForClassFields\": true,\n \"module\": \"ESNext\",\n \"lib\":"
},
{
"path": "cli/vite/.gitignore",
"chars": 252,
"preview": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndis"
},
{
"path": "cli/vite/index.html",
"chars": 474,
"preview": "<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <meta charset=\"UTF-8\" />\n <link rel=\"icon\" type=\"image/svg+xml\" href=\"/"
},
{
"path": "cli/vite/main.js",
"chars": 415,
"preview": "import \"./style.css\";\nimport { makeShadeupInstance } from \"./runner\";\n\nconst canvas = document.querySelector(\"#canvas\");"
},
{
"path": "cli/vite/package.json",
"chars": 284,
"preview": "{\n \"name\": \"vite-project\",\n \"private\": true,\n \"version\": \"0.0.0\",\n \"type\": \"module\",\n \"scripts\": {\n \"dev\": \"vite"
},
{
"path": "cli/vite/runner.d.ts",
"chars": 2102,
"preview": "import * as __ from \"shadeup/math\";\n\ndeclare namespace ShadeupFiles {\n declare namespace sand {\n export declare func"
},
{
"path": "cli/vite/runner.js",
"chars": 104,
"preview": "export const makeShadeupInstance = async (canvas) => {\n return {\n enableUI: async () => {},\n };\n};\n"
},
{
"path": "cli/vite/style.css",
"chars": 606,
"preview": "html,\nbody {\n margin: 0;\n padding: 0;\n font-family: \"Roboto\", sans-serif;\n background-color: black;\n overflow: hidd"
},
{
"path": "cli/vite/vite.config.js",
"chars": 70,
"preview": "/** @type {import('vite').UserConfig} */\nexport default {\n // ...\n};\n"
},
{
"path": "extension/vscode/shadeup/.vscodeignore",
"chars": 37,
"preview": ".vscode/**\n.vscode-test/**\n.gitignore"
},
{
"path": "extension/vscode/shadeup/CHANGELOG.md",
"chars": 234,
"preview": "# Change Log\n\nAll notable changes to the \"shadeup\" extension will be documented in this file.\n\nCheck [Keep a Changelog]("
},
{
"path": "extension/vscode/shadeup/README.md",
"chars": 451,
"preview": "\n\n# Shadeup "
},
{
"path": "extension/vscode/shadeup/Shadeup-tmLanguage.json",
"chars": 264021,
"preview": "{\n \"information_for_contributors\": [\n \"This file has been converted from https://github.com/microsoft/TypeScript-TmL"
},
{
"path": "extension/vscode/shadeup/client/package.json",
"chars": 398,
"preview": "{\n \"name\": \"lsp-shadeup-client\",\n \"description\": \"VSCode part of a language server\",\n \"author\": \"Microsoft Corporatio"
},
{
"path": "extension/vscode/shadeup/client/src/extension.ts",
"chars": 1994,
"preview": "/* --------------------------------------------------------------------------------------------\n * Copyright (c) Microso"
},
{
"path": "extension/vscode/shadeup/client/testFixture/completion.txt",
"chars": 0,
"preview": ""
},
{
"path": "extension/vscode/shadeup/client/testFixture/diagnostics.txt",
"chars": 21,
"preview": "ANY browsers, ANY OS."
},
{
"path": "extension/vscode/shadeup/client/tsconfig.json",
"chars": 222,
"preview": "{\n\t\"compilerOptions\": {\n\t\t\"module\": \"commonjs\",\n\t\t\"target\": \"es2020\",\n\t\t\"lib\": [\"es2020\"],\n\t\t\"outDir\": \"out\",\n\t\t\"rootDir"
},
{
"path": "extension/vscode/shadeup/lang.ts",
"chars": 7385,
"preview": "// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport * as tm from \"tmlanguage-generator\";\n"
},
{
"path": "extension/vscode/shadeup/language-configuration.json",
"chars": 1010,
"preview": "{\n \"wordPattern\": \"(-?\\\\d*\\\\.\\\\d\\\\w*)|([^\\\\`\\\\~\\\\!\\\\@\\\\#\\\\%\\\\^\\\\&\\\\*\\\\(\\\\)\\\\-\\\\=\\\\+\\\\[\\\\{\\\\]\\\\}\\\\\\\\\\\\|\\\\;\\\\:\\\\'\\\\\\\"\\\\,\\"
},
{
"path": "extension/vscode/shadeup/package.json",
"chars": 1558,
"preview": "{\n \"name\": \"shadeup-vscode\",\n \"displayName\": \"Shadeup for VS Code\",\n \"description\": \"Shadeup language server and tool"
},
{
"path": "extension/vscode/shadeup/server/compiler-dist/compiler.d.ts",
"chars": 49,
"preview": "export function makeLSPCompiler(): Promise<any>;\n"
},
{
"path": "extension/vscode/shadeup/server/compiler-dist/compiler.js",
"chars": 599,
"preview": "const { makeSimpleShadeupEnvironment } = require(\"./shadeup-compiler.umd.cjs\");\nconst Parser = require(\"web-tree-sitter\""
},
{
"path": "extension/vscode/shadeup/server/compiler-dist/readme.md",
"chars": 270,
"preview": "modify the output of shadeup-compiler.js to:\n\n1. remove the tree sitter wasm strings\n2. Replace getShadeupParse with:\n\na"
},
{
"path": "extension/vscode/shadeup/server/compiler-dist/shadeup-compiler.umd.cjs",
"chars": 1871764,
"preview": "(function(global2, factory) {\n typeof exports === \"object\" && typeof module !== \"undefined\" ? factory(exports, require("
},
{
"path": "extension/vscode/shadeup/server/package.json",
"chars": 587,
"preview": "{\n \"name\": \"lsp-sample-server\",\n \"description\": \"Example implementation of a language server in node.\",\n \"version\": \""
},
{
"path": "extension/vscode/shadeup/server/src/server.ts",
"chars": 18016,
"preview": "/* --------------------------------------------------------------------------------------------\n * Copyright (c) Microso"
},
{
"path": "extension/vscode/shadeup/server/tsconfig.json",
"chars": 290,
"preview": "{\n \"compilerOptions\": {\n \"target\": \"es2020\",\n \"lib\": [\"es2020\"],\n \"module\": \"commonjs\",\n \"moduleResolution\""
},
{
"path": "extension/vscode/shadeup/shadeup.tmlanguage.json",
"chars": 7015,
"preview": "{\n \"$schema\": \"https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json\",\n \"name\": \"Shadeup\",\n "
},
{
"path": "extension/vscode/shadeup/syntaxes/shadeup.tmLanguage.json",
"chars": 585,
"preview": "{\n\t\"$schema\": \"https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json\",\n\t\"name\": \"Shadeup\",\n\t\"pa"
},
{
"path": "extension/vscode/shadeup/tsconfig.json",
"chars": 304,
"preview": "{\n \"compilerOptions\": {\n \"module\": \"commonjs\",\n \"target\": \"es2020\",\n \"lib\": [\"es2020\"],\n \"outDir\": \"out\",\n "
},
{
"path": "lang/README.md",
"chars": 428,
"preview": "<p align=\"center\"><a href=\"https://unreal.shadeup.dev\" target=\"_blank\" rel=\"noopener noreferrer\"><img width=\"100\" src=\"h"
},
{
"path": "lang/shadeup/alert.ts",
"chars": 141,
"preview": "export type ShadeupAlert = {\n\tlevel: 'info' | 'warning' | 'error';\n\tmessage: string;\n\tlocation: Number;\n\tline?: Number;\n"
},
{
"path": "lang/shadeup/compiler/assets.json",
"chars": 1269,
"preview": "[\n\t[\"heightmaps/crater-lake-color\", \"image\"],\n\t[\"heightmaps/crater-lake\", \"image\"],\n\t[\"heightmaps/grand-canyon\", \"image\""
},
{
"path": "lang/shadeup/compiler/assets.ts",
"chars": 1193,
"preview": "import type { AssetFileType } from '../../components/common/Asset';\n\nimport builtInAssets from './assets.json';\n\nexport "
},
{
"path": "lang/shadeup/compiler/common.ts",
"chars": 1828,
"preview": "import type ts from 'typescript';\nimport type { ClassificationRanges } from '../../../../shadeup-frontend/lib/environmen"
},
{
"path": "lang/shadeup/compiler/generateDocs.ts",
"chars": 10956,
"preview": "import {\n\tShadeupEnvironment,\n\ttype ShadeupGenericDiagnostic\n} from '../../../../shadeup-frontend/lib/environment/Shadeu"
},
{
"path": "lang/shadeup/compiler/generateTsCache.ts",
"chars": 1461,
"preview": "import {\n\tShadeupEnvironment,\n\ttype ShadeupGenericDiagnostic\n} from '../../../../shadeup-frontend/lib/environment/Shadeu"
},
{
"path": "lang/shadeup/compiler/interface.ts",
"chars": 10450,
"preview": "import type { IndexMapping } from '../../../../shadeup-frontend/lib/generator/root';\n\nimport type { MonacoEditorInstance"
},
{
"path": "lang/shadeup/compiler/simple.ts",
"chars": 870,
"preview": "import { ShadeupEnvironment } from '../../../../shadeup-frontend/lib/environment/ShadeupEnvironment';\n\nimport files from"
},
{
"path": "lang/shadeup/compiler/worker.ts",
"chars": 7423,
"preview": "import {\n\tShadeupEnvironment,\n\ttype ShadeupGenericDiagnostic\n} from '../../../../shadeup-frontend/lib/environment/Shadeu"
},
{
"path": "lang/shadeup/engine/adapters/adapter.ts",
"chars": 6630,
"preview": "import type { buffer } from 'src/shadeup/library/buffer';\nimport type { Mesh } from '../../../../../shadeup-frontend/lib"
},
{
"path": "lang/shadeup/engine/adapters/webgl.ts",
"chars": 34674,
"preview": "import type { buffer } from 'src/shadeup/library/buffer';\nimport { ShadeupTexture2d } from '../engine';\nimport type { Sh"
},
{
"path": "lang/shadeup/engine/adapters/webgpu.ts",
"chars": 132539,
"preview": "import type { buffer, buffer_internal } from '../../library/buffer';\nimport type { Mesh } from '../../../../../shadeup-f"
},
{
"path": "lang/shadeup/engine/amd.ts",
"chars": 1755,
"preview": "import resolvePathname from 'resolve-pathname';\n// AMD loader\n\n// This is a very simple AMD loader that is only intended"
},
{
"path": "lang/shadeup/engine/engine-headless.ts",
"chars": 1573,
"preview": "import type { ShadeupRenderedFile } from '../compiler/common';\nimport { globalDefine, globalRequire } from './amd';\nimpo"
},
{
"path": "lang/shadeup/engine/engine.ts",
"chars": 97751,
"preview": "import type { IndexMapping } from '../../../../shadeup-frontend/lib/generator/root';\nimport type { ShadeupRenderedFile }"
},
{
"path": "lang/shadeup/engine/frame-embed.html",
"chars": 1487,
"preview": "<!DOCTYPE html>\n<html>\n\t<head>\n\t\t<title>Shadeup engine</title>\n\t\t<style>\n\t\t\thtml,\n\t\t\tbody {\n\t\t\t\tpadding: 0;\n\t\t\t\tmargin: "
},
{
"path": "lang/shadeup/engine/frame-headless.html",
"chars": 212,
"preview": "<!DOCTYPE html>\n<html>\n\t<head>\n\t\t<title>Shadeup engine (headless)</title>\n\t</head>\n\t<body>\n\t\t<script>\n\t\t\twindow.LONG_GID"
},
{
"path": "lang/shadeup/engine/frame-preview.html",
"chars": 1522,
"preview": "<!DOCTYPE html>\n<html>\n\t<head>\n\t\t<title>Shadeup engine</title>\n\t\t<style>\n\t\t\thtml,\n\t\t\tbody {\n\t\t\t\tpadding: 0;\n\t\t\t\tmargin: "
},
{
"path": "lang/shadeup/engine/frame.html",
"chars": 1694,
"preview": "<!DOCTYPE html>\n<html>\n\t<head>\n\t\t<title>Shadeup engine</title>\n\t\t<style>\n\t\t\thtml,\n\t\t\tbody {\n\t\t\t\tpadding: 0;\n\t\t\t\tmargin: "
},
{
"path": "lang/shadeup/engine/gltf.js",
"chars": 536663,
"preview": "var Uo=\"155\";var Hl=0,ba=1,Vl=2;var sl=1,Gl=2,hn=3,jt=0,bt=1,Gt=2;var Tn=0,xi=1,Aa=2,Ta=3,Ea=4,Wl=5,mi=100,Xl=101,ql=102"
},
{
"path": "lang/shadeup/engine/input/input.ts",
"chars": 6381,
"preview": "import { keyboardKeys } from './keyboardKeys';\n\nexport type MouseState = {\n\tbutton: [boolean, boolean, boolean];\n\tclicke"
},
{
"path": "lang/shadeup/engine/input/keyboardKeys.ts",
"chars": 7904,
"preview": "export const keyboardKeys = [\n\t{\n\t\tname: 'backspace',\n\t\twhich: '8',\n\t\tkey: 'Backspace',\n\t\tcode: 'Backspace'\n\t},\n\t{\n\t\tnam"
},
{
"path": "lang/shadeup/engine/requirejs.js",
"chars": 64022,
"preview": "/** vim: et:ts=4:sw=4:sts=4\n * @license RequireJS 2.3.6 Copyright jQuery Foundation and other contributors.\n * Released "
},
{
"path": "lang/shadeup/engine/setZero.ts",
"chars": 881,
"preview": "// Only add setZeroTimeout to the window object, and hide everything\n// else in a closure.\n(function () {\n\tvar timeouts "
},
{
"path": "lang/shadeup/engine/shader.ts",
"chars": 2130,
"preview": "import type { IndexMapping } from '../../../../shadeup-frontend/lib/generator/root';\n\nimport {\n\tUniformValue,\n\ttype Gene"
},
{
"path": "lang/shadeup/engine/ui/components/Button.svelte",
"chars": 372,
"preview": "<script lang=\"ts\">\n\texport let text: string;\n\texport let setValue: (value: boolean) => void = () => {};\n</script>\n\n<div "
},
{
"path": "lang/shadeup/engine/ui/components/Checkbox.svelte",
"chars": 740,
"preview": "<script lang=\"ts\">\n\texport let value: boolean;\n\texport let setValue: (value: boolean) => void = () => {};\n</script>\n\n<di"
},
{
"path": "lang/shadeup/engine/ui/components/Combo.svelte",
"chars": 637,
"preview": "<script lang=\"ts\">\n\texport let value: string;\n\texport let options: string[];\n\texport let setValue: (value: boolean) => v"
},
{
"path": "lang/shadeup/engine/ui/components/FloatingPanel.svelte",
"chars": 3548,
"preview": "<script lang=\"ts\">\n\timport { slide } from 'svelte/transition';\n\timport type { UIChild } from '../puck';\n\timport { measur"
},
{
"path": "lang/shadeup/engine/ui/components/Group.svelte",
"chars": 1584,
"preview": "<script lang=\"ts\">\n\timport { measureElement } from '$lib/measure';\n\timport { writable } from 'svelte/store';\n\timport typ"
},
{
"path": "lang/shadeup/engine/ui/components/Host.svelte",
"chars": 440,
"preview": "<script lang=\"ts\">\n\timport type { SvelteComponent } from 'svelte';\n\timport FloatingPanel from './FloatingPanel.svelte';\n"
},
{
"path": "lang/shadeup/engine/ui/components/Label.svelte",
"chars": 136,
"preview": "<script lang=\"ts\">\n\texport let value: string;\n</script>\n\n<div class=\"px-3 pb-0.5 text-xs text-white text-opacity-50 pt-2"
},
{
"path": "lang/shadeup/engine/ui/components/Slider.svelte",
"chars": 1597,
"preview": "<script lang=\"ts\">\n\texport let value: number;\n\texport let min: number;\n\texport let max: number;\n\texport let setValue: (v"
},
{
"path": "lang/shadeup/engine/ui/components/Text.svelte",
"chars": 378,
"preview": "<script lang=\"ts\">\n\texport let value: string;\n\texport let setValue: (value: string) => void = () => {};\n</script>\n\n<div "
},
{
"path": "lang/shadeup/engine/ui/components/host.scss",
"chars": 536,
"preview": "@tailwind base;\n@tailwind components;\n@tailwind utilities;\n\n@layer base {\n\thtml {\n\t\t@apply text-white;\n\t}\n}\n\n.floating-p"
},
{
"path": "lang/shadeup/engine/ui/puck.ts",
"chars": 11792,
"preview": "import type { SvelteComponent } from 'svelte';\nimport Slider from './components/Slider.svelte';\nimport Combo from './com"
},
{
"path": "lang/shadeup/engine/ui/ui.ts",
"chars": 342,
"preview": "import { initPuck } from './puck';\nimport Host from './components/Host.svelte';\n\nexport function initUI(canvas: HTMLCanv"
},
{
"path": "lang/shadeup/engine/util.ts",
"chars": 2007,
"preview": "type ExpandedType = { name: string; generics: ExpandedType[] };\n\nexport function parse_type(type: string): ExpandedType "
},
{
"path": "lang/shadeup/engine/virtual-webgl2.js",
"chars": 48155,
"preview": "/*\n * Copyright 2018, Gregg Tavares.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, wi"
},
{
"path": "lang/shadeup/environment.ts",
"chars": 2856,
"preview": "// parse(\"hello world\");\n\nimport type { ShadeupExternalSymbol } from './symbol.js';\n\nimport type * as TYPES from '../../"
},
{
"path": "lang/shadeup/environmentWorker.ts",
"chars": 2997,
"preview": "import type ShadeupEnvironment from './environment';\nimport type { ShadeupExternalSymbol } from './symbol';\n\nimport type"
},
{
"path": "lang/shadeup/frame.html",
"chars": 851,
"preview": "<!DOCTYPE html>\n<html>\n\t<head>\n\t\t<title>Shadeup sandbox</title>\n\t\t<script>\n\t\t\tfunction __shadeup_get_struct(name) {\n\t\t\t\t"
},
{
"path": "lang/shadeup/library/buffer.ts",
"chars": 11683,
"preview": "import { getValueSize } from '../engine/adapters/webgpu';\nimport {\n\tfloat4,\n\tfloat3,\n\tfloat,\n\tfloat2,\n\tbool,\n\tint,\n\tint2"
},
{
"path": "lang/shadeup/library/color.ts",
"chars": 21545,
"preview": "export namespace color {\n\texport const slate50 = [0.9725490196078431, 0.9803921568627451, 0.9882352941176471, 1];\n\texpor"
},
{
"path": "lang/shadeup/library/common.shadeup",
"chars": 64419,
"preview": "\nimport buffer from \"/_std/buffer\";\nimport ui from \"/_std/ui\";\nimport texture2d, texture3d from \"/_std/texture\";\n\n/**\n* "
},
{
"path": "lang/shadeup/library/drawAttributes.ts",
"chars": 454,
"preview": "import { buffer } from '/_std/buffer';\nimport { float4, float3, float, float2, bool, int, uint } from '/std_math';\n\nexpo"
},
{
"path": "lang/shadeup/library/drawCount.ts",
"chars": 276,
"preview": "import { buffer } from '/_std/buffer';\nimport { float4, float3, float, float2, bool, int, uint } from '/std_math';\n\nexpo"
},
{
"path": "lang/shadeup/library/drawIndexed.ts",
"chars": 12488,
"preview": "import { buffer } from '/_std/buffer';\nimport { Mesh } from '/_std/mesh';\nimport { texture2d } from '/_std/texture';\nimp"
},
{
"path": "lang/shadeup/library/examples/deferred.shadeup",
"chars": 2626,
"preview": "let depth = texture2d<float>(env.screenSize, \"depth\");\nlet albedo = texture2d<float4>(env.screenSize, \"16bit\");\nlet norm"
},
{
"path": "lang/shadeup/library/examples/shadow-map.shadeup",
"chars": 1926,
"preview": "const shadowMapSize = 4096;\n\nlet albedo = texture2d<float4>(env.screenSize, \"16bit\");\nlet normal = texture2d<float4>(env"
},
{
"path": "lang/shadeup/library/examples/transparency.shadeup",
"chars": 3133,
"preview": "struct LinkedListElement {\n pub color: float4,\n pub depth: float,\n pub next: uint\n};\n\nlet maxScreenSize = env.screenS"
},
{
"path": "lang/shadeup/library/files.ts",
"chars": 802,
"preview": "import std from './std.ts?raw';\nimport ui from './ui.ts?raw';\nimport native from './native.ts?raw';\nimport buffer from '"
},
{
"path": "lang/shadeup/library/geo.shadeup",
"chars": 463,
"preview": "struct GeoSegment {\n\tstart: float2,\n\tend: float2,\n\tkind: int,\n\tarcRadius: float,\n\tarcStart: float,\n\tarcEnd: float\n}\n\nstr"
},
{
"path": "lang/shadeup/library/mesh.shadeup",
"chars": 15004,
"preview": "\npub struct Mesh {\n\tvertices: float3[];\n\ttriangles: int[];\n\tnormals: float3[];\n\ttangents: float3[];\n\tbitangents: float3["
},
{
"path": "lang/shadeup/library/mesh.ts",
"chars": 0,
"preview": ""
},
{
"path": "lang/shadeup/library/native.ts",
"chars": 15759,
"preview": "import { float4, float3, float, float2, bool, int } from '/std_math';\nimport { texture2d } from '/_std/texture';\nimport "
},
{
"path": "lang/shadeup/library/paint.ts",
"chars": 12656,
"preview": "type GraphicsAdapter = {\n\tdrawImage(image: HTMLCanvasElement): void;\n\taddEventListener(name: string, fn: (...args: any) "
},
{
"path": "lang/shadeup/library/physics.ts",
"chars": 7578,
"preview": "import type RAPIER2DNamespace from '@dimforge/rapier2d/rapier';\nimport type RAPIER3DNamespace from '@dimforge/rapier3d/r"
},
{
"path": "lang/shadeup/library/sdf.shadeup",
"chars": 16028,
"preview": "/**\n* Heplful utility for working with signed distance fields.\n* Most of the implementation was taken from https://iquil"
},
{
"path": "lang/shadeup/library/std.ts",
"chars": 168,
"preview": "export { ui } from '/_std/ui';\nexport { mesh, Mesh } from '/_std/mesh';\nexport { sdf } from '/_std/sdf';\nexport { geo } "
},
{
"path": "lang/shadeup/library/test.shadeup",
"chars": 1003,
"preview": "\n// Option 1\nlet idx = buffer<uint>::new();\nlet buf = buffer<float4>::new();\nlet otherBuf = buffer<float4>::new();\n\ndraw"
},
{
"path": "lang/shadeup/library/texture.ts",
"chars": 2901,
"preview": "import {\n\tfloat4,\n\tfloat3,\n\tfloat,\n\tfloat2,\n\tbool,\n\tint,\n\tint2,\n\tint3,\n\tint4,\n\tuint,\n\tuint2,\n\tuint3,\n\tuint4,\n\tuint8\n} fr"
},
{
"path": "lang/shadeup/library/textures.shadeup",
"chars": 0,
"preview": ""
},
{
"path": "lang/shadeup/library/types.ts",
"chars": 993,
"preview": "export type bool = boolean;\nexport type float = number & { _opaque_float: 2 };\nexport type int = number & { _opaque_int:"
},
{
"path": "lang/shadeup/library/ui.ts",
"chars": 1221,
"preview": "export namespace ui {\n\texport function puck(position: float2): float2 {\n\t\treturn (window as any)._SHADEUP_UI_PUCK(positi"
},
{
"path": "lang/shadeup/monaco/connector.ts",
"chars": 6105,
"preview": "import type { MonacoEditorInstance } from 'src/monaco/editor';\nimport type { ShadeupWorkspaceInterface } from '../compil"
},
{
"path": "lang/shadeup/runner.ts",
"chars": 3085,
"preview": "import type { ShadeupWorkspaceInterface } from './compiler/interface';\nimport ShadeupEnvironment from './environment';\ni"
},
{
"path": "lang/shadeup/symbol.ts",
"chars": 1088,
"preview": "export class ShadeupExternalSymbol {\n\tname: string = '';\n\tkind: string = '';\n\n\toutType: string = '';\n\tparameters: [strin"
},
{
"path": "lang/shadeup/vite.config.js",
"chars": 1452,
"preview": "import { defineConfig } from 'vite';\nimport { NodeGlobalsPolyfillPlugin } from '@esbuild-plugins/node-globals-polyfill';"
},
{
"path": "lang/shadeup/worker.ts",
"chars": 3557,
"preview": "import { makeEnvironment } from 'src/shadeup/runner';\nimport type * as TYPES from '../../../parser-wasm/pkg/parser_wasm'"
},
{
"path": "lang/shadeup-frontend/.gitignore",
"chars": 253,
"preview": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndis"
},
{
"path": "lang/shadeup-frontend/f.js",
"chars": 10919,
"preview": "let x = [\n 1,\n 2,\n 3,\n 3,\n 3,\n 3,\n 3,\n 3,\n 3,\n 3,\n 3,\n 3,\n 3,\n 3,\n 3,\n 3"
},
{
"path": "lang/shadeup-frontend/f.ts",
"chars": 6252,
"preview": "let x = [\n\t1,\n\t2,\n\t3,\n\t3,\n\t3,\n\t3,\n\t3,\n\t3,\n\t3,\n\t3,\n\t3,\n\t3,\n\t3,\n\t3,\n\t3,\n\t3,\n\t3,\n\t3,\n\t3,\n\t3,\n\t3,\n\t3,\n\t3,\n\t3,\n\t3,\n\t3,\n\t3,\n\t3"
},
{
"path": "lang/shadeup-frontend/index.html",
"chars": 403,
"preview": "<!DOCTYPE html>\n<html lang=\"en\" style=\"background-color: black\">\n\t<head>\n\t\t<meta charset=\"UTF-8\" />\n\t\t<link rel=\"icon\" t"
},
{
"path": "lang/shadeup-frontend/lib/ariadne-ts/src/_extensions.ts",
"chars": 1374,
"preview": "declare global {\n\tinterface Array<T> {\n\t\tenumerate(): [number, T][];\n\t\tfilter_map<B>(fn: (value: T, index: number) => B "
},
{
"path": "lang/shadeup-frontend/lib/ariadne-ts/src/browser.ts",
"chars": 482,
"preview": "import \"./_extensions\"\nexport { Display } from \"./data/Display\"\nexport { Range } from './data/Range'\nexport { mkStringWr"
},
{
"path": "lang/shadeup-frontend/lib/ariadne-ts/src/data/Display.ts",
"chars": 1507,
"preview": "import { isCallback } from \"../utils\";\nimport { ColorFn } from \"../lib/Color\";\nimport { isOption, type Option } from \"./"
},
{
"path": "lang/shadeup-frontend/lib/ariadne-ts/src/data/Formatter.ts",
"chars": 930,
"preview": "import { none, type Option } from './Option';\nimport { mkStringWriter, type Write, StdoutWriter } from './Write';\n\nexpor"
},
{
"path": "lang/shadeup-frontend/lib/ariadne-ts/src/data/Iter.ts",
"chars": 21,
"preview": "export class Iter {}\n"
},
{
"path": "lang/shadeup-frontend/lib/ariadne-ts/src/data/Option.ts",
"chars": 2354,
"preview": "\nexport abstract class Option<T> {\n abstract map<R>(fn: (val: T) => R): Option<R>\n abstract map_or<R>(d: R, fn: (val: "
},
{
"path": "lang/shadeup-frontend/lib/ariadne-ts/src/data/Range.ts",
"chars": 793,
"preview": "import { isNumber, isString } from '../utils';\nimport { Span, SpanInit } from './Span';\n\nexport class Range extends Span"
},
{
"path": "lang/shadeup-frontend/lib/ariadne-ts/src/data/Result.ts",
"chars": 1459,
"preview": "export type Result<T, E> = Ok<T, E> | Err<T, E>;\n\nclass Ok<T, E> {\n constructor(private value: T) {}\n map<R>(fn: (valu"
},
{
"path": "lang/shadeup-frontend/lib/ariadne-ts/src/data/Show.ts",
"chars": 1132,
"preview": "\nimport { Formatter } from \"./Formatter\";\nimport { isOption } from \"./Option\";\nimport { isResult } from \"./Result\";\nimpo"
},
{
"path": "lang/shadeup-frontend/lib/ariadne-ts/src/data/Span.ts",
"chars": 1406,
"preview": "import { isNumber, isString, range } from \"../utils\";\nimport { Range } from \"./Range\";\n\nexport type SpanInit = [src: str"
},
{
"path": "lang/shadeup-frontend/lib/ariadne-ts/src/data/Write.ts",
"chars": 1551,
"preview": "import { format } from '../write';\nimport { ok, Result } from './Result';\n\nexport interface Write {\n\twrite_str(s: string"
},
{
"path": "lang/shadeup-frontend/lib/ariadne-ts/src/index.ts",
"chars": 486,
"preview": "import \"./_extensions\"\nexport { Display } from \"./data/Display\"\nexport { Range } from './data/Range'\nexport { Color, Fix"
},
{
"path": "lang/shadeup-frontend/lib/ariadne-ts/src/lib/Characters.ts",
"chars": 1224,
"preview": "\nexport interface iCharacters {\n hbar: string;\n vbar: string;\n xbar: string;\n vbar_break: string;\n vbar_gap: string"
},
{
"path": "lang/shadeup-frontend/lib/ariadne-ts/src/lib/Color.ts",
"chars": 507,
"preview": "import chalk, { ChalkInstance } from './chalk/chalk/source/index';\n\nconst options: any = { enabled: true, level: 2 };\nco"
},
{
"path": "lang/shadeup-frontend/lib/ariadne-ts/src/lib/ColorGenerator.ts",
"chars": 1674,
"preview": "\nimport { ColorFn, Fixed } from \"./Color\"\nimport { clamp, range, wrapping_add_usize } from \"../utils\"\n\n/// A type that c"
},
{
"path": "lang/shadeup-frontend/lib/ariadne-ts/src/lib/Config.ts",
"chars": 4144,
"preview": "import { ColorFn, colors, Fixed } from \"./Color\";\nimport { Display } from \"../data/Display\";\nimport { Option, some } fro"
},
{
"path": "lang/shadeup-frontend/lib/ariadne-ts/src/lib/Label.ts",
"chars": 2402,
"preview": "import { ColorFn } from \"./Color\";\nimport { none, Option, some } from \"../data/Option\";\nimport { SpanInit } from \"../dat"
},
{
"path": "lang/shadeup-frontend/lib/ariadne-ts/src/lib/LabelInfo.ts",
"chars": 271,
"preview": "\nimport { Range } from \"../data/Range\";\nimport { Label } from \"./Label\";\n\nexport enum LabelKind {\n Inline = 'Inline',\n "
},
{
"path": "lang/shadeup-frontend/lib/ariadne-ts/src/lib/Report.ts",
"chars": 26868,
"preview": "import assert from 'assert';\nimport { Display } from '../data/Display';\nimport { none, Option, some } from '../data/Opti"
},
{
"path": "lang/shadeup-frontend/lib/ariadne-ts/src/lib/ReportBuilder.ts",
"chars": 2487,
"preview": "import { Option, some } from \"../data/Option\";\nimport { Span } from \"../data/Span\";\nimport { Config } from \"./Config\";\ni"
},
{
"path": "lang/shadeup-frontend/lib/ariadne-ts/src/lib/ReportKind.ts",
"chars": 1296,
"preview": "import { Formatter } from \"../data/Formatter\";\nimport { write } from \"../write\";\n\n/// A type that defines the kind of re"
},
{
"path": "lang/shadeup-frontend/lib/ariadne-ts/src/lib/Source.ts",
"chars": 6987,
"preview": "import assert from 'assert';\n\nimport { Display } from '../data/Display';\nimport { none, Option, some } from '../data/Opt"
},
{
"path": "lang/shadeup-frontend/lib/ariadne-ts/src/lib/SourceGroup.ts",
"chars": 271,
"preview": "import { Span } from \"../data/Span\";\nimport { Range } from \"../data/Range\";\nimport { LabelInfo } from \"./LabelInfo\";\n\nex"
},
{
"path": "lang/shadeup-frontend/lib/ariadne-ts/src/lib/chalk/chalk/license",
"chars": 1117,
"preview": "MIT License\n\nCopyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)\n\nPermission is hereby grant"
},
{
"path": "lang/shadeup-frontend/lib/ariadne-ts/src/lib/chalk/chalk/readme.md",
"chars": 11280,
"preview": "<h1 align=\"center\">\n\t<br>\n\t<br>\n\t<img width=\"320\" src=\"media/logo.svg\" alt=\"Chalk\">\n\t<br>\n\t<br>\n\t<br>\n</h1>\n\n> Terminal "
},
{
"path": "lang/shadeup-frontend/lib/ariadne-ts/src/lib/chalk/chalk/source/index.d.ts",
"chars": 6911,
"preview": "// TODO: Make it this when TS suports that.\n// import {ModifierName, ForegroundColor, BackgroundColor, ColorName} from '"
},
{
"path": "lang/shadeup-frontend/lib/ariadne-ts/src/lib/chalk/chalk/source/index.js",
"chars": 5978,
"preview": "import ansiStyles from './vendor/ansi-styles';\nimport supportsColor from './vendor/supports-color';\nimport {\n\t// eslint-"
},
{
"path": "lang/shadeup-frontend/lib/ariadne-ts/src/lib/chalk/chalk/source/utilities.js",
"chars": 997,
"preview": "// TODO: When targeting Node.js 16, use `String.prototype.replaceAll`.\nexport function stringReplaceAll(string, substrin"
},
{
"path": "lang/shadeup-frontend/lib/ariadne-ts/src/lib/chalk/chalk/source/vendor/ansi-styles/index.d.ts",
"chars": 5198,
"preview": "export interface CSPair { // eslint-disable-line @typescript-eslint/naming-convention\n\t/**\n\tThe ANSI terminal control se"
},
{
"path": "lang/shadeup-frontend/lib/ariadne-ts/src/lib/chalk/chalk/source/vendor/ansi-styles/index.js",
"chars": 5256,
"preview": "const ANSI_BACKGROUND_OFFSET = 10;\n\nconst wrapAnsi16 = (offset = 0) => code => `\\u001B[${code + offset}m`;\n\nconst wrapAn"
},
{
"path": "lang/shadeup-frontend/lib/ariadne-ts/src/lib/chalk/chalk/source/vendor/supports-color/browser.d.ts",
"chars": 36,
"preview": "export {default} from './index.js';\n"
},
{
"path": "lang/shadeup-frontend/lib/ariadne-ts/src/lib/chalk/chalk/source/vendor/supports-color/browser.js",
"chars": 532,
"preview": "/* eslint-env browser */\n\nconst level = (() => {\n\tif (navigator.userAgentData) {\n\t\tconst brand = navigator.userAgentData"
},
{
"path": "lang/shadeup-frontend/lib/ariadne-ts/src/lib/chalk/chalk/source/vendor/supports-color/index.d.ts",
"chars": 1010,
"preview": "import type {WriteStream} from 'node:tty';\n\nexport type Options = {\n\t/**\n\tWhether `process.argv` should be sniffed for `"
},
{
"path": "lang/shadeup-frontend/lib/ariadne-ts/src/lib/chalk/chalk/source/vendor/supports-color/index.js",
"chars": 3085,
"preview": "// From: https://github.com/sindresorhus/has-flag/blob/main/index.js\n/// function hasFlag(flag, argv = globalThis.Deno?."
},
{
"path": "lang/shadeup-frontend/lib/ariadne-ts/src/stringFormat.ts",
"chars": 2405,
"preview": "// ValueError :: String -> Error\nfunction ValueError(message) {\n\tvar err = new Error(message);\n\terr.name = 'ValueError'"
},
{
"path": "lang/shadeup-frontend/lib/ariadne-ts/src/utils/binary_search_by_key.ts",
"chars": 880,
"preview": "import { err, ok, Result } from '../data/Result';\n\n\nexport function binary_search_by_key<T>(arr: T[], x: any, fn: (o: T)"
},
{
"path": "lang/shadeup-frontend/lib/ariadne-ts/src/utils/include_str.ts",
"chars": 197,
"preview": "// import { readFileSync } from 'fs';\nimport { join } from 'path';\n\nexport function include_str(path: string): string {\n"
},
{
"path": "lang/shadeup-frontend/lib/ariadne-ts/src/utils/index.ts",
"chars": 1999,
"preview": "import { Option } from '../data/Option';\n\nexport { binary_search_by_key } from './binary_search_by_key'\n\nexport function"
},
{
"path": "lang/shadeup-frontend/lib/ariadne-ts/src/write.ts",
"chars": 1310,
"preview": "import sf from './stringFormat.js';\nimport { Display, isDisplay } from './data/Display';\nimport { stringFormatter } from"
},
{
"path": "lang/shadeup-frontend/lib/environment/Errors.ts",
"chars": 248,
"preview": "import ts from 'typescript';\n\nexport function nicerError(e: ts.DiagnosticMessageChain | ts.DiagnosticRelatedInformation)"
},
{
"path": "lang/shadeup-frontend/lib/environment/ShadeupEnvironment.ts",
"chars": 37466,
"preview": "import { SourceMapConsumer } from 'source-map';\nimport Parser from 'web-tree-sitter';\nimport {\n\tcompile,\n\tIndexMapping,\n"
},
{
"path": "lang/shadeup-frontend/lib/environment/TypescriptEnvironment.ts",
"chars": 4900,
"preview": "import {\n\tcreateDefaultMapFromCDN,\n\tcreateVirtualTypeScriptEnvironment,\n\tcreateSystem,\n\tVirtualTypeScriptEnvironment,\n\tc"
},
{
"path": "lang/shadeup-frontend/lib/environment/quickCache.json",
"chars": 504224,
"preview": "{\"/file.ts\":{\"outputFiles\":[{\"name\":\"/file.js\",\"writeByteOrderMark\":false,\"text\":\"define([\\\"require\\\", \\\"exports\\\", \\\"/s"
},
{
"path": "lang/shadeup-frontend/lib/environment/tagGraph.ts",
"chars": 2199,
"preview": "import ts from 'typescript';\n\nclass TagNode {\n\tname: string;\n\ttsNode?: ts.Node;\n\ttags: string[];\n\tedges: TagNode[];\n\tedg"
},
{
"path": "lang/shadeup-frontend/lib/environment/validate.ts",
"chars": 13749,
"preview": "/**\n * Validates the checked typescript ast\n */\n\nimport ts from 'typescript';\nimport { lookupIndexMappingRange } from '."
},
{
"path": "lang/shadeup-frontend/lib/fast-diff/diff.js",
"chars": 25566,
"preview": "/**\n * This library modifies the diff-patch-match library by Neil Fraser\n * by removing the patch and match functionalit"
},
{
"path": "lang/shadeup-frontend/lib/generator/eval.js",
"chars": 0,
"preview": ""
},
{
"path": "lang/shadeup-frontend/lib/generator/glsl.ts",
"chars": 64557,
"preview": "import ts from 'typescript';\nlet { factory, isIdentifier } = ts;\nimport { TSVisitMapper } from './tsWalk';\n\nimport topos"
},
{
"path": "lang/shadeup-frontend/lib/generator/header.glsl",
"chars": 2836,
"preview": "uint shadeup_up_swizzle_x_uint(uint n) {\n\treturn n;\n}\n\nuvec2 shadeup_up_swizzle_xx_uint(uint n) {\n\treturn uvec2(n, n);\n}"
},
{
"path": "lang/shadeup-frontend/lib/generator/header.wgsl",
"chars": 8933,
"preview": "fn shadeup_up_swizzle_x_u32(n: u32) -> u32{\n\treturn n;\n}\nfn shadeup_up_swizzle_xx_u32(n: u32) -> vec2<u32>{\n\treturn vec2"
},
{
"path": "lang/shadeup-frontend/lib/generator/root.ts",
"chars": 46979,
"preview": "// import { SourceNode } from 'source-map';\nimport sha256 from \"fast-sha256\";\nimport { SyntaxNode } from \"web-tree-sitte"
},
{
"path": "lang/shadeup-frontend/lib/generator/toposort.ts",
"chars": 2185,
"preview": "/**\n * Topological sorting function\n *\n * @param {Array} edges\n * @returns {Array}\n */\n\nexport default function toposort"
},
{
"path": "lang/shadeup-frontend/lib/generator/transform.ts",
"chars": 28199,
"preview": "import ts from 'typescript';\nimport { getFunctionNodeName, ShadeupEnvironment } from '../environment/ShadeupEnvironment'"
},
{
"path": "lang/shadeup-frontend/lib/generator/tsWalk.ts",
"chars": 869,
"preview": "import ts from 'typescript';\nimport { SourceNode } from './root';\n\nexport type TSVisitData = {\n\tast: ts.Node;\n\tchecker: "
},
{
"path": "lang/shadeup-frontend/lib/generator/util.ts",
"chars": 1547,
"preview": "import ts from 'typescript';\n\nexport function resolveNodeName(c: ts.Node) {\n\treturn `${c.getSourceFile().fileName.replac"
},
{
"path": "lang/shadeup-frontend/lib/generator/wgsl.ts",
"chars": 112323,
"preview": "import ts from 'typescript';\nlet {\n\tfactory,\n\tisArrayTypeNode,\n\tisCallExpression,\n\tisIdentifier,\n\tisPropertyAccessChain,"
},
{
"path": "lang/shadeup-frontend/lib/main.ts",
"chars": 1039,
"preview": "import { SourceMapConsumer } from 'source-map';\nimport { compile } from './generator/root';\nimport { getShadeupParser } "
},
{
"path": "lang/shadeup-frontend/lib/parser/AstContext.ts",
"chars": 887,
"preview": "import { SyntaxNode } from 'web-tree-sitter';\nimport { GLSLShader } from '../generator/glsl';\n\ntype AstDiagnostic = {\n\tm"
},
{
"path": "lang/shadeup-frontend/lib/parser/index.ts",
"chars": 1391,
"preview": "import Parser from 'web-tree-sitter';\nimport treeSitterShadeupURL from './tree-sitter-shadeup.wasm?url';\nimport treeSitt"
},
{
"path": "lang/shadeup-frontend/lib/parser/node.cjs",
"chars": 239,
"preview": "const ParserNode = require('tree-sitter');\nconst ShadeupParser = require('../../../tree-sitter/bindings/node/index');\n\nm"
},
{
"path": "lang/shadeup-frontend/lib/parser/wasm.ts",
"chars": 0,
"preview": ""
},
{
"path": "lang/shadeup-frontend/lib/parser/web-tree-sitter/tree-sitter.js",
"chars": 36274,
"preview": "var TreeSitter = function() {\n var initPromise;\n var document = typeof window == 'object'\n ? {currentScript: window"
},
{
"path": "lang/shadeup-frontend/lib/std/all.ts",
"chars": 10659,
"preview": "/**__SHADEUP_STRUCT_INJECTION_HOOK__*/\nexport const __dummy = 1;\n\nimport {\n\tbool,\n\tfloat,\n\tfloat2,\n\tfloat3,\n\tfloat4,\n\tin"
},
{
"path": "lang/shadeup-frontend/lib/std/generate-static-math.ts",
"chars": 4680,
"preview": "import { makeVectors, simpleFunctions, singleFunctions } from './static-math-db';\n\nlet out = `\n///\n/// GENERATED\n/// DO "
},
{
"path": "lang/shadeup-frontend/lib/std/global.d.ts",
"chars": 204474,
"preview": "/*! *****************************************************************************\nCopyright (c) Microsoft Corporation. A"
},
{
"path": "lang/shadeup-frontend/lib/std/math.ts",
"chars": 74111,
"preview": "export type bool = boolean;\nexport type float = number & { _opaque_float: 2 };\nexport type int = number & { _opaque_int:"
}
]
// ... and 202 more files (download for full content)
About this extraction
This page contains the full source code of the AskingQuestions/Shadeup GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 402 files (16.3 MB), approximately 4.3M tokens, and a symbol index with 8274 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.