Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/SincereCSL/Playgrounds
/ d
Function
d
TypeScript/StudyTypeScript/src/type_inference.ts:6–6 ·
view source on GitHub ↗
(x = 1)
Source
from the content-addressed store, hash-verified
4
let
b = [1, null];
// 通用类型推断
5
let
c = {x: 1, y:
'a'
}
6
let
d = (x = 1) => x + 1;
7
8
// 上下文类型推断
9
// window.onkeydown = (event) =>{
Callers
nothing calls this directly
Calls
no outgoing calls
Tested by
no test coverage detected