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
/
Declaration files
What does declare function loadConfig(): Config do in a declaration file?
from Declaration files
TypeScript 6
beginner
1 min
What does declare function loadConfig(): Config do in a declaration file?
It tells the checker that runtime code elsewhere supplies the function.
It emits a JavaScript function that returns Config.
It validates the returned object against Config at runtime.
It imports loadConfig from the nearest package.
Check
Ask AI about this kata
Report an error
next kata
A package exports both "." and "./reports". What must its declarations cover?
Quiz
A new version is available
Reload