-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only allow same-line arrow-less body for explicit nodes (#966)
In practice, trying to allow calls to be inlined is causing a lot of code to look very weird and unstable as seen by the four issues this is fixing. It also requires us to add a conditional group and do hackery around it. Fixes #959 Fixes #760 Fixes #615 Fixes #625
- Loading branch information
Showing
5 changed files
with
253 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
Seq(typeDef.interface.groups).forEach(group => | ||
Seq(group.members).forEach((member, memberName) => | ||
markdownDoc( | ||
member.doc, | ||
{ typePath: typePath.concat(memberName.slice(1)), | ||
signatures: member.signatures } | ||
) | ||
) | ||
) | ||
|
||
const promiseFromCallback = fn => | ||
new Promise((resolve, reject) => | ||
fn((err, result) => { | ||
if (err) return reject(err); | ||
return resolve(result); | ||
}) | ||
); | ||
|
||
runtimeAgent.getProperties( | ||
objectId, | ||
false, // ownProperties | ||
false, // accessorPropertiesOnly | ||
false, // generatePreview | ||
(error, properties, internalProperties) => { | ||
return 1 | ||
}, | ||
); | ||
|
||
function render() { | ||
return ( | ||
<View> | ||
<Image | ||
onProgress={(e) => this.setState({progress: Math.round(100 * e.nativeEvent.loaded / e.nativeEvent.total)})} | ||
/> | ||
</View> | ||
); | ||
} | ||
|
||
function render() { | ||
return ( | ||
<View> | ||
<Image | ||
onProgress={e => | ||
this.setState({ | ||
progress: Math.round( | ||
100 * e.nativeEvent.loaded / e.nativeEvent.total, | ||
), | ||
})} | ||
/> | ||
</View> | ||
); | ||
} | ||
|
||
function render() { | ||
return ( | ||
<View> | ||
<Image | ||
onProgress={e => | ||
this.setState({ | ||
progress: Math.round( | ||
100 * e.nativeEvent.loaded / e.nativeEvent.total, | ||
), | ||
})} | ||
/> | ||
</View> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters