Last active
August 4, 2021 23:45
-
-
Save gleba/5263d67009a035145700c602f923ebe0 to your computer and use it in GitHub Desktop.
Typescript Model Sense Thing ( Apache Velocity File Template for WebStorm / intelli Idea)
This file contains hidden or 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
#set($nameLower = ${NAME}) | |
#set($nameLower = $nameLower.substring(0).toLowerCase()) | |
#set($nameCapitalized = ${NAME}) | |
import { MakeThing } from "lasens"; | |
class ${nameCapitalized}Model {} | |
export const ${nameLower}Thing = MakeThing(${nameCapitalized}Model) | |
.controller((model) => { | |
return {}; | |
}) | |
.domain("${nameLower}") | |
.register(); | |
declare module "lasens" { | |
export interface NS { | |
${nameLower}: typeof ${nameLower}Thing; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment