Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Conversation

torn4dom4n
Copy link
Contributor

@torn4dom4n torn4dom4n commented Sep 16, 2017

Fixes broken snippets from #2 and add tsx settings
/cc @damieng

@torn4dom4n torn4dom4n changed the title Added TypeScript and TypeScriptReact snippets Added snippets and tsx setting Sep 16, 2017
@damieng
Copy link
Contributor

damieng commented Sep 17, 2017

Are these from the upstream Microsoft package or from elsewhere? I ask because they are tending to use JSON everywhere but these are in CSON format.

@torn4dom4n
Copy link
Contributor Author

I used snippets from https://github.com/Microsoft/vscode/tree/master/extensions/typescript/snippets but I edited for Atom.

@damieng
Copy link
Contributor

damieng commented Sep 17, 2017 via email

Copy link
Contributor Author

@torn4dom4n torn4dom4n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

\cc @damieng

@@ -0,0 +1,257 @@
{
".source.ts": {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add .source.ts

"body": [
"",
"public get ${1:value}() : ${2:string} {",
"\t${3:return $0}",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add \t

"",
"private _${1:value} : ${2:string};",
"public get ${1:value}() : ${2:string} {",
"\treturn this._${1:value};",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add \t

"\treturn this._${1:value};",
"}",
"public set ${1:value}(v : ${2:string}) {",
"\tthis._${1:value} = v;",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add \t

"body": [
"",
"public set ${1:value}(v : ${2:string}) {",
"\tthis.$3 = v;",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add \t

Copy link
Contributor Author

@torn4dom4n torn4dom4n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

\cc @damieng

@@ -0,0 +1,260 @@
{
".source.tsx": {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add .source.tsx

"body": [
"",
"public get ${1:value}() : ${2:string} {",
"\t${3:return $0}",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add \t

"",
"private _${1:value} : ${2:string};",
"public get ${1:value}() : ${2:string} {",
"\treturn this._${1:value};",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add \t

"\treturn this._${1:value};",
"}",
"public set ${1:value}(v : ${2:string}) {",
"\tthis._${1:value} = v;",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add \t

"body": [
"",
"public set ${1:value}(v : ${2:string}) {",
"\tthis.$3 = v;",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add \t

@torn4dom4n
Copy link
Contributor Author

Typescript extension edited snippets with microsoft/vscode@f0281dd. It like what I did. I believe my snippets can work and keep up to date with change.
cc/ @damieng

@damieng
Copy link
Contributor

damieng commented Sep 26, 2017

I'm just trying to make sure we can stay up to date with the original repo without some knowledge of what conversions are required being lost.

@damieng damieng merged commit b1777dd into atom:master Sep 26, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants