Aktywne Wpisy
1-1-1-1 +226
Dlaczego dla Julek to pytanie sprawia taki problem? Przecież to najlepszy filtr na prawaków/mizoginów. Mówisz, że miałaś 50 i chłopy same się odfiltrują xD Chyba nie boisz się, że niepoprawna odpowiedź zabije produkcję copium w głowie twojego amanta?
#blackpill #p0lka #redpill #bekazlewactwa
#blackpill #p0lka #redpill #bekazlewactwa
ivan777 +224
Zacząłem się bawić komponentami z syncfusion i przy podstawach strzela mnie szlag.
Dla zdarzenia change z komponentu TextBox jak dam any to działa wszystko, ale muszę rzutować w obsłudze tego zdarzenia. Natomiast jak zamiast any dam EmitType co jest w dokumentacji TextBox Syncfusion, to mam niżej przedstawiony błąd.
Ktoś jakiś trop? To zapewne jest bardzo proste, próbowałem zmieniać typy wynikowe etc. ale no nie pomaga.
Komentarz usunięty przez moderatora
Type '(event: EmitType) => void' is not assignable to type 'EmitType'.
Type '(event: EmitType) => void' is not assignable to type '(arg?: ChangedEventArgs | undefined, ...rest: any[]) => void'.
Types of parameters 'event' and 'arg' are incompatible.
Type 'ChangedEventArgs | undefined' is not assignable to type 'EmitType'.
Type 'undefined' is not assignable to type 'EmitType'.
Type 'undefined' is not assignable to type 'AngularEventEmitter'.
@LazyInitializationException:
The expected type comes from property 'change' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes & Readonly<{ children?: string | number | boolean | {} | ReactElement ReactElement Component<...>)> | null) | (new (props: any) => Component<...>)> | ... 4 more ... | undefined; }>...'
@LazyInitializationException:
Komentarz usunięty przez moderatora
change: (arg?: ChangedEventArgs) => void
albochange: EmitType
interface Props {
change: (event: ChangedEventArgs) => void;
}
mam
Type '(event: ChangedEventArgs) => void' is not assignable to type 'EmitType'.
Type '(event: ChangedEventArgs) => void' is not assignable to type '(arg?: ChangedEventArgs | undefined, ...rest: any[]) => void'.
Types of parameters 'event' and 'arg' are incompatible.
Type 'ChangedEventArgs | undefined' is not assignable to type 'ChangedEventArgs'.
Type 'undefined' is not assignable to type 'ChangedEventArgs'.
a dla dla
interface
Komentarz usunięty przez autora
change: (arg?: ChangedEventArgs) => void;
Załatwiło sprawę, dzięki. Już wiem jak czytać te błędy. ( ͡° ͜ʖ ͡°)
https://github.com/airbnb/javascript/tree/master/react
Nie korzystam z syncfusion, ale oznaczanie jako private metody w klasie reactowej, która nie jest potem instancjonowana ani żadna inna klasa po niej nie dziedziczy to dla mnie bezsens i wprowadzanie niepotrzebnego zamieszania do kodu.