Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mauroreisvieira/sublime-typescript-snippets

TypeScript Snippets for Sublime Text
https://github.com/mauroreisvieira/sublime-typescript-snippets

javascript snippets sublime-snippets sublime-text typescript

Last synced: about 1 month ago
JSON representation

TypeScript Snippets for Sublime Text

Awesome Lists containing this project

README

        

# Typescript Sublime Snippets

## Introduction

[Typescript](https://typescriptlang.org/) is a typed superset of JavaScript that compiles to plain JavaScript.
This repository was built to help developers in their day-to-day development of components in Typescript.

## Installation

**With Package Control:** _(NOT AVAILABLE YET)_
1. Open Package Control - (Ctrl or ⌘) + ⇧ + P
2. Type `Typescript Snippets` and press Enter
3. Ready to use 🎉

**Manually:**
1. Download latest release and unzip. it into your Packages folder
2. Go to Sublime Text → Preferences → Browse Packages
3. Move folder to inside, start using...

## Snippets

### Attribute

| Snippet | Description | Version |
| --- | --- | --- |
| `private-static-attribute` | attribute static private | - |
| `protected-static-attribute` | attribute static protected | - |
| `public-static-attribute` | attribute static public | - |
| `private-attribute` | attribute private | - |
| `protected-attribute` | attribute protected | - |
| `public-attribute` | attribute public | - |

### Methods

| Snippet | Description | Version |
| --- | --- | --- |
| `private-arrow-method` | arrow method private | - |
| `protected-arrow-method` | arrow method protected | - |
| `public-arrow-method` | arrow method public | - |
| `private-method` | method private | - |
| `public-method` | method public | - |
| `protected-method` | method protected | - |

### Class

| Snippet | Description | Version |
| --- | --- | --- |
| `constructor` | constructor | - |
| `class` | class | - |
| `class-extends` | extend class | - |
| `class-implements` | class implements | - |
| `export-class` | export class | - |
| `export-class-extends` | export class extends | - |
| `export-class-implements` | export class implements | - |

### Interface

| Snippet | Description | Version |
| --- | --- | --- |
| `interface` | interface | - |
| `interface-extend` | interface extend | - |

### Iterator

| Snippet | Description | Version |
| --- | --- | --- |
| `for-in` | for an array does not iterate over the array items | - |
| `for-length` | for length | - |
| `for-of` | iterates over the array correctly logging out the members as expected | - |

### Getter & Setter

| Snippet | Description | Version |
| --- | --- | --- |
| `getter` | getter | - |
| `setter` | setter | - |
| `getter-setter` | getter and setter | - |

### Other

| Snippet | Description | Version |
| --- | --- | --- |
| `enum` | enum | - |
| `keyof` | applied to an intersection type is transformed to a union of keyof applied to each intersection constituent | 2.8 |
| `distributive-conditional-types` | distributive conditional types | 2.8 |
| `conditional-types` | conditional types | 2.8 |
| `if-in` | check value inside variable | - |
| `if-instanceof` | instanceof | 2.7 |
| `spread-operator` | spread operator | - |
| `import` | import | - |
| `try-catch` | try-catch | 2.5 |

## License

**Sublime Typescript Snippets** is open-sourced software licensed under the \[MIT license\](http://opensource.org/licenses/MIT)

Created with ♥️ by [@mauroreisvieira](https://twitter.com/mauroreisvieira) in **Portugal**