Skip to content

Commit b7bcdde

Browse files
committed
Fixed jsDoc, wrapping, newlines
1 parent 522c71a commit b7bcdde

1 file changed

Lines changed: 43 additions & 25 deletions

File tree

src/lib/scriptHost.d.ts

Lines changed: 43 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ interface TextStreamBase {
2727
Line: number;
2828
/**
2929
* Closes a text stream.
30-
* It is not necessary to close standard streams; they close automatically when the process ends. If you close a standard stream, be aware that any other pointers to that standard stream become invalid.
30+
* It is not necessary to close standard streams; they close automatically when the process ends. If
31+
* you close a standard stream, be aware that any other pointers to that standard stream become invalid.
3132
*/
3233
Close(): void;
3334
}
@@ -49,7 +50,7 @@ interface TextStreamWriter extends TextStreamBase {
4950

5051
interface TextStreamReader extends TextStreamBase {
5152
/**
52-
* Returns a specified number of characters from an input stream, beginning at the current pointer position.
53+
* Returns a specified number of characters from an input stream, starting at the current pointer position.
5354
* Does not return until the ENTER key is pressed.
5455
* Can only be used on a stream in reading mode; causes an error in writing or appending mode.
5556
*/
@@ -88,7 +89,8 @@ interface TextStreamReader extends TextStreamBase {
8889

8990
declare var WScript: {
9091
/**
91-
* Outputs text to either a message box (under WScript.exe) or the command console window followed by a newline (under CScript.ext).
92+
* Outputs text to either a message box (under WScript.exe) or the command console window followed by
93+
* a newline (under CScript.ext).
9294
*/
9395
Echo(s: any): void;
9496
/**
@@ -159,7 +161,8 @@ declare var WScript: {
159161
DisconnectObject(obj: any): void;
160162
/**
161163
* Retrieves an existing object with the specified ProgID from memory, or creates a new one from a file.
162-
* @param strPathname Fully qualified path to the file containing the object persisted to disk. For objects in memory, pass a zero-length string.
164+
* @param strPathname Fully qualified path to the file containing the object persisted to disk.
165+
* For objects in memory, pass a zero-length string.
163166
* @param strProgID
164167
* @param strPrefix Function names in the form prefix_event will be bound to this object's COM events.
165168
*/
@@ -171,63 +174,78 @@ declare var WScript: {
171174
Sleep(intTime: number): void;
172175
};
173176

174-
/*
175-
* Allows enumerating over a COM collection, which may not have indexed item access
177+
/**
178+
* Allows enumerating over a COM collection, which may not have indexed item access.
176179
*/
177180
interface Enumerator<T> {
178-
/*
179-
* Returns true if the current item is the last one in the collection, or the collection is empty, or the current item is undefined
181+
/**
182+
* Returns true if the current item is the last one in the collection, or the collection is empty,
183+
* or the current item is undefined.
180184
*/
181185
atEnd(): boolean;
182-
/*
186+
187+
/**
183188
* Returns the current item in the collection
184189
*/
185190
item(): T;
186-
/*
187-
* Resets the current item in the collection to the first item. If there are no items in the collection, the current item is set to undefined.
191+
192+
/**
193+
* Resets the current item in the collection to the first item. If there are no items in the collection,
194+
* the current item is set to undefined.
188195
*/
189196
moveFirst(): void;
190-
/*
191-
* Moves the current item to the next item in the collection. If the enumerator is at the end of the collection or the collection is empty, the current item is set to undefined.
197+
198+
/**
199+
* Moves the current item to the next item in the collection. If the enumerator is at the end of
200+
* the collection or the collection is empty, the current item is set to undefined.
192201
*/
193202
moveNext(): void;
194203
}
204+
195205
interface EnumeratorConstructor {
196206
new <T>(collection: any): Enumerator<T>;
197207
new (collection: any): Enumerator<any>;
198208
}
209+
199210
declare var Enumerator: EnumeratorConstructor;
200211

201-
/*
202-
* Enables reading from a COM safe array, which might have an alternate lower bound, or multiple dimensions
212+
/**
213+
* Enables reading from a COM safe array, which might have an alternate lower bound, or multiple dimensions.
203214
*/
204215
interface VBArray<T> {
205-
/*
216+
/**
206217
* Returns the number of dimensions (1-based).
207218
*/
208219
dimensions(): number;
209-
/*
220+
221+
/**
210222
* Takes an index for each dimension in the array, and returns the item at the corresponding location.
211223
*/
212224
getItem(dimension1Index: number, ...dimensionNIndexes: number[]): T;
213-
/*
214-
* Returns the smallest available index for a given dimension
225+
226+
/**
227+
* Returns the smallest available index for a given dimension.
215228
* @param dimension 1-based dimension (defaults to 1)
216229
*/
217230
lbound(dimension?: number): number;
218-
/*
219-
* Returns the largest available index for a given dimension
231+
232+
/**
233+
* Returns the largest available index for a given dimension.
220234
* @param dimension 1-based dimension (defaults to 1)
221235
*/
222236
ubound(dimension?: number): number;
223-
/*
224-
* Returns a Javascript array with all the elements in the VBArray. If there are multiple dimensions, each successive dimension is appended to the end of the array.
225-
* [[1,2,3],[4,5,6]] => [1,2,3,4,5,6]
237+
238+
/**
239+
* Returns a Javascript array with all the elements in the VBArray. If there are multiple dimensions,
240+
* each successive dimension is appended to the end of the array.
241+
* Example: [[1,2,3],[4,5,6]] becomes [1,2,3,4,5,6]
226242
*/
227243
toArray(): T[];
228244
}
245+
229246
interface VBArrayConstructor {
230247
new <T>(safeArray: any): VBArray<T>;
231248
new (safeArray: any): VBArray<any>;
232249
}
233-
declare var VBArray: VBArrayConstructor;
250+
251+
declare var VBArray: VBArrayConstructor;

0 commit comments

Comments
 (0)