Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
TypeScript
/
Strict mode
With strictFunctionTypes, which assignment is safe for function-property callbacks?
from Strict mode
TypeScript 6
intermediate
1 min
With strictFunctionTypes, which assignment is safe for function-property callbacks?
Assign (dog: Dog) => void where (animal: Animal) => void is required.
Assign (animal: Animal) => void where (dog: Dog) => void is required.
Both directions are always safe because Dog extends Animal.
Neither direction is allowed under strict mode.
Check
Ask AI about this kata
Report an error
next kata
What does this strict TypeScript program print?
Predict the output
A new version is available
Reload