effective-java-3rd-chinese/docs/_style/prism-master/tests/languages/flow/function-variable_feature.test
2019-03-14 13:10:17 +08:00

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.