mirror of
https://github.com/sjsdfg/effective-java-3rd-chinese.git
synced 2025-02-10 11:30:19 +08:00
20 lines
690 B
Plaintext
20 lines
690 B
Plaintext
foo = (a: number) : number => {}
|
|
bar = () : string => {}
|
|
|
|
----------------------------------------------------
|
|
|
|
[
|
|
["function-variable", "foo"], ["operator", "="],
|
|
["punctuation", "("], "a", ["punctuation", ":"],
|
|
["type", "number"], ["punctuation", ")"],
|
|
["punctuation", ":"], ["type", "number"],
|
|
["operator", "=>"], ["punctuation", "{"], ["punctuation", "}"],
|
|
["function-variable", "bar"], ["operator", "="],
|
|
["punctuation", "("], ["punctuation", ")"],
|
|
["punctuation", ":"], ["type", "string"],
|
|
["operator", "=>"], ["punctuation", "{"], ["punctuation", "}"]
|
|
]
|
|
|
|
----------------------------------------------------
|
|
|
|
Checks for function variables containing types. |