pi-usereq 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.g.conf +20 -0
- package/.github/workflows/release-npm.yml +131 -0
- package/.gitignore +270 -0
- package/CHANGELOG.md +221 -0
- package/LICENSE +674 -0
- package/README.md +260 -0
- package/TODO.md +20 -0
- package/docs/pi.dev/agent-document-manifest.json +6399 -0
- package/docs/pi.dev/coding-agent-docs/compaction.md +394 -0
- package/docs/pi.dev/coding-agent-docs/custom-provider.md +596 -0
- package/docs/pi.dev/coding-agent-docs/development.md +71 -0
- package/docs/pi.dev/coding-agent-docs/extensions.md +2262 -0
- package/docs/pi.dev/coding-agent-docs/images/doom-extension.png +0 -0
- package/docs/pi.dev/coding-agent-docs/images/exy.png +0 -0
- package/docs/pi.dev/coding-agent-docs/images/interactive-mode.png +0 -0
- package/docs/pi.dev/coding-agent-docs/images/tree-view.png +0 -0
- package/docs/pi.dev/coding-agent-docs/json.md +82 -0
- package/docs/pi.dev/coding-agent-docs/keybindings.md +175 -0
- package/docs/pi.dev/coding-agent-docs/models.md +392 -0
- package/docs/pi.dev/coding-agent-docs/packages.md +218 -0
- package/docs/pi.dev/coding-agent-docs/prompt-templates.md +67 -0
- package/docs/pi.dev/coding-agent-docs/providers.md +195 -0
- package/docs/pi.dev/coding-agent-docs/rpc.md +1377 -0
- package/docs/pi.dev/coding-agent-docs/sdk.md +1124 -0
- package/docs/pi.dev/coding-agent-docs/session.md +412 -0
- package/docs/pi.dev/coding-agent-docs/settings.md +247 -0
- package/docs/pi.dev/coding-agent-docs/shell-aliases.md +13 -0
- package/docs/pi.dev/coding-agent-docs/skills.md +232 -0
- package/docs/pi.dev/coding-agent-docs/terminal-setup.md +106 -0
- package/docs/pi.dev/coding-agent-docs/termux.md +127 -0
- package/docs/pi.dev/coding-agent-docs/themes.md +295 -0
- package/docs/pi.dev/coding-agent-docs/tmux.md +61 -0
- package/docs/pi.dev/coding-agent-docs/tree.md +231 -0
- package/docs/pi.dev/coding-agent-docs/tui.md +887 -0
- package/docs/pi.dev/coding-agent-docs/windows.md +17 -0
- package/docs/pi.dev/mom-docs/artifacts-server.md +475 -0
- package/docs/pi.dev/mom-docs/events.md +307 -0
- package/docs/pi.dev/mom-docs/new.md +970 -0
- package/docs/pi.dev/mom-docs/sandbox.md +153 -0
- package/docs/pi.dev/mom-docs/slack-bot-minimal-guide.md +399 -0
- package/docs/pi.dev/mom-docs/v86.md +319 -0
- package/docs/pi.dev/pods-docs/gml-4.5.md +189 -0
- package/docs/pi.dev/pods-docs/gpt-oss.md +233 -0
- package/docs/pi.dev/pods-docs/implementation-plan.md +183 -0
- package/docs/pi.dev/pods-docs/kimi-k2.md +197 -0
- package/docs/pi.dev/pods-docs/models.md +116 -0
- package/docs/pi.dev/pods-docs/plan.md +166 -0
- package/docs/pi.dev/pods-docs/qwen3-coder.md +132 -0
- package/images/flowchart-bw.png +0 -0
- package/images/flowchart-bw.svg +102 -0
- package/images/flowchart.md +100 -0
- package/images/flowchart.png +0 -0
- package/images/flowchart.svg +3 -0
- package/package.json +46 -0
- package/req/docs/REFERENCES.md +4554 -0
- package/req/docs/REQUIREMENTS.md +475 -0
- package/req/docs/WORKFLOW.md +1059 -0
- package/scripts/debug-extension.ts +497 -0
- package/scripts/lib/extension-debug-harness.ts +450 -0
- package/scripts/lib/recording-extension-api.ts +786 -0
- package/scripts/lib/sdk-smoke.ts +503 -0
- package/scripts/pi-usereq-debug.sh +330 -0
- package/scripts/tool-args-to-params.ts +208 -0
- package/src/cli.ts +349 -0
- package/src/core/agent-tool-json.ts +621 -0
- package/src/core/compress-files.ts +72 -0
- package/src/core/compress-payload.ts +648 -0
- package/src/core/compress.ts +464 -0
- package/src/core/config.ts +272 -0
- package/src/core/doxygen-parser.ts +318 -0
- package/src/core/errors.ts +31 -0
- package/src/core/extension-status.ts +660 -0
- package/src/core/find-constructs.ts +319 -0
- package/src/core/find-payload.ts +915 -0
- package/src/core/generate-markdown.ts +120 -0
- package/src/core/path-context.ts +196 -0
- package/src/core/pi-notify.ts +430 -0
- package/src/core/pi-usereq-tools.ts +140 -0
- package/src/core/prompts.ts +184 -0
- package/src/core/reference-payload.ts +818 -0
- package/src/core/resources.ts +63 -0
- package/src/core/runtime-project-paths.ts +99 -0
- package/src/core/settings-menu.ts +233 -0
- package/src/core/source-analyzer.ts +1721 -0
- package/src/core/static-check.ts +674 -0
- package/src/core/token-counter.ts +729 -0
- package/src/core/tool-runner.ts +717 -0
- package/src/core/utils.ts +185 -0
- package/src/index.ts +2209 -0
- package/src/resources/guidelines/Google_C++_Style_Guide.md +3711 -0
- package/src/resources/guidelines/Google_Python_Style_Guide.md +3709 -0
- package/src/resources/prompts/analyze.md +130 -0
- package/src/resources/prompts/change.md +227 -0
- package/src/resources/prompts/check.md +139 -0
- package/src/resources/prompts/cover.md +219 -0
- package/src/resources/prompts/create.md +104 -0
- package/src/resources/prompts/fix.md +221 -0
- package/src/resources/prompts/flowchart.md +220 -0
- package/src/resources/prompts/implement.md +163 -0
- package/src/resources/prompts/new.md +226 -0
- package/src/resources/prompts/readme.md +182 -0
- package/src/resources/prompts/recreate.md +213 -0
- package/src/resources/prompts/refactor.md +213 -0
- package/src/resources/prompts/references.md +100 -0
- package/src/resources/prompts/renumber.md +119 -0
- package/src/resources/prompts/workflow.md +202 -0
- package/src/resources/prompts/write.md +99 -0
- package/src/resources/sounds/Machine-alert-beep-sound-effect.mp3 +0 -0
- package/src/resources/sounds/Soft-high-tech-notification-sound-effect.mp3 +0 -0
- package/src/resources/templates/Document_Source_Code_in_Doxygen_Style.md +130 -0
- package/src/resources/templates/HDT_Test_Authoring_Guide.md +318 -0
- package/src/resources/templates/Requirements_Template.md +78 -0
- package/tests/attended-results-scenarios.ts +758 -0
- package/tests/attended-results.test.ts +39 -0
- package/tests/cli-command-option-parity.test.ts +815 -0
- package/tests/debug-extension-harness.test.ts +463 -0
- package/tests/extension-registration.test.ts +2006 -0
- package/tests/fixtures/fixture_c.c +361 -0
- package/tests/fixtures/fixture_cpp.cpp +407 -0
- package/tests/fixtures/fixture_csharp.cs +411 -0
- package/tests/fixtures/fixture_elixir.ex +409 -0
- package/tests/fixtures/fixture_go.go +341 -0
- package/tests/fixtures/fixture_haskell.hs +250 -0
- package/tests/fixtures/fixture_java.java +430 -0
- package/tests/fixtures/fixture_javascript.js +383 -0
- package/tests/fixtures/fixture_kotlin.kt +451 -0
- package/tests/fixtures/fixture_lua.lua +276 -0
- package/tests/fixtures/fixture_perl.pl +310 -0
- package/tests/fixtures/fixture_php.php +433 -0
- package/tests/fixtures/fixture_python.py +502 -0
- package/tests/fixtures/fixture_ruby.rb +345 -0
- package/tests/fixtures/fixture_rust.rs +380 -0
- package/tests/fixtures/fixture_scala.scala +398 -0
- package/tests/fixtures/fixture_shell.sh +276 -0
- package/tests/fixtures/fixture_swift.swift +397 -0
- package/tests/fixtures/fixture_typescript.ts +434 -0
- package/tests/fixtures/fixture_zig.zig +295 -0
- package/tests/fixtures_attended_results/project/compress-line-numbers.json +5 -0
- package/tests/fixtures_attended_results/project/compress.json +5 -0
- package/tests/fixtures_attended_results/project/enable-static-check-invalid-command.json +5 -0
- package/tests/fixtures_attended_results/project/enable-static-check-valid.json +5 -0
- package/tests/fixtures_attended_results/project/files-static-check.json +5 -0
- package/tests/fixtures_attended_results/project/find-line-numbers.json +5 -0
- package/tests/fixtures_attended_results/project/find.json +5 -0
- package/tests/fixtures_attended_results/project/get-base-path.json +5 -0
- package/tests/fixtures_attended_results/project/git-check-clean.json +5 -0
- package/tests/fixtures_attended_results/project/git-check-dirty.json +5 -0
- package/tests/fixtures_attended_results/project/git-path.json +5 -0
- package/tests/fixtures_attended_results/project/git-wt-create-invalid.json +5 -0
- package/tests/fixtures_attended_results/project/git-wt-create-valid.json +5 -0
- package/tests/fixtures_attended_results/project/git-wt-delete-nonexistent.json +5 -0
- package/tests/fixtures_attended_results/project/git-wt-delete-valid.json +5 -0
- package/tests/fixtures_attended_results/project/git-wt-name.json +5 -0
- package/tests/fixtures_attended_results/project/references.json +5 -0
- package/tests/fixtures_attended_results/project/static-check.json +5 -0
- package/tests/fixtures_attended_results/project/tokens.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_c.c.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_cpp.cpp.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_csharp.cs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_elixir.ex.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_go.go.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_haskell.hs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_java.java.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_javascript.js.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_kotlin.kt.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_lua.lua.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_perl.pl.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_php.php.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_python.py.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_ruby.rb.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_rust.rs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_scala.scala.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_shell.sh.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_swift.swift.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_typescript.ts.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_zig.zig.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_c.c.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_cpp.cpp.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_csharp.cs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_elixir.ex.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_go.go.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_haskell.hs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_java.java.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_javascript.js.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_kotlin.kt.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_lua.lua.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_perl.pl.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_php.php.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_python.py.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_ruby.rb.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_rust.rs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_scala.scala.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_shell.sh.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_swift.swift.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_typescript.ts.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_zig.zig.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_c.c.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_cpp.cpp.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_csharp.cs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_elixir.ex.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_go.go.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_haskell.hs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_java.java.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_javascript.js.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_kotlin.kt.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_lua.lua.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_perl.pl.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_php.php.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_python.py.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_ruby.rb.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_rust.rs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_scala.scala.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_shell.sh.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_swift.swift.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_typescript.ts.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_zig.zig.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_c.c.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_cpp.cpp.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_csharp.cs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_elixir.ex.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_go.go.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_haskell.hs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_java.java.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_javascript.js.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_kotlin.kt.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_lua.lua.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_perl.pl.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_php.php.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_python.py.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_ruby.rb.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_rust.rs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_scala.scala.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_shell.sh.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_swift.swift.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_typescript.ts.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_zig.zig.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_c.c.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_cpp.cpp.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_csharp.cs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_elixir.ex.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_go.go.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_haskell.hs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_java.java.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_javascript.js.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_kotlin.kt.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_lua.lua.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_perl.pl.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_php.php.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_python.py.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_ruby.rb.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_rust.rs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_scala.scala.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_shell.sh.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_swift.swift.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_typescript.ts.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_zig.zig.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_c.c.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_cpp.cpp.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_csharp.cs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_elixir.ex.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_go.go.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_haskell.hs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_java.java.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_javascript.js.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_kotlin.kt.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_lua.lua.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_perl.pl.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_php.php.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_python.py.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_ruby.rb.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_rust.rs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_scala.scala.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_shell.sh.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_swift.swift.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_typescript.ts.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_zig.zig.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_c.c.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_cpp.cpp.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_csharp.cs.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_elixir.ex.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_go.go.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_haskell.hs.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_java.java.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_javascript.js.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_kotlin.kt.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_lua.lua.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_perl.pl.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_php.php.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_python.py.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_ruby.rb.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_rust.rs.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_scala.scala.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_shell.sh.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_swift.swift.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_typescript.ts.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_zig.zig.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_c.c.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_cpp.cpp.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_csharp.cs.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_elixir.ex.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_go.go.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_haskell.hs.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_java.java.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_javascript.js.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_kotlin.kt.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_lua.lua.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_perl.pl.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_php.php.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_python.py.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_ruby.rb.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_rust.rs.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_scala.scala.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_shell.sh.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_swift.swift.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_typescript.ts.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_zig.zig.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_c.c.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_cpp.cpp.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_csharp.cs.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_elixir.ex.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_go.go.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_haskell.hs.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_java.java.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_javascript.js.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_kotlin.kt.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_lua.lua.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_perl.pl.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_php.php.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_python.py.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_ruby.rb.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_rust.rs.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_scala.scala.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_shell.sh.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_swift.swift.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_typescript.ts.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_zig.zig.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_c.c.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_cpp.cpp.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_csharp.cs.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_elixir.ex.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_go.go.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_haskell.hs.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_java.java.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_javascript.js.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_kotlin.kt.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_lua.lua.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_perl.pl.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_php.php.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_python.py.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_ruby.rb.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_rust.rs.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_scala.scala.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_shell.sh.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_swift.swift.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_typescript.ts.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_zig.zig.json +5 -0
- package/tests/helpers.ts +204 -0
- package/tests/oracle-project.test.ts +63 -0
- package/tests/oracle-standalone.test.ts +48 -0
- package/tests/prompt-rendering.test.ts +66 -0
- package/tests/release-workflow.test.ts +133 -0
|
@@ -0,0 +1,434 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file fixture_typescript.ts
|
|
3
|
+
* @brief Comprehensive TypeScript test fixture for parser validation.
|
|
4
|
+
* @details Covers conditional types, mapped types, template literal types,
|
|
5
|
+
* satisfies operator, overload signatures, discriminated unions,
|
|
6
|
+
* module augmentation, decorators, generic constraints, and utility types.
|
|
7
|
+
*/
|
|
8
|
+
// Single line comment
|
|
9
|
+
/* Multi-line comment */
|
|
10
|
+
import { Component } from 'react';
|
|
11
|
+
import type { ReactNode } from 'react';
|
|
12
|
+
|
|
13
|
+
/* ── Interfaces ───────────────────────────────────────────────────────── */
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @interface User
|
|
17
|
+
* @brief Core user entity with identity fields.
|
|
18
|
+
*/
|
|
19
|
+
interface User {
|
|
20
|
+
/** @brief Display name of the user. */
|
|
21
|
+
name: string;
|
|
22
|
+
/** @brief Age in years; must be non-negative. */
|
|
23
|
+
age: number;
|
|
24
|
+
/** @brief Optional email address. */
|
|
25
|
+
email?: string;
|
|
26
|
+
/** @brief Read-only unique identifier. */
|
|
27
|
+
readonly id: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @interface Repository
|
|
32
|
+
* @brief Generic CRUD repository with type parameter.
|
|
33
|
+
* @tparam T Entity type managed by this repository.
|
|
34
|
+
*/
|
|
35
|
+
interface Repository<T> {
|
|
36
|
+
/** @brief Find an entity by its ID. */
|
|
37
|
+
findById(id: string): Promise<T | null>;
|
|
38
|
+
/** @brief Persist an entity, returning the saved version. */
|
|
39
|
+
save(entity: T): Promise<T>;
|
|
40
|
+
/** @brief Delete an entity by ID. */
|
|
41
|
+
delete(id: string): Promise<boolean>;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* @interface Serializable
|
|
46
|
+
* @brief Marks objects that can be serialized to JSON.
|
|
47
|
+
*/
|
|
48
|
+
interface Serializable {
|
|
49
|
+
/** @brief Convert to a JSON-compatible string. */
|
|
50
|
+
toJSON(): string;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* ── Type aliases and utility types ───────────────────────────────────── */
|
|
54
|
+
|
|
55
|
+
/** @brief Union type for values that can be string or number. */
|
|
56
|
+
type StringOrNumber = string | number;
|
|
57
|
+
|
|
58
|
+
/** @brief Mapped type making all properties of T optional and readonly. */
|
|
59
|
+
type DeepReadonly<T> = {
|
|
60
|
+
readonly [P in keyof T]: T[P] extends object ? DeepReadonly<T[P]> : T[P];
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/** @brief Conditional type extracting array element type. */
|
|
64
|
+
type Unwrap<T> = T extends Array<infer U> ? U : T;
|
|
65
|
+
|
|
66
|
+
/** @brief Template literal type for CSS pixel values. */
|
|
67
|
+
type PixelValue = `${number}px`;
|
|
68
|
+
|
|
69
|
+
/** @brief Discriminated union tag for API responses. */
|
|
70
|
+
type ApiResponse<T> =
|
|
71
|
+
| { status: 'success'; data: T }
|
|
72
|
+
| { status: 'error'; message: string }
|
|
73
|
+
| { status: 'loading' };
|
|
74
|
+
|
|
75
|
+
/** @brief Extract keys of T whose values extend a given type. */
|
|
76
|
+
type KeysOfType<T, V> = {
|
|
77
|
+
[K in keyof T]: T[K] extends V ? K : never;
|
|
78
|
+
}[keyof T];
|
|
79
|
+
|
|
80
|
+
/* ── Enums ────────────────────────────────────────────────────────────── */
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* @enum Direction
|
|
84
|
+
* @brief Const enum for cardinal directions (inlined at compile time).
|
|
85
|
+
*/
|
|
86
|
+
const enum Direction {
|
|
87
|
+
Up = 'UP',
|
|
88
|
+
Down = 'DOWN',
|
|
89
|
+
Left = 'LEFT',
|
|
90
|
+
Right = 'RIGHT',
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* @enum Color
|
|
95
|
+
* @brief Regular enum with numeric values for color channels.
|
|
96
|
+
*/
|
|
97
|
+
enum Color {
|
|
98
|
+
/** @brief Red channel identifier. */
|
|
99
|
+
Red,
|
|
100
|
+
/** @brief Blue channel identifier. */
|
|
101
|
+
Blue,
|
|
102
|
+
/** @brief Green channel, explicitly set to 10. */
|
|
103
|
+
Green = 10,
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* @enum HttpStatus
|
|
108
|
+
* @brief String enum mapping HTTP status codes.
|
|
109
|
+
*/
|
|
110
|
+
enum HttpStatus {
|
|
111
|
+
OK = '200',
|
|
112
|
+
NotFound = '404',
|
|
113
|
+
ServerError = '500',
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/* ── Abstract class ───────────────────────────────────────────────────── */
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* @class Base
|
|
120
|
+
* @brief Abstract base class with template method pattern.
|
|
121
|
+
*/
|
|
122
|
+
export abstract class Base {
|
|
123
|
+
/**
|
|
124
|
+
* @brief Abstract render method to be implemented by subclasses.
|
|
125
|
+
* @return void
|
|
126
|
+
*/
|
|
127
|
+
abstract render(): void;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* @brief Template method calling render with pre/post hooks.
|
|
131
|
+
*/
|
|
132
|
+
execute(): void {
|
|
133
|
+
/* Pre-render hook */
|
|
134
|
+
console.log('before render');
|
|
135
|
+
this.render();
|
|
136
|
+
/* Post-render hook */
|
|
137
|
+
console.log('after render');
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/* ── Concrete class with generics ─────────────────────────────────────── */
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* @class Derived
|
|
145
|
+
* @extends Base
|
|
146
|
+
* @brief Concrete implementation with typed value storage.
|
|
147
|
+
*/
|
|
148
|
+
class Derived extends Base {
|
|
149
|
+
/** @brief Stored numeric value. */
|
|
150
|
+
value: number = 0;
|
|
151
|
+
|
|
152
|
+
/** @brief Optional label for display. */
|
|
153
|
+
label?: string;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* @brief Render the value to console output.
|
|
157
|
+
*/
|
|
158
|
+
render(): void {
|
|
159
|
+
console.log(this.value);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* @class TypedContainer
|
|
165
|
+
* @brief Generic container with constraint on Serializable.
|
|
166
|
+
* @tparam T Must implement Serializable interface.
|
|
167
|
+
*/
|
|
168
|
+
class TypedContainer<T extends Serializable> {
|
|
169
|
+
/** @brief Internal array storage for items. */
|
|
170
|
+
private items: T[] = [];
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* @brief Add an item to the container.
|
|
174
|
+
* @param item Item conforming to Serializable.
|
|
175
|
+
*/
|
|
176
|
+
add(item: T): void {
|
|
177
|
+
this.items.push(item);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* @brief Serialize all items to a JSON array string.
|
|
182
|
+
* @return JSON string of all serialized items.
|
|
183
|
+
*/
|
|
184
|
+
toJSON(): string {
|
|
185
|
+
return `[${this.items.map(i => i.toJSON()).join(',')}]`;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* @brief Find first item matching a predicate.
|
|
190
|
+
* @param predicate Test function applied to each item.
|
|
191
|
+
* @return The first matching item or undefined.
|
|
192
|
+
*/
|
|
193
|
+
find(predicate: (item: T) => boolean): T | undefined {
|
|
194
|
+
for (const item of this.items) {
|
|
195
|
+
if (predicate(item)) {
|
|
196
|
+
return item;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
return undefined;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/* ── Class implementing multiple interfaces ───────────────────────────── */
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* @class UserEntity
|
|
207
|
+
* @implements User, Serializable
|
|
208
|
+
* @brief Full user entity implementing both User and Serializable.
|
|
209
|
+
*/
|
|
210
|
+
class UserEntity implements User, Serializable {
|
|
211
|
+
readonly id: string;
|
|
212
|
+
name: string;
|
|
213
|
+
age: number;
|
|
214
|
+
|
|
215
|
+
constructor(id: string, name: string, age: number) {
|
|
216
|
+
this.id = id;
|
|
217
|
+
this.name = name;
|
|
218
|
+
this.age = age;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* @brief Serialize user to JSON string.
|
|
223
|
+
* @return JSON representation of the user.
|
|
224
|
+
*/
|
|
225
|
+
toJSON(): string {
|
|
226
|
+
return JSON.stringify({ id: this.id, name: this.name, age: this.age });
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/* ── Functions ────────────────────────────────────────────────────────── */
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* @function greet
|
|
234
|
+
* @brief Greet a person by name with type-safe parameter.
|
|
235
|
+
* @param name The person's name to display.
|
|
236
|
+
*/
|
|
237
|
+
export function greet(name: string): void {
|
|
238
|
+
console.log(`Hello, ${name}`);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/* ── Function overloads ───────────────────────────────────────────────── */
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* @function parse
|
|
245
|
+
* @brief Parse input with overloaded signatures for type safety.
|
|
246
|
+
* @overload Parse a string input into a number.
|
|
247
|
+
* @overload Parse a number input into a string.
|
|
248
|
+
*/
|
|
249
|
+
function parse(input: string): number;
|
|
250
|
+
function parse(input: number): string;
|
|
251
|
+
function parse(input: string | number): string | number {
|
|
252
|
+
if (typeof input === 'string') {
|
|
253
|
+
return parseInt(input, 10);
|
|
254
|
+
}
|
|
255
|
+
return input.toString();
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
/* ── Arrow function with type annotation ──────────────────────────────── */
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* @function add
|
|
262
|
+
* @brief Add one to a number (arrow function syntax).
|
|
263
|
+
* @param a The input number.
|
|
264
|
+
* @return The incremented value.
|
|
265
|
+
*/
|
|
266
|
+
const add = (a: number): number => a + 1;
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* @function transform
|
|
270
|
+
* @brief Generic transform function with constraint.
|
|
271
|
+
* @tparam T Must have a toString method.
|
|
272
|
+
* @param value Input value to transform.
|
|
273
|
+
* @return String representation of the value.
|
|
274
|
+
*/
|
|
275
|
+
const transform = <T extends { toString(): string }>(value: T): string => {
|
|
276
|
+
return value.toString();
|
|
277
|
+
};
|
|
278
|
+
|
|
279
|
+
/* ── Async function with generic return ───────────────────────────────── */
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* @function fetchEntity
|
|
283
|
+
* @brief Fetch and deserialize a typed entity from an API.
|
|
284
|
+
* @tparam T The expected response entity type.
|
|
285
|
+
* @param url Endpoint URL.
|
|
286
|
+
* @return Promise resolving to the typed entity.
|
|
287
|
+
*/
|
|
288
|
+
async function fetchEntity<T>(url: string): Promise<T> {
|
|
289
|
+
const response = await fetch(url);
|
|
290
|
+
/* Parse JSON and cast to expected type */
|
|
291
|
+
return response.json() as Promise<T>;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
/* ── Namespace ────────────────────────────────────────────────────────── */
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* @namespace MyNS
|
|
298
|
+
* @brief Namespace grouping related constants and helpers.
|
|
299
|
+
*/
|
|
300
|
+
export namespace MyNS {
|
|
301
|
+
/** @brief Exported constant within namespace. */
|
|
302
|
+
export const x = 1;
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* @brief Helper function scoped to namespace.
|
|
306
|
+
* @param val Numeric input to double.
|
|
307
|
+
* @return The doubled value.
|
|
308
|
+
*/
|
|
309
|
+
export function double(val: number): number {
|
|
310
|
+
return val * 2;
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
/* ── Module declaration ───────────────────────────────────────────────── */
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* @module MyMod
|
|
318
|
+
* @brief Ambient module declaration for external library typings.
|
|
319
|
+
*/
|
|
320
|
+
declare module MyMod {
|
|
321
|
+
/** @brief Version string exposed by the external module. */
|
|
322
|
+
export const version: string;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
/* ── Decorator ────────────────────────────────────────────────────────── */
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* @class Decorated
|
|
329
|
+
* @brief Class using a decorator annotation.
|
|
330
|
+
*/
|
|
331
|
+
@Component
|
|
332
|
+
class Decorated {
|
|
333
|
+
/** @brief Template string for rendering. */
|
|
334
|
+
template: string = '<div></div>';
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
/* ── Type guards and narrowing ────────────────────────────────────────── */
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* @function isUser
|
|
341
|
+
* @brief Type guard narrowing unknown to User interface.
|
|
342
|
+
* @param value Unknown input to validate.
|
|
343
|
+
* @return True if value conforms to User shape.
|
|
344
|
+
*/
|
|
345
|
+
function isUser(value: unknown): value is User {
|
|
346
|
+
if (typeof value !== 'object' || value === null) {
|
|
347
|
+
return false;
|
|
348
|
+
}
|
|
349
|
+
const obj = value as Record<string, unknown>;
|
|
350
|
+
return typeof obj.name === 'string' && typeof obj.age === 'number';
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
/* ── Satisfies operator (TS 4.9) ──────────────────────────────────────── */
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* @brief Configuration validated with satisfies for type checking
|
|
357
|
+
* without widening the inferred type.
|
|
358
|
+
*/
|
|
359
|
+
const config = {
|
|
360
|
+
width: '100px' as PixelValue,
|
|
361
|
+
height: '200px' as PixelValue,
|
|
362
|
+
} satisfies Record<string, PixelValue>;
|
|
363
|
+
|
|
364
|
+
/* ── Mapped type function ─────────────────────────────────────────────── */
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* @function makeOptional
|
|
368
|
+
* @brief Convert all properties of an object to optional at runtime.
|
|
369
|
+
* @tparam T Source object type.
|
|
370
|
+
* @param obj The source object.
|
|
371
|
+
* @return A partial copy of the object.
|
|
372
|
+
*/
|
|
373
|
+
function makeOptional<T extends object>(obj: T): Partial<T> {
|
|
374
|
+
return { ...obj };
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
/* coverage extension block */
|
|
378
|
+
import { Injectable } from 'inversify';
|
|
379
|
+
import { Observable } from 'rxjs';
|
|
380
|
+
import { FC } from 'react';
|
|
381
|
+
@injectable
|
|
382
|
+
@sealed
|
|
383
|
+
@track
|
|
384
|
+
@memoized
|
|
385
|
+
interface CacheEntry { key: string; value: string }
|
|
386
|
+
export interface Runner { run(): Promise<void> }
|
|
387
|
+
enum ModeTs { Fast, Safe }
|
|
388
|
+
enum StatusTs { Ready, Busy }
|
|
389
|
+
namespace ExtNSOne { export const v = 1; }
|
|
390
|
+
namespace ExtNSTwo { export const v = 2; }
|
|
391
|
+
namespace ExtNSThree { export const v = 3; }
|
|
392
|
+
namespace ExtNSFour { export const v = 4; }
|
|
393
|
+
declare module ExtOne { export const one: number; }
|
|
394
|
+
module ExtTwo { export const two = 2; }
|
|
395
|
+
module ExtThree { export const three = 3; }
|
|
396
|
+
module ExtFour { export const four = 4; }
|
|
397
|
+
|
|
398
|
+
// REQ-COVER-SRS-231 START
|
|
399
|
+
// @REQ-COVER-SRS-231 block 1
|
|
400
|
+
// @brief Coverage helper construct 1.
|
|
401
|
+
// @details Provides deterministic fixture-level Doxygen coverage block 1.
|
|
402
|
+
// @param value Input value for helper construct 1.
|
|
403
|
+
// @return Output value for helper construct 1.
|
|
404
|
+
function reqCoverTs1(value: number): number { return value + 1; }
|
|
405
|
+
|
|
406
|
+
// @REQ-COVER-SRS-231 block 2
|
|
407
|
+
// @brief Coverage helper construct 2.
|
|
408
|
+
// @details Provides deterministic fixture-level Doxygen coverage block 2.
|
|
409
|
+
// @param value Input value for helper construct 2.
|
|
410
|
+
// @return Output value for helper construct 2.
|
|
411
|
+
function reqCoverTs2(value: number): number { return value + 2; }
|
|
412
|
+
|
|
413
|
+
// @REQ-COVER-SRS-231 block 3
|
|
414
|
+
// @brief Coverage helper construct 3.
|
|
415
|
+
// @details Provides deterministic fixture-level Doxygen coverage block 3.
|
|
416
|
+
// @param value Input value for helper construct 3.
|
|
417
|
+
// @return Output value for helper construct 3.
|
|
418
|
+
function reqCoverTs3(value: number): number { return value + 3; }
|
|
419
|
+
|
|
420
|
+
// @REQ-COVER-SRS-231 block 4
|
|
421
|
+
// @brief Coverage helper construct 4.
|
|
422
|
+
// @details Provides deterministic fixture-level Doxygen coverage block 4.
|
|
423
|
+
// @param value Input value for helper construct 4.
|
|
424
|
+
// @return Output value for helper construct 4.
|
|
425
|
+
function reqCoverTs4(value: number): number { return value + 4; }
|
|
426
|
+
|
|
427
|
+
// @REQ-COVER-SRS-231 block 5
|
|
428
|
+
// @brief Coverage helper construct 5.
|
|
429
|
+
// @details Provides deterministic fixture-level Doxygen coverage block 5.
|
|
430
|
+
// @param value Input value for helper construct 5.
|
|
431
|
+
// @return Output value for helper construct 5.
|
|
432
|
+
function reqCoverTs5(value: number): number { return value + 5; }
|
|
433
|
+
|
|
434
|
+
// REQ-COVER-SRS-231 END
|