Webstorm JavaScript and Typescript zen-coding

90 Views Asked by At

Is it possible just by doing something like that:

If I type f.name.a.b {{tab press}} => WebStorm will produce

function fname(a, b)
{
}

or in case of typescript if I type
c.Name.a.string {{tab press}}

=> it will produce:

class Name {
    a: string;
}

Is it possible to achieve something like that in WebStorm?

1

There are 1 best solutions below

1
basarat On

I is possible to ahieve something like that in webstorm

You can do something quite similar using live templates : https://www.jetbrains.com/webstorm/help/creating-code-constructs-by-live-templates.html

Various other IDEs commonly call this snippets.