From a70ef27f75385efa9efc60233974bb1f6cd06c07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Valverd=C3=A9?= Date: Fri, 25 Apr 2025 07:56:56 +0200 Subject: [PATCH] PropertyPath done --- packages/reffuse/src/types/PropertyPath.ts | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/packages/reffuse/src/types/PropertyPath.ts b/packages/reffuse/src/types/PropertyPath.ts index 6e76188..8c1655d 100644 --- a/packages/reffuse/src/types/PropertyPath.ts +++ b/packages/reffuse/src/types/PropertyPath.ts @@ -1,4 +1,4 @@ -import { Array, Option, Predicate, Schema } from "effect" +import { Array, Option, Predicate } from "effect" export type Paths = [] | ( @@ -57,7 +57,6 @@ export const get = >( Option.some(parent), ) - export const immutableSet = >( parent: T, path: P, @@ -92,19 +91,3 @@ export const immutableSet = >( return Option.none() } - - -class Person extends Schema.Class("Person")({ - name: Schema.String, -}) {} - -const persons = [ - Person.make({ name: "Monsieur Poulet" }), - Person.make({ name: "El Chanclador" }), - Person.make({ name: "AAAYAYAYAYAAY" }), -] - -const res = get(persons, [0, "name"]) -const persons2 = Option.getOrThrow(immutableSet(persons, [1, "name"], "El Risitas")) -console.log(persons2) -console.log(get(persons2, [1, "name"]))