✨ Finalize and document the public API surface
Export the matcher builder types from the barrel and rename them off the internal Strict/Widening suffixes, so the type a factory returns is nameable: PrimitiveUnionMatcher/W, TaggedUnionMatcher/W, and the tagged-union factory types. Add TSDoc to every public symbol — the declarations carry it into the published package — and pin the exported names in src/index.test.ts. Document the API in README and record the surface decision (and the rejected matcher-shared export) in development/library.md.
This commit is contained in:
1 parent
acf9d06ddd
commit
f485b1bae2
8 files changed
+317
-20
No files matched your search
@@ -1,8 +1,26 @@
|
||||
/**
|
||||
* The public entry point of `tiny-pattern-ts`.
|
||||
*
|
||||
* Exports the four matcher factories and the builder types they return.
|
||||
* Everything else in `src/` is an implementation detail.
|
||||
*
|
||||
* @module
|
||||
*/
|
||||
export {
|
||||
getPrimitiveUnionMatcher,
|
||||
getPrimitiveUnionMatcherW,
|
||||
} from "./primitive-union.ts";
|
||||
export type {
|
||||
PrimitiveUnionMatcher,
|
||||
PrimitiveUnionMatcherW,
|
||||
} from "./primitive-union.ts";
|
||||
export {
|
||||
getTaggedUnionMatcher,
|
||||
getTaggedUnionMatcherW,
|
||||
} from "./tagged-union.ts";
|
||||
export type {
|
||||
TaggedUnionMatcher,
|
||||
TaggedUnionMatcherFactory,
|
||||
TaggedUnionMatcherW,
|
||||
TaggedUnionMatcherWFactory,
|
||||
} from "./tagged-union.ts";
|
||||
Reference in new issue
Block a user