0.2.4 #38

Merged
Thilawyn merged 44 commits from next into master 2026-03-16 00:30:17 +01:00
Showing only changes of commit 8b69d4e500 - Show all commits

View File

@@ -4,11 +4,11 @@ import * as React from "react"
import type * as Component from "./Component.js"
export const TypeId: unique symbol = Symbol.for("@effect-fc/Memoized/Memoized")
export type TypeId = typeof TypeId
export const MemoizedTypeId: unique symbol = Symbol.for("@effect-fc/Memoized/Memoized")
export type MemoizedTypeId = typeof MemoizedTypeId
export interface Memoized<P> extends MemoizedOptions<P> {
readonly [TypeId]: TypeId
readonly [MemoizedTypeId]: MemoizedTypeId
}
export interface MemoizedOptions<P> {
@@ -17,7 +17,7 @@ export interface MemoizedOptions<P> {
export const MemoizedPrototype = Object.freeze({
[TypeId]: TypeId,
[MemoizedTypeId]: MemoizedTypeId,
transformFunctionComponent<P extends {}>(
this: Memoized<P>,
@@ -28,7 +28,7 @@ export const MemoizedPrototype = Object.freeze({
} as const)
export const isMemoized = (u: unknown): u is Memoized<unknown> => Predicate.hasProperty(u, TypeId)
export const isMemoized = (u: unknown): u is Memoized<unknown> => Predicate.hasProperty(u, MemoizedTypeId)
export const memoized = <T extends Component.Component<any, any, any, any>>(
self: T