Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf8865a9

Browse files
committed
Parse function declarations
1 parent5474d0a commitf8865a9

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

‎2/parseFlow.re‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,12 @@ let flowAstToTypedAst = ((loc: Loc.t, s)) =>
9494
),
9595
typeParameters:[||],
9696
})
97+
|FlowAst.Statement.DeclareFunction({id, typeAnnotation})=>
98+
DotTyped.FunctionDeclaration({
99+
name: dotTypedIdentifier(id),
100+
type_: typeAnnotationToTyped(typeAnnotation),
101+
typeParameters:[||],
102+
})
97103
|_=>
98104
raise(
99105
Errors2.NotSupported({

‎package.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"@glennsl/bs-json":"^2.0.0",
3232
"babel-code-frame":"^6.26.0",
3333
"chalk":"^2.1.0",
34+
"commander":"^2.15.1",
3435
"css-tree":"^1.0.0-alpha.28",
3536
"graphql":"^0.13.2",
3637
"meow":"^3.7.0",

‎yarn.lock‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1134,6 +1134,10 @@ combined-stream@1.0.6, combined-stream@~1.0.5:
11341134
dependencies:
11351135
delayed-stream "~1.0.0"
11361136

1137+
commander@^2.15.1:
1138+
version "2.15.1"
1139+
resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f"
1140+
11371141
compare-versions@^3.1.0:
11381142
version "3.2.1"
11391143
resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-3.2.1.tgz#a49eb7689d4caaf0b6db5220173fd279614000f7"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp