Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/SincereCSL/Playgrounds
/ Log
Interface
Log
TypeScript/StudyTypeScript/src/generics_01.ts:27–29 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
25
26
// 指定一个默认的类型
27
interface
Log<T = string> {
28
(value: T): T
29
}
30
let
myLog: <T>(value: T) => T = log
31
myLog(
'a'
)
32
Callers
nothing calls this directly
Calls
no outgoing calls
Tested by
no test coverage detected