microsoft/vscode-react-native

Public

mirrored from https://github.com/microsoft/vscode-react-nativeAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
cdp-node-version-compatibility

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

src/typings/winreg/winreg.d.ts

248lines · modeblame

6cd1e194Meena Kunnathur Balakrishnan10 years ago1// Type definitions for Winreg v0.0.15
2// Project: https://github.com/fresc81/node-winreg/
3// Definitions by: RX14 <https://github.com/RX14>
4// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5
6declare var Winreg: WinregStatic;
7
8interface WinregStatic {
9/**
10* Create a new Winreg instance with the given options.
11* @param options options object
12*/
13new (options: Winreg.Options): Winreg;
14
15/**
16* HKEY_LOCAL_MACHINE registry hive.
17*/
18HKLM: string;
19
20/**
21* HKEY_CURRENT_USER registry hive.
22*/
23HKCU: string;
24
25/**
26* HKEY_CLASSES_ROOT registry hive.
27*/
28HKCR: string;
29
30/**
31* HKEY_USERS registry hive.
32*/
33HKU: string;
34
35/**
36* HKEY_CURRENT_CONFIG registry hive.
37*/
38HKCC: string;
39
40/**
41* Array of available registry hives.
42*/
43HIVES: Array<string>;
44
45/**
46* Registry value type STRING.
47*
48* Values of this type contain a string.
49*/
50REG_SZ: string;
51
52/**
53* Registry value type MULTILINE_STRING.
54*
55* Values of this type contain a multiline string.
56*/
57REG_MULTI_SZ: string;
58
59/**
60* Registry value type EXPANDABLE_STRING.
61*
62* Values of this type contain an expandable string.
63*/
64REG_EXPAND_SZ: string;
65
66/**
67* Registry value type DOUBLE_WORD.
68*
69* Values of this type contain a double word (32 bit integer).
70*/
71REG_DWORD: string;
72
73/**
74* Registry value type QUAD_WORD.
75*
76* Values of this type contain a quad word (64 bit integer).
77*/
78REG_QWORD: string;
79
80/**
81* Registry value type BINARY.
82*
83* Values of this type contain a binary value.
84*/
85REG_BINARY: string;
86
87/**
88* Registry value type UNKNOWN.
89*
90* Values of this type contain a value of an unknown type.
91*/
92REG_NONE: string;
93
94/**
95* Array of available registry value types.
96*/
97REG_TYPES: Array<string>;
98}
99
100interface Winreg {
101/**
102* Hostname, if set in options.
103* @readonly
104*/
105host: string;
106
107/**
108* Hive ID.
109* @readonly
110*/
111hive: string;
112
113/**
114* The registry key.
115* @readonly
116*/
117key: string;
118
119/**
120* The path of the registry key, including hostname (if set) and hive.
121* @readonly
122*/
123path: string;
124
125/**
126* A new Winreg instance of the parent key.
127* @readonly
128*/
129parent: Winreg;
130
131/**
132* Retrieves all values from this registry key.
133*
134* @param cb Callback with an array of RegistryItem objects, one for each value.
135*/
136values(cb: (err: Error, result: Array<Winreg.RegistryItem>) => void): void;
137
138/**
139* Retrieves all subkeys of this registry key.
140*
141* @param cb Callback with an array of Winreg objects, one for each subkey.
142*/
143keys(cb: (err: Error, result: Array<Winreg>) => void): void;
144
145/**
146* Retrieves a named value from this registry key.
147*
148* @param name Name of the value to retrieve.
149* @param cb Callback with a RegistryItem object for the value.
150*/
151get(name: string, cb: (err: Error, result: Winreg.RegistryItem) => void): void;
152
153/**
154* Sets a named value in this registry key. Overwrites existing value.
155*
156* @param name Name of the value to set.
157* @param type Type of the value to set.
158* @param value Value of value to set.
159* @param cb Callback with any errors.
160*/
161set(name: string, type: string, value: string, cb: (err: Error) => void): void;
162
163/**
164* Remove a named value from this registry key.
165*
166* @param name Name of the value to remove.
167* @param cb Callback with any errors.
168*/
169remove(name: string, cb: (err: Error) => void): void;
170
171/**
172* Create this registry key.
173*
174* @param cb Callback with any errors.
175*/
176create(cb: (err: Error) => void): void;
177
178/**
179* Erase this registry key and its contents.
180*
181* @param cb Callback with any errors.
182*/
183erase(cb: (err: Error) => void): void;
184}
185
186declare namespace Winreg {
187export interface Options {
188/**
189* Optional hostname, must start with '\\' sequence.
190*/
191host?: string;
192
193/**
194* Optional hive ID, default is HKLM.
195*/
196hive?: string;
197
198/**
199* Optional key, default is the root key.
200*/
201key?: String;
202}
203
204/**
205* A single registry value record
206*/
207interface RegistryItem {
208/**
209* Hostname, if set in options.
210* @readonly
211*/
212host: string;
213
214/**
215* Hive ID.
216* @readonly
217*/
218hive: string;
219
220/**
221* Key that the registry value belongs to.
222* @readonly
223*/
224key: string;
225
226/**
227* Name of the registry value.
228* @readonly
229*/
230name: string;
231
232/**
233* Type of the registry value.
234* @readonly
235*/
236type: string;
237
238/**
239* Value of the registry value, as a string.
240* @readonly
241*/
242value: string;
243}
244}
245
246declare module "winreg" {
247export = Winreg;
248}