You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No overload matches this call.
Overload 1 of 2, '(options: ReadWriteSelectorOptions<Element | undefined>): RecoilState<Element | undefined>', gave the following error.
Type '({ get }: { get: GetRecoilValue; getCallback: GetCallback; }) => Element | undefined' is not assignable to type '(opts: { get: GetRecoilValue; getCallback: GetCallback; }) => Element | Promise<Element | undefined> | RecoilValueReadOnly<Element | undefined> | ... 5 more ... | undefined'.
Type 'Element | undefined' is not assignable to type 'Element | Promise<Element | undefined> | RecoilValueReadOnly<Element | undefined> | RecoilState<Element | undefined> | ... 4 more ... | undefined'.
Type 'Element' is not assignable to type 'Element | Promise<Element | undefined> | RecoilValueReadOnly<Element | undefined> | RecoilState<Element | undefined> | ... 4 more ... | undefined'.
Property '[WrappedValue_OPAQUE]' is missing in type 'Element' but required in type 'WrappedValue<Element | undefined>'.
Overload 2 of 2, '(options: ReadOnlySelectorOptions<Element | undefined>): RecoilValueReadOnly<Element | undefined>', gave the following error.
Type '({ get }: { get: GetRecoilValue; getCallback: GetCallback; }) => Element | undefined' is not assignable to type '(opts: { get: GetRecoilValue; getCallback: GetCallback; }) => Element | Promise<Element | undefined> | RecoilValueReadOnly<Element | undefined> | ... 5 more ... | undefined'. TS2769
5 | export const selectedElementProperties = selector<Element | undefined>({
6 | key: 'selectedElementProperties',
> 7 | get: ({get}) => {
| ^
8 | const selectedElementId = get(selectedElementState)
9 | if (!selectedElementId) return undefined;
10 |
Also error on the set(elementState(selectedElementId), newElement as Element);
Tried some online suggested solutions but none helped.
The text was updated successfully, but these errors were encountered:
ohaddahan
changed the title
https://learnrecoil.com/video/atom-families-2
atom-families-2 - type errors
Jul 4, 2022
Seems like
recoil
changes some API.Error:
Also error on the
set(elementState(selectedElementId), newElement as Element);
Tried some online suggested solutions but none helped.
The text was updated successfully, but these errors were encountered: