Skip to content

Commit

Permalink
Merge pull request #7 from razroo/ZETA-6974-update-docs-for-add-function
Browse files Browse the repository at this point in the history
ZETA-6974: Update docs for typescript x add function.
  • Loading branch information
CharlieGreenman authored Oct 28, 2023
2 parents 6169788 + d946fcc commit 73985c0
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/rz/params/typescript-params/typescript-params.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,36 @@ export function getTsParameters(optionName: string): any {
}
]
}
case 'addFunction':
return {
nodeType: 'addFunction',
inputs: [
{
name: 'name',
inputType: 'text',
description: 'Name of function',
codeExample: 'createApollo'
},
{
name: 'type',
inputType: 'text',
description: 'Typescript type of function',
codeExample: 'string'
},
{
name: 'parameters',
inputType: 'code',
description: 'Parameters to add to method',
codeExample: `[{"name": "test", "type": "string"}]`
},
{
name: 'codeBlock',
inputType: 'code',
description: 'Code to go inside of function',
codeExample: 'return 1 + 1;'
}
]
}
case 'addClassMethod':
return {
nodeType: 'addClassMethod',
Expand Down

0 comments on commit 73985c0

Please sign in to comment.