Convert pulpo-schema to TypeScript#15
Merged
Merged
Conversation
…hangeset - index.ts/types.ts type the SCHEMA factory as (schema: PulpoSchema) => (args: TransformArgs) => string - pulpo@1.4.2 ships a broken lib/index.d.ts (dangling triple-slash reference, resolves as 'not a module'); add a narrow ambient shim scoped to this package rather than importing pulpo's types - flip package.json to dist/ build output (tsconfig.build.json mirrors engines) - add markdown-magic-pulpo-schema consumer-typecheck snippet to tarball-gate.mjs, exercising the factory + returned transform against TransformArgs - changeset: minor bump for shipped type declarations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wave-A TypeScript conversion (engines pilot pattern) — FACTORY special case: default export typed
(schema: PulpoSchema) => (args: TransformArgs) => string; empty-schema return-content guard preserved. Includes this package's CONSUMER_SNIPPETS entry (structural schema stub exercises factory + transform signatures, compile-only).Package-specific: pulpo@1.4.2's shipped .d.ts has a dangling triple-slash reference that fails at the IMPORT site (TS2306) —
skipLibCheckcannot cover resolution failures, so a package-scopedpulpo-shim.d.tstypes just the constructor + document() surface used (reviewer verified by removing the shim and reproducing the error). PulpoSchema stays structural per plan.Logic byte-for-byte vs main (review-verified). Validation: typecheck + lint + prettier clean · workspace tests green · tarball gate incl. factory consumer-typecheck (OK line verified) · node example.ts exit 0 · docs idempotent · code-reviewed (APPROVE)