67 lines
1.3 KiB
Text
67 lines
1.3 KiB
Text
extends javascript
|
|
|
|
snippet tconst "ts const"
|
|
const ${1}: ${2:any} = ${3};
|
|
${0}
|
|
snippet tlet "ts let"
|
|
let ${1}: ${2:any} = ${3};
|
|
${0}
|
|
snippet tvar "ts var"
|
|
var ${1}: ${2:any} = ${3};
|
|
${0}
|
|
snippet + "ts create field"
|
|
${1}: ${0:any}
|
|
snippet #+ "ts create private field using #"
|
|
#${1}: ${0:any}
|
|
snippet tpfi "ts create public field"
|
|
public ${1}: ${0:any}
|
|
snippet tprfi "ts create private field"
|
|
private ${1}: ${0:any}
|
|
snippet tprofi "ts create protected field"
|
|
protected ${1}: ${0:any}
|
|
snippet int "interface"
|
|
interface ${1} {
|
|
${2}: ${3:any};
|
|
${0}
|
|
}
|
|
snippet intx "interface extends"
|
|
interface ${1} extends ${2} {
|
|
${3}: ${4:any};
|
|
${0}
|
|
}
|
|
snippet tfun "ts function"
|
|
function ${1}(${2}): ${3:any} {
|
|
${0}
|
|
}
|
|
snippet tpmet "ts public method"
|
|
public ${1}(${2}): ${3:any} {
|
|
${0}
|
|
}
|
|
snippet tpsmet "ts public static method"
|
|
public static ${1}(${2}): ${3:any} {
|
|
${0}
|
|
}
|
|
snippet tprmet "ts private method"
|
|
private ${1}(${2}): ${3:any} {
|
|
${0}
|
|
}
|
|
snippet tpromet "ts protected method"
|
|
protected ${1}(${2}): ${3:any} {
|
|
${0}
|
|
}
|
|
snippet tcla "ts class"
|
|
class ${1} {
|
|
${2}
|
|
constructor(public ${3}: ${4: any}) {
|
|
${5}
|
|
}
|
|
${0}
|
|
}
|
|
snippet tclax "ts class extends"
|
|
class ${1} extends ${2} {
|
|
${3}
|
|
constructor(public ${4}: ${5: any}) {
|
|
${6}
|
|
}
|
|
${0}
|
|
}
|