-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpackage.json
152 lines (152 loc) · 6.2 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
{
"name": "ts-type-hidden",
"publisher": "xlboy",
"displayName": "TS Type Hidden",
"version": "0.6.0",
"description": "Hide those familiar type codes! Get the snippet back to its simplest form!",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/xlboy/ts-type-hidden"
},
"categories": [
"Other"
],
"main": "./dist/index.js",
"icon": "res/logo.png",
"files": [
"dist/**/*",
"res/**/*"
],
"engines": {
"vscode": "^1.70.0",
"node": ">=17.0.0"
},
"packageManager": "[email protected]",
"activationEvents": [
"onStartupFinished"
],
"contributes": {
"commands": [
{
"command": "ts-type-hidden.toogle",
"title": "TS Type Hidden: Toggle Hidden Mode",
"when": "resourceLangId == 'typescript' || resourceLangId == 'typescriptreact'"
},
{
"command": "ts-type-hidden.open",
"title": "TS Type Hidden: Open Hidden Mode",
"when": "resourceLangId == 'typescript' || resourceLangId == 'typescriptreact'"
},
{
"command": "ts-type-hidden.close",
"title": "TS Type Hidden: Close Hidden Mode",
"when": "resourceLangId == 'typescript' || resourceLangId == 'typescriptreact'"
}
],
"configuration": {
"type": "object",
"title": "TS Type Hidden",
"properties": {
"ts-type-hidden.enable": {
"type": "boolean",
"default": true,
"description": "Enable this extension"
},
"ts-type-hidden.typeIconPath": {
"type": "string",
"description": "The path to the Icon file next to a line of type code"
},
"ts-type-hidden.ignoreTypeKinds": {
"type": "array",
"default": [],
"items": {
"type": "string",
"enum": [
"type-alias",
"interface",
"function-overload",
"function-return",
"function-type-predicate",
"function-parameter",
"function-generic-definition",
"function-call-generic",
"tsx-component-generic",
"class-property-type-definition",
"angle-brackets-assertion",
"as-assertion",
"satisfies-operator",
"declare-statement",
"variable-type-definition",
"type-only-import-declaration",
"import-specifier-declaration",
"type-only-export-declaration",
"export-specifier-declaration"
],
"markdownEnumDescriptions": [
"```ts \ntype A = ({ ... } & { ... }) | string[] \n```\n ⏭️ `type A = ({ ... } & { ... }) | string[]`",
"```ts \ninterface A { ... } \n```\n ⏭️ `interface A { ... }`",
"```ts \nfunction fn(a: number): number[];\nfunction fn(a: number[], opts: { ... }): number[]; \n```\n ⏭️ `function fn(a: number): number[];`\n\n ⏭️ `function fn(a: number[], opts: { ... }): number[];`",
"```ts \nfunction fn(): number {};\n``` \n ⏭️ `: number`",
"```ts \nfunction fn(a: any): a is number {};\n```\n ⏭️ `: a is number`",
"```ts \nfunction fn<A extends string>(a: A, b: number) {};\n``` \n ⏭️ `: A` \n\n ⏭️ `: number`",
"```ts \nfunction fn<A extends string, B = [A, '']>() {};\n``` \n ⏭️ `<A extends string, B = [A, '']>`",
"```ts \nconst name = get<UserModule>(userModule, 'info.name');\nconst userModel = new UserModel<UserEntity>({ ... }); \n``` \n ⏭️ `<UserModule>`\n\n ⏭️ `<UserEntity>`",
"```ts \nconst EditUserForm = <ProForm<UserModel> id={userId} />;\n```\n ⏭️ `<UserModel>`",
"```ts \nclass A {\n public size?: number;\n private setSize!: Function = () => {}\n}\n```\n ⏭️ `?: number` \n\n ⏭️ `!: Function`",
"```ts \nconst num: any = 77;\nconst num1 = (<number>num).toFixed(2);\n``` \n ⏭️ `<number>`",
"```ts \nfn() as any;\n``` \n ⏭️ ` as any`",
"```ts \nconst user = { ... } satisfies UserModel;\n``` \n ⏭️ ` satisfies UserModel`",
"```ts \ndeclare const a: number;\ndeclare function b(): number;\ndeclare class c {}\ndeclare module d {}\ndeclare namespace e {}\ndeclare enum f {}\ndeclare global {}\ndeclare module 'g' {}\n``` \n ⏭️ 👆 All statements that begin with `declare`",
"```ts \nconst a: number = 1;\n``` \n ⏭️ `: number`",
"```ts \nimport type { ... } from 'a';\n``` \n ⏭️ `import type { ... } from 'a';`",
"```ts \nimport type * as a from 'a';\n``` \n ⏭️ `import type * as a from 'a';`",
"```ts \nimport {type a1} from 'a';\n``` \n ⏭️ `type a1`",
"```ts \nexport type { ... } from 'b';\n``` \n ⏭️ `export type { ... } from 'b';`",
"```ts \nexport type * from 'b';\n``` \n ⏭️ `export type * from 'b';`",
"```ts \nexport {type b1} from 'b';\n``` \n ⏭️ `type b1`"
]
},
"description": "Type kind to ignore when hiding"
}
}
},
"keybindings": [
{
"command": "ts-type-hidden.toogle",
"key": "ctrl+shift+t",
"mac": "cmd+shift+t",
"when": "editorTextFocus && resourceLangId == 'typescript' || resourceLangId == 'typescriptreact'"
}
]
},
"scripts": {
"build": "run-s type-check test && tsup",
"dev": "tsup --watch src",
"test": "vitest run",
"type-check": "tsc",
"vsce-package": "run-s build && tsx scripts/vsce-package",
"vsce-publish": "run-s build && tsx scripts/vsce-package --publish"
},
"devDependencies": {
"@types/fs-extra": "^11.0.4",
"@types/glob": "^8.1.0",
"@types/lodash-es": "^4.17.12",
"@types/mocha": "^10.0.1",
"@types/vscode": "^1.70.0",
"@vscode/test-electron": "^2.3.0",
"execa": "^9.5.1",
"fs-extra": "^11.2.0",
"glob": "^11.0.0",
"lodash-es": "^4.17.21",
"mocha": "^10.8.2",
"npm-run-all": "^4.1.5",
"prettier": "^3.3.3",
"tsup": "^8.3.5",
"tsx": "^3.12.7",
"type-fest": "^4.27.0",
"typescript": "^5.6.3",
"vitest": "^2.1.5",
"vsce": "^2.15.0"
}
}