UNPKG
plugify-plugins-types-generator
Version:
latest (1.4.1)
1.4.1
1.4.0
1.3.8
1.3.7
1.3.6
1.3.5
1.3.4
1.3.3
1.3.2
1.3.1
tool to generate d.ts for plugify plugins by pplugin file (ESM)
plugify-plugins-types-generator
/
src
/
ts-generator
/
namespace.ts
10 lines
(9 loc)
•
265 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
export
const
plugifyNamespaceGenerator
= (
body
:
string
[], space =
NameSpaces
.
Callbacks
) => {
return
` namespace
${space}
{
${body.join(
"\n"
)}
}`
; }
// ! temp-fix to prevent export callbacks as value
export
enum
NameSpaces
{
Callbacks
=
"Callbacks"
}