@yandex/ymaps3-types
Advanced tools
Comparing version 0.0.13 to 0.0.14
{ | ||
"name": "@yandex/ymaps3-types", | ||
"version": "0.0.13", | ||
"version": "0.0.14", | ||
"description": "Types for ymaps3 maps library", | ||
@@ -5,0 +5,0 @@ "main": "", |
import type TReact from "react"; | ||
import type { LngLat, YMapEntity } from "../../../.."; | ||
import type { CustomReactify } from "../../../../reactify/reactify"; | ||
import type { CustomReactify, OverrideProps } from "../../../../reactify/reactify"; | ||
import type { Feature } from "../interface"; | ||
@@ -36,3 +36,3 @@ import type { YMapClusterer as YMapClustererI, YMapClustererProps } from "../YMapClusterer"; | ||
*/ | ||
type YMapClustererReactifiedProps = YMapClustererProps & { | ||
type YMapClustererReactifiedProps = OverrideProps<YMapClustererProps, { | ||
/** Function that returns YMapMarker react component to render marker*/ | ||
@@ -42,5 +42,5 @@ marker: (feature: Feature) => TReact.ReactElement; | ||
cluster: (coordinates: LngLat, features: Feature[]) => TReact.ReactElement; | ||
}; | ||
}>; | ||
type YMapClustererR = TReact.ForwardRefExoticComponent<YMapClustererReactifiedProps & React.RefAttributes<YMapEntity<YMapClustererReactifiedProps>>>; | ||
export declare const YMapClustererReactifyOverride: CustomReactify<YMapClustererI, YMapClustererR>; | ||
export {}; |
@@ -29,11 +29,11 @@ import type TReact from "react"; | ||
}) => TResult; | ||
export type Overrided<TReactResult> = { | ||
[overrideKeyReactify]: CustomReactify<GenericEntity<unknown>, TReactResult>; | ||
export type Overrided<TCtor extends EntityConstructor<GenericEntity<unknown>>, TReactResult> = { | ||
[overrideKeyReactify]: CustomReactify<InstanceType<TCtor>, TReactResult>; | ||
}; | ||
type InternalReactify<TEntity extends GenericEntity<unknown>> = (ctor: EntityConstructor<TEntity>, displayName?: string) => TReact.ForwardRefExoticComponent<TReact.PropsWithoutRef<TReact.PropsWithChildren<EntityProps<TEntity>>> & React.RefAttributes<TEntity | undefined>>; | ||
type InternalReactifyEntity<TCtor extends EntityConstructor<GenericEntity<unknown>>> = (ctor: TCtor, displayName?: string) => TCtor extends Overrided<infer TResult> ? TResult : ReturnType<InternalReactify<InstanceType<TCtor>>>; | ||
type InternalReactifyEntity<TCtor extends EntityConstructor<GenericEntity<unknown>>> = (ctor: TCtor, displayName?: string) => TCtor extends Overrided<TCtor, infer TResult> ? TResult : ReturnType<InternalReactify<InstanceType<TCtor>>>; | ||
export type ReactifyEntity = <TCtor extends EntityConstructor<GenericEntity<unknown>>>(...args: Parameters<InternalReactifyEntity<TCtor>>) => ReturnType<InternalReactifyEntity<TCtor>>; | ||
export type ReactifiedEntity<TCtor extends EntityConstructor<GenericEntity<unknown>>> = ReturnType<InternalReactifyEntity<TCtor>>; | ||
export interface ReactifyModule<TModule extends BaseModule = BaseModule> { | ||
(module: TModule): ReactifiedModule<TModule>; | ||
export interface ReactifyModule { | ||
<TModule extends BaseModule = BaseModule>(module: TModule): ReactifiedModule<TModule>; | ||
} | ||
@@ -45,3 +45,4 @@ export type GetReactContext<TContext extends Context<unknown>> = (context?: TContext | undefined) => React.Context<unknown>; | ||
export type BaseModule = Record<string | symbol, unknown>; | ||
export type OverrideProps<T, U> = Pick<T, Exclude<keyof T, keyof U>> & U; | ||
export default function createReactify(React: typeof TReact, ReactDOM: typeof TReactDOM): Reactify; | ||
export {}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
112972
3058