MCPcopy Create free account
hub / github.com/effect-app/libs / HashMap

Function HashMap

repos/effect/packages/effect/src/Schema.ts:9857–9911  ·  view source on GitHub ↗
(key: Key, value: Value)

Source from the content-addressed store, hash-verified

9855 * @category schemas
9856 * @since 4.0.0
9857 */
9858export const StandardSchemaV1FailureResult: Struct<{
9859 readonly issues: $Array<
9860 Struct<{
9861 readonly message: String
9862 readonly path: optional<
9863 $Array<
9864 Union<
9865 readonly [
9866 Union<readonly [Finite, Symbol, String]>,
9867 Struct<{
9868 readonly key: Union<readonly [Finite, Symbol, String]>
9869 }>
9870 ]
9871 >
9872 >
9873 >
9874 }>
9875 >
9876}> = Struct({
9877 issues: ArraySchema(Struct({
9878 message: String,
9879 path: optional(ArraySchema(Union([PropertyKey, Struct({ key: PropertyKey })])))
9880 }))
9881})
9882/**
9883 * Type-level representation of {@link BooleanFromBit}.
9884 *
9885 * @category models
9886 * @since 4.0.0
9887 */
9888export interface BooleanFromBit extends decodeTo<Boolean, Literals<readonly [0, 1]>> {
9889 readonly "Rebuild": BooleanFromBit
9890}
9891/**
9892 * Schema for a boolean parsed from 0 or 1.
9893 *
9894 * **When to use**
9895 *
9896 * Use when decoding data sources that represent booleans as `0 | 1` while
9897 * keeping boolean values in the decoded model.
9898 *
9899 * **Details**
9900 *
9901 * Decoding accepts only `0 | 1`, maps `1` to `true`, and maps `0` to `false`.
9902 * Encoding maps `true` to `1` and `false` to `0`.
9903 *
9904 * @see {@link Boolean} for validating values that are already booleans
9905 * @see {@link Literals} for keeping bit literals instead of decoding them
9906 *
9907 * @category schemas
9908 * @since 4.0.0
9909 */
9910export const BooleanFromBit: BooleanFromBit = Literals([0, 1]).pipe(
9911 decodeTo(
9912 Boolean,
9913 SchemaTransformation.transform({
9914 decode: (bit) => bit === 1,

Callers

nothing calls this directly

Calls 13

entriesArbitraryFunction · 0.85
keyFunction · 0.85
someMethod · 0.80
joinMethod · 0.80
declareConstructorFunction · 0.70
TupleFunction · 0.70
linkFunction · 0.70
valueFunction · 0.70
makeFunction · 0.70
transformMethod · 0.65
sizeMethod · 0.65
mapMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…