-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Improve generated doc formatting (#155)
- Loading branch information
Showing
6 changed files
with
14 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
import { ${module} } from '${package.name}' | ||
|
||
${module}.${method.name}(${example.params}) | ||
.then(${method.result.name} => { | ||
console.log(${method.result.name}) | ||
}) | ||
let ${method.result.name} = await ${module}.${method.name}(${example.params}) | ||
console.log(${method.result.name}) |
9 changes: 4 additions & 5 deletions
9
languages/javascript/templates/examples/polymorphic-pull-event.md
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 |
---|---|---|
@@ -1,9 +1,8 @@ | ||
import { ${module} } from '${package.name}' | ||
|
||
${module}.${method.pulls.for}(function(parameters) { | ||
let success = await ${module}.${method.pulls.for}(async parameters => { | ||
console.log(parameters.entityId) | ||
console.log(parameters.assetId) | ||
return Promise.resolve(${originator.params[1].example.value}) | ||
}).then(success => { | ||
console.log(success) | ||
}) | ||
return ${originator.params[1].example.value} | ||
}) | ||
console.log(success) |
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 |
---|---|---|
@@ -1,6 +1,4 @@ | ||
import { ${module} } from '${package.name}' | ||
|
||
${module}.${method.name}(${method.params[1].example.value}) | ||
.then(success => { | ||
console.log(success) | ||
}) | ||
let success = await ${module}.${method.name}(${method.params[1].example.value}) | ||
console.log(success) |
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 |
---|---|---|
@@ -1,6 +1,4 @@ | ||
import { ${module} } from '${package.name}' | ||
|
||
${module}.${method.setter.for}(${example.params}) | ||
.then(${method.result.name} => { | ||
console.log(${method.result.name}) | ||
}) | ||
let ${method.result.name} = await ${module}.${method.setter.for}(${example.params}) | ||
console.log(${method.result.name}) |
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 |
---|---|---|
@@ -1,7 +1,6 @@ | ||
import { ${module} } from '${package.name}' | ||
|
||
${method.alternative}(value => { | ||
let listenerId = await ${method.alternative}(value => { | ||
console.log(value) | ||
}).then(listenerId => { | ||
console.log(listenerId) | ||
}) | ||
}) | ||
console.log(listenerId) |
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