Abg smu bugil

Lotus 1 theme port to my sequencer

2024.05.01 19:18 Sychamis Lotus 1 theme port to my sequencer

The modplayer at home
Edit: Oops, I thought the music was composed by Barry Leitch, as he used it for another game (Top Gear on SNES), but the original is made by Shaun Southern. I fixed the credits, sorry for the mistake.
submitted by Sychamis to bytebeat [link] [comments]


2024.01.11 15:16 idmitriev Schema type inference in validator type predicate

I'm trying to do type inference and runtime validation for a simple JSON Schema subset, but get a Type instantiation is excessively deep and possibly infinite error. I have seen libraries (like zod) doing this for richer schema definitions. Is there some trick to do this?
type JsonObject = { [key: string]: JsonValue }; type JsonValue = string number boolean null Array JsonObject; type Schema = ScalarSchema<"string"> ScalarSchema<"number"> ScalarSchema<"boolean"> ScalarSchema<"null"> ArraySchema ObjectSchema UnionSchema; type ScalarType = "string" "number" "boolean" "null"; type ScalarSchema = { type: Type; }; type ArraySchema = { type: "array"; items: Schema; }; type ObjectSchema = { type: "object"; properties: { [key: string]: Schema }; }; type UnionSchema = { oneOf: Array; }; type Infer = SomeSchema extends ScalarSchema ? InferScalarType : SomeSchema extends ArraySchema ? InferArrayType : SomeSchema extends ObjectSchema ? InferObjectType : SomeSchema extends UnionSchema ? InferUnionType : never; type InferScalarType = SomeScalarType["type"] extends "string" ? string : SomeScalarType["type"] extends "number" ? number : SomeScalarType["type"] extends "boolean" ? boolean : SomeScalarType["type"] extends "null" ? null : never; type InferArrayType = Array< Infer >; type InferObjectType = { [key in keyof SomeObjectSchema["properties"]]: Infer< SomeObjectSchema["properties"][key] >; }; type InferUnionType = MapToInfered< SomeUnionSchema["oneOf"][number] >; type MapToInfered = UnionOfSchemas extends any ? Infer : never; function isOfSchema( schema: SomeSchema, json: JsonValue, ): json is Infer { if ("type" in schema) { switch (schema.type) { case "string": return typeof json === "string"; case "number": return typeof json === "number"; case "boolean": return typeof json === "boolean"; case "null": return json === null; case "array": return ( Array.isArray(json) && json.every((item) => isOfSchema(schema.items, item)) ); case "object": return ( typeof json === "object" && json !== null && !Array.isArray(json) && Object.keys(schema.properties).every((key) => isOfSchema(schema.properties[key], json[key]), ) ); } } else { return schema.oneOf.some((schema) => isOfSchema(schema, json)); } } 

submitted by idmitriev to typescript [link] [comments]


2023.06.14 03:27 twopiecejrbuffs The nuggets won the championship and jokic was the mvp!!!

The nuggets won the championship and jokic was the mvp!!! submitted by twopiecejrbuffs to u/twopiecejrbuffs [link] [comments]


2023.06.13 22:48 aBigSportsFan r/nbacirclejerk celebrating the thousands of subscribers it gained due to the r/nba blackout

nbacirclejerk celebrating the thousands of subscribers it gained due to the nba blackout submitted by aBigSportsFan to nbacirclejerk [link] [comments]


http://rodzice.org/