Skip to content

Commit

Permalink
Merge pull request #146 from ahrjarrett/@ahrjarrett/v0.45.0
Browse files Browse the repository at this point in the history
@ahrjarrett/v0.45.0
  • Loading branch information
ahrjarrett authored Jun 1, 2024
2 parents 60caf29 + 5e1829b commit ff48a7b
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 70 deletions.
11 changes: 11 additions & 0 deletions .changeset/blue-impalas-run.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"any-ts": minor
---

fix: expose `any_*` constructors

Fixes:

```
Exported variable 'x' has or is using name 'any_dict' from external module "node_modules/any-ts/dist/index" but cannot be named.
```
21 changes: 20 additions & 1 deletion src/any/exports.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,21 @@
export type { any } from "./any.js"
export type {
any,
any_array,
any_arraylike,
any_dict,
any_entry,
any_enumerable,
any_field,
any_index,
any_invertible,
any_json,
any_key,
any_nonnullable,
any_nullable,
any_object,
any_scalar,
any_struct,
any_type,
instanceOf,
} from "./any.js"
export { ANY_TS_VERSION } from "./any.js"
23 changes: 22 additions & 1 deletion src/exports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ export {

export type { empty } from "./empty/exports.js"
export type { nonempty } from "./nonempty/exports.js"
export type { any } from "./any/exports.js"
export type { array, nonemptyArray, queue, tuple } from "./array/exports.js"
export type { some } from "./some.js"
export type { object } from "./object/exports.js"
Expand Down Expand Up @@ -76,3 +75,25 @@ export {
} from "./lens/focus.js"

export type { Widen } from "./widen/exports.js"

export type {
any,
ANY_TS_VERSION,
any_array,
any_arraylike,
any_dict,
any_entry,
any_enumerable,
any_field,
any_index,
any_invertible,
any_json,
any_key,
any_nonnullable,
any_nullable,
any_object,
any_scalar,
any_struct,
any_type,
instanceOf,
} from "./any/exports.js"
68 changes: 0 additions & 68 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,69 +1 @@
/**
*
* Glossary
*
* -----------
* _type-constructor_
* ---
* A {@link https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#type-aliases type alias}
* that accepts an argument.
*
* Note that in the TypeScript ecosystem this is sometimes
* called a "generic". The problem with "generic" is that
* the ecosystem _also_ often calls the type parameter itself
* a "generic", and _also_ calls a function that returns a
* type-constructor a "generic".
*
* The lack of precision introduces the opportunity for
* miscommunication, which wastes time and energy.
*
* See also:
* - {@link https://en.wikipedia.org/wiki/Type_constructor type-constructor}
*
*
* -----------
* _invariant_
* ---
* A _type-constructor_ that sets an additional constraint
* on the type being constructed. Usually this constraint
* comes in the form of an additional type parameter.
*
* Example:
* - {@link any.arrayof any.arrayof}
*
*
* -----------
* _nullary_
* ---
* A _type-constructor_ that accepts zero arguments.
*
* Note that a type-constructor that accepts an optional
* argument can be called _nullary_ **or** _unary_,
* although conventionally you would use "nullary" in
* that context to indicate which variant you're referring
* to.
*
* Example:
* - {@link Any.primitive any.primitive}
*
*
* -----------
* _unary_
* ---
* A _type-constructor_ that accepts (at least one) argument.
*
* Example:
* - {@link Any.primitive any.primitive}
* - {@link Any.arrayof any.arrayof}
*
*
* -----------
* _binary_
* ---
*
* A _type-constructor_ that accepts (at least two) arguments.
*
* Example:
* - {@link Any.arrayof any.arrayof}
*/
export * from "./exports.js"

0 comments on commit ff48a7b

Please sign in to comment.