Skip to content

Commit

Permalink
update: snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
concefly committed Aug 24, 2023
1 parent fc72420 commit 6cfc994
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .vscode/snippet.code-snippets
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"create flow node define": {
"prefix": "cfnd",
"body": [
"import { IFlowNodeMeta, IFlowNodeTypeRegisterData } from 'ah-flow-node';",
"import { BaseInput, BaseOutput } from '../base';",
"",
"declare module 'ah-flow-node' {",
" interface IFlowNodeMetaMap {",
" ${TM_FILENAME_BASE}: IFlowNodeMeta<'${TM_FILENAME_BASE}', {} & BaseInput, {} & BaseOutput>;",
" }",
"}",
"",
"export const ${TM_FILENAME_BASE}RegisterData: IFlowNodeTypeRegisterData<'${TM_FILENAME_BASE}'> = {",
" define: {",
" className: '${TM_FILENAME_BASE}',",
" cnName: '',",
" input: { ...BaseInput },",
" output: { ...BaseOutput },",
" },",
" setup(ctx) {",
" throw new Error('not implement: ' + ctx._define.className);",
" },",
"};",
""
]
}
}

0 comments on commit 6cfc994

Please sign in to comment.