diff --git a/types/activex-adodb/index.d.ts b/types/activex-adodb/index.d.ts index 8d27b7c706..f2b43ded9d 100644 --- a/types/activex-adodb/index.d.ts +++ b/types/activex-adodb/index.d.ts @@ -1,10 +1,9 @@ -// Type definitions for Microsoft ActiveX Data Objects +// Type definitions for ADODB - // Project: https://msdn.microsoft.com/en-us/library/jj249010.aspx -// Definitions by: Zev Spitz +// Defintions by: Zev Spitz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace ADODB { - const enum ADCPROP_ASYNCTHREADPRIORITY_ENUM { adPriorityAboveNormal = 4, adPriorityBelowNormal = 2, @@ -601,18 +600,18 @@ declare namespace ADODB { CommandText: string; CommandTimeout: number; CommandType: CommandTypeEnum; - + /** - * @param string [Name=''] - * @param ADODB.DataTypeEnum [Type=0] - * @param ADODB.ParameterDirectionEnum [Direction=1] - * @param number [Size=0] - */ + * @param string [Name=''] + * @param ADODB.DataTypeEnum [Type=0] + * @param ADODB.ParameterDirectionEnum [Direction=1] + * @param number [Size=0] + */ CreateParameter(Name?: string, Type?: DataTypeEnum, Direction?: ParameterDirectionEnum, Size?: number, Value?: any): Parameter; Dialect: string; - + /** @param number [Options=-1] */ - Execute(RecordsAffected?: any, Parameters?: any[], Options?: number): Recordset; + Execute(RecordsAffected?: any, Parameters?: any, Options?: number): Recordset; Name: string; NamedParameters: boolean; readonly Parameters: Parameters; @@ -633,18 +632,18 @@ declare namespace ADODB { CursorLocation: CursorLocationEnum; DefaultDatabase: string; readonly Errors: Errors; - + /** @param number [Options=-1] */ Execute(CommandText: string, RecordsAffected: any, Options?: number): Recordset; IsolationLevel: IsolationLevelEnum; Mode: ConnectModeEnum; - + /** - * @param string [ConnectionString=''] - * @param string [UserID=''] - * @param string [Password=''] - * @param number [Options=-1] - */ + * @param string [ConnectionString=''] + * @param string [UserID=''] + * @param string [Password=''] + * @param number [Options=-1] + */ Open(ConnectionString?: string, UserID?: string, Password?: string, Options?: number): void; OpenSchema(Schema: SchemaEnum, Restrictions?: any, SchemaID?: any): Recordset; readonly Properties: Properties; @@ -690,24 +689,23 @@ declare namespace ADODB { } interface Fields { - /** - * @param number [DefinedSize=0] - * @param ADODB.FieldAttributeEnum [Attrib=-1] - */ + * @param number [DefinedSize=0] + * @param ADODB.FieldAttributeEnum [Attrib=-1] + */ _Append(Name: string, Type: DataTypeEnum, DefinedSize?: number, Attrib?: FieldAttributeEnum): void; - + /** - * @param number [DefinedSize=0] - * @param ADODB.FieldAttributeEnum [Attrib=-1] - */ + * @param number [DefinedSize=0] + * @param ADODB.FieldAttributeEnum [Attrib=-1] + */ Append(Name: string, Type: DataTypeEnum, DefinedSize?: number, Attrib?: FieldAttributeEnum, FieldValue?: any): void; CancelUpdate(): void; readonly Count: number; Delete(Index: any): void; Item(Index: any): Field; Refresh(): void; - + /** @param ADODB.ResyncEnum [ResyncValues=2] */ Resync(ResyncValues?: ResyncEnum): void; Update(): void; @@ -751,43 +749,43 @@ declare namespace ADODB { ActiveConnection: any; Cancel(): void; Close(): void; - + /** - * @param string [Source=''] - * @param string [Destination=''] - * @param string [UserName=''] - * @param string [Password=''] - * @param ADODB.CopyRecordOptionsEnum [Options=-1] - * @param boolean [Async=false] - */ + * @param string [Source=''] + * @param string [Destination=''] + * @param string [UserName=''] + * @param string [Password=''] + * @param ADODB.CopyRecordOptionsEnum [Options=-1] + * @param boolean [Async=false] + */ CopyRecord(Source?: string, Destination?: string, UserName?: string, Password?: string, Options?: CopyRecordOptionsEnum, Async?: boolean): string; - + /** - * @param string [Source=''] - * @param boolean [Async=false] - */ + * @param string [Source=''] + * @param boolean [Async=false] + */ DeleteRecord(Source?: string, Async?: boolean): void; readonly Fields: Fields; GetChildren(): Recordset; Mode: ConnectModeEnum; - + /** - * @param string [Source=''] - * @param string [Destination=''] - * @param string [UserName=''] - * @param string [Password=''] - * @param ADODB.MoveRecordOptionsEnum [Options=-1] - * @param boolean [Async=false] - */ + * @param string [Source=''] + * @param string [Destination=''] + * @param string [UserName=''] + * @param string [Password=''] + * @param ADODB.MoveRecordOptionsEnum [Options=-1] + * @param boolean [Async=false] + */ MoveRecord(Source?: string, Destination?: string, UserName?: string, Password?: string, Options?: MoveRecordOptionsEnum, Async?: boolean): string; - + /** - * @param ADODB.ConnectModeEnum [Mode=0] - * @param ADODB.RecordCreateOptionsEnum [CreateOptions=-1] - * @param ADODB.RecordOpenOptionsEnum [Options=-1] - * @param string [UserName=''] - * @param string [Password=''] - */ + * @param ADODB.ConnectModeEnum [Mode=0] + * @param ADODB.RecordCreateOptionsEnum [CreateOptions=-1] + * @param ADODB.RecordOpenOptionsEnum [Options=-1] + * @param string [UserName=''] + * @param string [Password=''] + */ Open(Source: any, ActiveConnection: any, Mode?: ConnectModeEnum, CreateOptions?: RecordCreateOptionsEnum, Options?: RecordOpenOptionsEnum, UserName?: string, Password?: string): void; readonly ParentURL: string; readonly Properties: Properties; @@ -798,14 +796,14 @@ declare namespace ADODB { interface Recordset { _xClone(): Recordset; - + /** @param ADODB.AffectEnum [AffectRecords=3] */ _xResync(AffectRecords?: AffectEnum): void; - + /** - * @param string [FileName=''] - * @param ADODB.PersistFormatEnum [PersistFormat=0] - */ + * @param string [FileName=''] + * @param ADODB.PersistFormatEnum [PersistFormat=0] + */ _xSave(FileName?: string, PersistFormat?: PersistFormatEnum): void; AbsolutePage: PositionEnum; AbsolutePosition: PositionEnum; @@ -816,11 +814,11 @@ declare namespace ADODB { Bookmark: any; CacheSize: number; Cancel(): void; - + /** @param ADODB.AffectEnum [AffectRecords=3] */ CancelBatch(AffectRecords?: AffectEnum): void; CancelUpdate(): void; - + /** @param ADODB.LockTypeEnum [LockType=-1] */ Clone(LockType?: LockTypeEnum): Recordset; Close(): void; @@ -830,30 +828,30 @@ declare namespace ADODB { CursorType: CursorTypeEnum; DataMember: string; DataSource: any; - + /** @param ADODB.AffectEnum [AffectRecords=1] */ Delete(AffectRecords?: AffectEnum): void; readonly EditMode: EditModeEnum; readonly EOF: boolean; readonly Fields: Fields; Filter: any; - + /** - * @param number [SkipRecords=0] - * @param ADODB.SearchDirectionEnum [SearchDirection=1] - */ + * @param number [SkipRecords=0] + * @param ADODB.SearchDirectionEnum [SearchDirection=1] + */ Find(Criteria: string, SkipRecords?: number, SearchDirection?: SearchDirectionEnum, Start?: any): void; - + /** @param number [Rows=-1] */ GetRows(Rows?: number, Start?: any, Fields?: any): any; - + /** - * @param ADODB.StringFormatEnum [StringFormat=2] - * @param number [NumRows=-1] - * @param string [ColumnDelimeter=''] - * @param string [RowDelimeter=''] - * @param string [NullExpr=''] - */ + * @param ADODB.StringFormatEnum [StringFormat=2] + * @param number [NumRows=-1] + * @param string [ColumnDelimeter=''] + * @param string [RowDelimeter=''] + * @param string [NullExpr=''] + */ GetString(StringFormat?: StringFormatEnum, NumRows?: number, ColumnDelimeter?: string, RowDelimeter?: string, NullExpr?: string): string; Index: string; LockType: LockTypeEnum; @@ -865,30 +863,30 @@ declare namespace ADODB { MoveNext(): void; MovePrevious(): void; NextRecordset(RecordsAffected?: any): Recordset; - + /** - * @param ADODB.CursorTypeEnum [CursorType=-1] - * @param ADODB.LockTypeEnum [LockType=-1] - * @param number [Options=-1] - */ + * @param ADODB.CursorTypeEnum [CursorType=-1] + * @param ADODB.LockTypeEnum [LockType=-1] + * @param number [Options=-1] + */ Open(Source: any, ActiveConnection: any, CursorType?: CursorTypeEnum, LockType?: LockTypeEnum, Options?: number): void; readonly PageCount: number; PageSize: number; readonly Properties: Properties; readonly RecordCount: number; - + /** @param number [Options=-1] */ Requery(Options?: number): void; - + /** - * @param ADODB.AffectEnum [AffectRecords=3] - * @param ADODB.ResyncEnum [ResyncValues=2] - */ + * @param ADODB.AffectEnum [AffectRecords=3] + * @param ADODB.ResyncEnum [ResyncValues=2] + */ Resync(AffectRecords?: AffectEnum, ResyncValues?: ResyncEnum): void; - + /** @param ADODB.PersistFormatEnum [PersistFormat=0] */ Save(Destination: any, PersistFormat?: PersistFormatEnum): void; - + /** @param ADODB.SeekEnum [SeekOption=1] */ Seek(KeyValues: any, SeekOption?: SeekEnum): void; Sort: string; @@ -898,7 +896,7 @@ declare namespace ADODB { StayInSync: boolean; Supports(CursorOptions: CursorOptionEnum): boolean; Update(Fields?: any, Values?: any): void; - + /** @param ADODB.AffectEnum [AffectRecords=3] */ UpdateBatch(AffectRecords?: AffectEnum): void; } @@ -907,7 +905,7 @@ declare namespace ADODB { Cancel(): void; Charset: string; Close(): void; - + /** @param number [CharNumber=-1] */ CopyTo(DestStream: Stream, CharNumber?: number): void; readonly EOS: boolean; @@ -915,22 +913,22 @@ declare namespace ADODB { LineSeparator: LineSeparatorEnum; LoadFromFile(FileName: string): void; Mode: ConnectModeEnum; - + /** - * @param ADODB.ConnectModeEnum [Mode=0] - * @param ADODB.StreamOpenOptionsEnum [Options=-1] - * @param string [UserName=''] - * @param string [Password=''] - */ + * @param ADODB.ConnectModeEnum [Mode=0] + * @param ADODB.StreamOpenOptionsEnum [Options=-1] + * @param string [UserName=''] + * @param string [Password=''] + */ Open(Source: any, Mode?: ConnectModeEnum, Options?: StreamOpenOptionsEnum, UserName?: string, Password?: string): void; Position: number; - + /** @param number [NumBytes=-1] */ Read(NumBytes?: number): any; - + /** @param number [NumChars=-1] */ ReadText(NumChars?: number): string; - + /** @param ADODB.SaveOptionsEnum [Options=1] */ SaveToFile(FileName: string, Options?: SaveOptionsEnum): void; SetEOS(): void; @@ -939,7 +937,7 @@ declare namespace ADODB { readonly State: ObjectStateEnum; Type: StreamTypeEnum; Write(Buffer: any): void; - + /** @param ADODB.StreamWriteEnum [Options=0] */ WriteText(Data: string, Options?: StreamWriteEnum): void; } @@ -947,26 +945,48 @@ declare namespace ADODB { } interface ActiveXObject { - on(obj: ADODB.Connection, eventName: 'BeginTransComplete', eventArgs: ['TransactionLevel', 'pError', 'adStatus', 'pConnection'], handler: (this: ADODB.Connection, parameter: {TransactionLevel: number, pError: ADODB.Error, adStatus: ADODB.EventStatusEnum, pConnection: ADODB.Connection}) => void): void; - on(obj: ADODB.Connection, eventName: 'CommitTransComplete', eventArgs: ['pError', 'adStatus', 'pConnection'], handler: (this: ADODB.Connection, parameter: {pError: ADODB.Error, adStatus: ADODB.EventStatusEnum, pConnection: ADODB.Connection}) => void): void; - on(obj: ADODB.Connection, eventName: 'ConnectComplete', eventArgs: ['pError', 'adStatus', 'pConnection'], handler: (this: ADODB.Connection, parameter: {pError: ADODB.Error, adStatus: ADODB.EventStatusEnum, pConnection: ADODB.Connection}) => void): void; - on(obj: ADODB.Connection, eventName: 'Disconnect', eventArgs: ['adStatus', 'pConnection'], handler: (this: ADODB.Connection, parameter: {adStatus: ADODB.EventStatusEnum, pConnection: ADODB.Connection}) => void): void; - on(obj: ADODB.Connection, eventName: 'ExecuteComplete', eventArgs: ['RecordsAffected', 'pError', 'adStatus', 'pCommand', 'pRecordset', 'pConnection'], handler: (this: ADODB.Connection, parameter: {RecordsAffected: number, pError: ADODB.Error, adStatus: ADODB.EventStatusEnum, pCommand: ADODB.Command, pRecordset: ADODB.Recordset, pConnection: ADODB.Connection}) => void): void; - on(obj: ADODB.Connection, eventName: 'InfoMessage', eventArgs: ['pError', 'adStatus', 'pConnection'], handler: (this: ADODB.Connection, parameter: {pError: ADODB.Error, adStatus: ADODB.EventStatusEnum, pConnection: ADODB.Connection}) => void): void; - on(obj: ADODB.Connection, eventName: 'RollbackTransComplete', eventArgs: ['pError', 'adStatus', 'pConnection'], handler: (this: ADODB.Connection, parameter: {pError: ADODB.Error, adStatus: ADODB.EventStatusEnum, pConnection: ADODB.Connection}) => void): void; - on(obj: ADODB.Connection, eventName: 'WillConnect', eventArgs: ['ConnectionString', 'UserID', 'Password', 'Options', 'adStatus', 'pConnection'], handler: (this: ADODB.Connection, parameter: {ConnectionString: string, UserID: string, Password: string, Options: number, adStatus: ADODB.EventStatusEnum, pConnection: ADODB.Connection}) => void): void; - on(obj: ADODB.Connection, eventName: 'WillExecute', eventArgs: ['Source', 'CursorType', 'LockType', 'Options', 'adStatus', 'pCommand', 'pRecordset', 'pConnection'], handler: (this: ADODB.Connection, parameter: {Source: string, CursorType: ADODB.CursorTypeEnum, LockType: ADODB.LockTypeEnum, Options: number, adStatus: ADODB.EventStatusEnum, pCommand: ADODB.Command, pRecordset: ADODB.Recordset, pConnection: ADODB.Connection}) => void): void; - on(obj: ADODB.Recordset, eventName: 'EndOfRecordset', eventArgs: ['fMoreData', 'adStatus', 'pRecordset'], handler: (this: ADODB.Recordset, parameter: {fMoreData: boolean, adStatus: ADODB.EventStatusEnum, pRecordset: ADODB.Recordset}) => void): void; - on(obj: ADODB.Recordset, eventName: 'FetchComplete', eventArgs: ['pError', 'adStatus', 'pRecordset'], handler: (this: ADODB.Recordset, parameter: {pError: ADODB.Error, adStatus: ADODB.EventStatusEnum, pRecordset: ADODB.Recordset}) => void): void; - on(obj: ADODB.Recordset, eventName: 'FetchProgress', eventArgs: ['Progress', 'MaxProgress', 'adStatus', 'pRecordset'], handler: (this: ADODB.Recordset, parameter: {Progress: number, MaxProgress: number, adStatus: ADODB.EventStatusEnum, pRecordset: ADODB.Recordset}) => void): void; - on(obj: ADODB.Recordset, eventName: 'FieldChangeComplete', eventArgs: ['cFields', 'Fields', 'pError', 'adStatus', 'pRecordset'], handler: (this: ADODB.Recordset, parameter: {cFields: number, Fields: any, pError: ADODB.Error, adStatus: ADODB.EventStatusEnum, pRecordset: ADODB.Recordset}) => void): void; - on(obj: ADODB.Recordset, eventName: 'MoveComplete', eventArgs: ['adReason', 'pError', 'adStatus', 'pRecordset'], handler: (this: ADODB.Recordset, parameter: {adReason: ADODB.EventReasonEnum, pError: ADODB.Error, adStatus: ADODB.EventStatusEnum, pRecordset: ADODB.Recordset}) => void): void; - on(obj: ADODB.Recordset, eventName: 'RecordChangeComplete', eventArgs: ['adReason', 'cRecords', 'pError', 'adStatus', 'pRecordset'], handler: (this: ADODB.Recordset, parameter: {adReason: ADODB.EventReasonEnum, cRecords: number, pError: ADODB.Error, adStatus: ADODB.EventStatusEnum, pRecordset: ADODB.Recordset}) => void): void; - on(obj: ADODB.Recordset, eventName: 'RecordsetChangeComplete', eventArgs: ['adReason', 'pError', 'adStatus', 'pRecordset'], handler: (this: ADODB.Recordset, parameter: {adReason: ADODB.EventReasonEnum, pError: ADODB.Error, adStatus: ADODB.EventStatusEnum, pRecordset: ADODB.Recordset}) => void): void; - on(obj: ADODB.Recordset, eventName: 'WillChangeField', eventArgs: ['cFields', 'Fields', 'adStatus', 'pRecordset'], handler: (this: ADODB.Recordset, parameter: {cFields: number, Fields: any, adStatus: ADODB.EventStatusEnum, pRecordset: ADODB.Recordset}) => void): void; - on(obj: ADODB.Recordset, eventName: 'WillChangeRecord', eventArgs: ['adReason', 'cRecords', 'adStatus', 'pRecordset'], handler: (this: ADODB.Recordset, parameter: {adReason: ADODB.EventReasonEnum, cRecords: number, adStatus: ADODB.EventStatusEnum, pRecordset: ADODB.Recordset}) => void): void; - on(obj: ADODB.Recordset, eventName: 'WillChangeRecordset', eventArgs: ['adReason', 'adStatus', 'pRecordset'], handler: (this: ADODB.Recordset, parameter: {adReason: ADODB.EventReasonEnum, adStatus: ADODB.EventStatusEnum, pRecordset: ADODB.Recordset}) => void): void; - on(obj: ADODB.Recordset, eventName: 'WillMove', eventArgs: ['adReason', 'adStatus', 'pRecordset'], handler: (this: ADODB.Recordset, parameter: {adReason: ADODB.EventReasonEnum, adStatus: ADODB.EventStatusEnum, pRecordset: ADODB.Recordset}) => void): void; + on(obj: ADODB.Connection, event: 'BeginTransComplete', argNames: ['TransactionLevel', 'pError', 'adStatus', 'pConnection'], handler: (this: ADODB.Connection, parameter: { + TransactionLevel: number, pError: ADODB.Error, adStatus: ADODB.EventStatusEnum, pConnection: ADODB.Connection}) => void): void; + on(obj: ADODB.Connection, event: 'CommitTransComplete', argNames: ['pError', 'adStatus', 'pConnection'], handler: (this: ADODB.Connection, parameter: {pError: ADODB.Error, + adStatus: ADODB.EventStatusEnum, pConnection: ADODB.Connection}) => void): void; + on(obj: ADODB.Connection, event: 'ConnectComplete', argNames: ['pError', 'adStatus', 'pConnection'], handler: (this: ADODB.Connection, parameter: {pError: ADODB.Error, + adStatus: ADODB.EventStatusEnum, pConnection: ADODB.Connection}) => void): void; + on(obj: ADODB.Connection, event: 'Disconnect', argNames: ['adStatus', 'pConnection'], handler: (this: ADODB.Connection, parameter: {adStatus: ADODB.EventStatusEnum, + pConnection: ADODB.Connection}) => void): void; + on(obj: ADODB.Connection, event: 'ExecuteComplete', argNames: ['RecordsAffected', 'pError', 'adStatus', 'pCommand', 'pRecordset', 'pConnection'], + handler: (this: ADODB.Connection, parameter: {RecordsAffected: number, pError: ADODB.Error, adStatus: ADODB.EventStatusEnum, pCommand: ADODB.Command, + pRecordset: ADODB.Recordset, pConnection: ADODB.Connection}) => void): void; + on(obj: ADODB.Connection, event: 'InfoMessage', argNames: ['pError', 'adStatus', 'pConnection'], handler: (this: ADODB.Connection, parameter: {pError: ADODB.Error, + adStatus: ADODB.EventStatusEnum, pConnection: ADODB.Connection}) => void): void; + on(obj: ADODB.Connection, event: 'RollbackTransComplete', argNames: ['pError', 'adStatus', 'pConnection'], handler: (this: ADODB.Connection, parameter: {pError: ADODB.Error, + adStatus: ADODB.EventStatusEnum, pConnection: ADODB.Connection}) => void): void; + on(obj: ADODB.Connection, event: 'WillConnect', argNames: ['ConnectionString', 'UserID', 'Password', 'Options', 'adStatus', 'pConnection'], handler: (this: ADODB.Connection, + parameter: {ConnectionString: string, UserID: string, Password: string, Options: number, adStatus: ADODB.EventStatusEnum, pConnection: ADODB.Connection}) => void): void; + on(obj: ADODB.Connection, event: 'WillExecute', argNames: ['Source', 'CursorType', 'LockType', 'Options', 'adStatus', 'pCommand', 'pRecordset', 'pConnection'], + handler: (this: ADODB.Connection, parameter: {Source: string, CursorType: ADODB.CursorTypeEnum, LockType: ADODB.LockTypeEnum, Options: number, + adStatus: ADODB.EventStatusEnum, pCommand: ADODB.Command, pRecordset: ADODB.Recordset, pConnection: ADODB.Connection}) => void): void; + on(obj: ADODB.Recordset, event: 'EndOfRecordset', argNames: ['fMoreData', 'adStatus', 'pRecordset'], handler: (this: ADODB.Recordset, parameter: {fMoreData: boolean, + adStatus: ADODB.EventStatusEnum, pRecordset: ADODB.Recordset}) => void): void; + on(obj: ADODB.Recordset, event: 'FetchComplete', argNames: ['pError', 'adStatus', 'pRecordset'], handler: (this: ADODB.Recordset, parameter: {pError: ADODB.Error, + adStatus: ADODB.EventStatusEnum, pRecordset: ADODB.Recordset}) => void): void; + on(obj: ADODB.Recordset, event: 'FetchProgress', argNames: ['Progress', 'MaxProgress', 'adStatus', 'pRecordset'], handler: (this: ADODB.Recordset, parameter: {Progress: number, + MaxProgress: number, adStatus: ADODB.EventStatusEnum, pRecordset: ADODB.Recordset}) => void): void; + on(obj: ADODB.Recordset, event: 'FieldChangeComplete', argNames: ['cFields', 'Fields', 'pError', 'adStatus', 'pRecordset'], handler: (this: ADODB.Recordset, parameter: { + cFields: number, Fields: any, pError: ADODB.Error, adStatus: ADODB.EventStatusEnum, pRecordset: ADODB.Recordset}) => void): void; + on(obj: ADODB.Recordset, event: 'MoveComplete', argNames: ['adReason', 'pError', 'adStatus', 'pRecordset'], handler: (this: ADODB.Recordset, parameter: { + adReason: ADODB.EventReasonEnum, pError: ADODB.Error, adStatus: ADODB.EventStatusEnum, pRecordset: ADODB.Recordset}) => void): void; + on(obj: ADODB.Recordset, event: 'RecordChangeComplete', argNames: ['adReason', 'cRecords', 'pError', 'adStatus', 'pRecordset'], handler: (this: ADODB.Recordset, parameter: { + adReason: ADODB.EventReasonEnum, cRecords: number, pError: ADODB.Error, adStatus: ADODB.EventStatusEnum, pRecordset: ADODB.Recordset}) => void): void; + on(obj: ADODB.Recordset, event: 'RecordsetChangeComplete', argNames: ['adReason', 'pError', 'adStatus', 'pRecordset'], handler: (this: ADODB.Recordset, parameter: { + adReason: ADODB.EventReasonEnum, pError: ADODB.Error, adStatus: ADODB.EventStatusEnum, pRecordset: ADODB.Recordset}) => void): void; + on(obj: ADODB.Recordset, event: 'WillChangeField', argNames: ['cFields', 'Fields', 'adStatus', 'pRecordset'], handler: (this: ADODB.Recordset, parameter: {cFields: number, + Fields: any, adStatus: ADODB.EventStatusEnum, pRecordset: ADODB.Recordset}) => void): void; + on(obj: ADODB.Recordset, event: 'WillChangeRecord', argNames: ['adReason', 'cRecords', 'adStatus', 'pRecordset'], handler: (this: ADODB.Recordset, parameter: { + adReason: ADODB.EventReasonEnum, cRecords: number, adStatus: ADODB.EventStatusEnum, pRecordset: ADODB.Recordset}) => void): void; + on(obj: ADODB.Recordset, event: 'WillChangeRecordset', argNames: ['adReason', 'adStatus', 'pRecordset'], handler: (this: ADODB.Recordset, parameter: { + adReason: ADODB.EventReasonEnum, adStatus: ADODB.EventStatusEnum, pRecordset: ADODB.Recordset}) => void): void; + on(obj: ADODB.Recordset, event: 'WillMove', argNames: ['adReason', 'adStatus', 'pRecordset'], handler: (this: ADODB.Recordset, parameter: {adReason: ADODB.EventReasonEnum, + adStatus: ADODB.EventStatusEnum, pRecordset: ADODB.Recordset}) => void): void; set(obj: ADODB.Recordset, propertyName: 'Collect', parameterTypes: [any], newValue: any): void; new(progid: 'ADODB.Command'): ADODB.Command; new(progid: 'ADODB.Connection'): ADODB.Connection; @@ -981,5 +1001,4 @@ interface EnumeratorConstructor { new(col: ADODB.Fields): ADODB.Field; new(col: ADODB.Parameters): ADODB.Parameter; new(col: ADODB.Properties): ADODB.Property; -} - +} \ No newline at end of file diff --git a/types/activex-scripting/index.d.ts b/types/activex-scripting/index.d.ts index 7911113175..1dd659fc7a 100644 --- a/types/activex-scripting/index.d.ts +++ b/types/activex-scripting/index.d.ts @@ -156,9 +156,9 @@ declare namespace Scripting { Attributes: FileAttribute; /** - * Copy this file - * @param boolean [OverWriteFiles=true] - */ + * Copy this file + * @param boolean [OverWriteFiles=true] + */ Copy(Destination: string, OverWriteFiles?: boolean): void; /** Date file was created */ @@ -171,9 +171,9 @@ declare namespace Scripting { readonly DateLastModified: VarDate; /** - * Delete this file - * @param boolean [Force=false] - */ + * Delete this file + * @param boolean [Force=false] + */ Delete(Force?: boolean): void; /** Get drive that contains file */ @@ -186,10 +186,10 @@ declare namespace Scripting { Name: string; /** - * Open a file as a TextStream - * @param Scripting.IOMode [IOMode=1] - * @param Scripting.Tristate [Format=0] - */ + * Open a file as a TextStream + * @param Scripting.IOMode [IOMode=1] + * @param Scripting.Tristate [Format=0] + */ OpenAsTextStream(IOMode?: IOMode, Format?: Tristate): TextStream; /** Get folder that contains file */ @@ -228,37 +228,37 @@ declare namespace Scripting { BuildPath(Path: string, Name: string): string; /** - * Copy a file - * @param boolean [OverWriteFiles=true] - */ + * Copy a file + * @param boolean [OverWriteFiles=true] + */ CopyFile(Source: string, Destination: string, OverWriteFiles?: boolean): void; /** - * Copy a folder - * @param boolean [OverWriteFiles=true] - */ + * Copy a folder + * @param boolean [OverWriteFiles=true] + */ CopyFolder(Source: string, Destination: string, OverWriteFiles?: boolean): void; /** Create a folder */ CreateFolder(Path: string): Folder; /** - * Create a file as a TextStream - * @param boolean [Overwrite=true] - * @param boolean [Unicode=false] - */ + * Create a file as a TextStream + * @param boolean [Overwrite=true] + * @param boolean [Unicode=false] + */ CreateTextFile(FileName: string, Overwrite?: boolean, Unicode?: boolean): TextStream; /** - * Delete a file - * @param boolean [Force=false] - */ + * Delete a file + * @param boolean [Force=false] + */ DeleteFile(FileSpec: string, Force?: boolean): void; /** - * Delete a folder - * @param boolean [Force=false] - */ + * Delete a folder + * @param boolean [Force=false] + */ DeleteFolder(FolderSpec: string, Force?: boolean): void; /** Check if a drive or a share exists */ @@ -307,9 +307,9 @@ declare namespace Scripting { GetSpecialFolder(SpecialFolder: SpecialFolderConst): Folder; /** - * Retrieve the standard input, output or error stream - * @param boolean [Unicode=false] - */ + * Retrieve the standard input, output or error stream + * @param boolean [Unicode=false] + */ GetStandardStream(StandardStreamType: StandardStreamTypes, Unicode?: boolean): TextStream; /** Generate name that can be used to name a temporary file */ @@ -322,11 +322,11 @@ declare namespace Scripting { MoveFolder(Source: string, Destination: string): void; /** - * Open a file as a TextStream - * @param Scripting.IOMode [IOMode=1] - * @param boolean [Create=false] - * @param Scripting.Tristate [Format=0] - */ + * Open a file as a TextStream + * @param Scripting.IOMode [IOMode=1] + * @param boolean [Create=false] + * @param Scripting.Tristate [Format=0] + */ OpenTextFile(FileName: string, IOMode?: IOMode, Create?: boolean, Format?: Tristate): TextStream; } @@ -337,16 +337,16 @@ declare namespace Scripting { Attributes: FileAttribute; /** - * Copy this folder - * @param boolean [OverWriteFiles=true] - */ + * Copy this folder + * @param boolean [OverWriteFiles=true] + */ Copy(Destination: string, OverWriteFiles?: boolean): void; /** - * Create a file as a TextStream - * @param boolean [Overwrite=true] - * @param boolean [Unicode=false] - */ + * Create a file as a TextStream + * @param boolean [Overwrite=true] + * @param boolean [Unicode=false] + */ CreateTextFile(FileName: string, Overwrite?: boolean, Unicode?: boolean): TextStream; /** Date folder was created */ @@ -359,9 +359,9 @@ declare namespace Scripting { readonly DateLastModified: VarDate; /** - * Delete this folder - * @param boolean [Force=false] - */ + * Delete this folder + * @param boolean [Force=false] + */ Delete(Force?: boolean): void; /** Get drive that contains folder */ @@ -454,9 +454,9 @@ declare namespace Scripting { WriteBlankLines(Lines: number): void; /** - * Write a string and an end of line to the stream - * @param string [Text=''] - */ + * Write a string and an end of line to the stream + * @param string [Text=''] + */ WriteLine(Text?: string): void; } @@ -474,5 +474,4 @@ interface EnumeratorConstructor { new(col: Scripting.Drives): Scripting.Drive; new(col: Scripting.Files): Scripting.File; new(col: Scripting.Folders): Scripting.Folder; -} - +} \ No newline at end of file diff --git a/types/activex-wia/index.d.ts b/types/activex-wia/index.d.ts index 266902a683..564b7fbf04 100644 --- a/types/activex-wia/index.d.ts +++ b/types/activex-wia/index.d.ts @@ -169,58 +169,58 @@ declare namespace WIA { interface CommonDialog { /** - * Displays one or more dialog boxes that enable the user to acquire an image from a hardware device for image acquisition and returns an ImageFile object on success, otherwise Nothing - * @param WIA.WiaDeviceType [DeviceType=0] - * @param WIA.WiaImageIntent [Intent=0] - * @param WIA.WiaImageBias [Bias=131072] - * @param string [FormatID='{00000000-0000-0000-0000-000000000000}'] - * @param boolean [AlwaysSelectDevice=false] - * @param boolean [UseCommonUI=true] - * @param boolean [CancelError=false] - */ + * Displays one or more dialog boxes that enable the user to acquire an image from a hardware device for image acquisition and returns an ImageFile object on success, otherwise Nothing + * @param WIA.WiaDeviceType [DeviceType=0] + * @param WIA.WiaImageIntent [Intent=0] + * @param WIA.WiaImageBias [Bias=131072] + * @param string [FormatID='{00000000-0000-0000-0000-000000000000}'] + * @param boolean [AlwaysSelectDevice=false] + * @param boolean [UseCommonUI=true] + * @param boolean [CancelError=false] + */ ShowAcquireImage(DeviceType?: WiaDeviceType, Intent?: WiaImageIntent, Bias?: WiaImageBias, FormatID?: string, AlwaysSelectDevice?: boolean, UseCommonUI?: boolean, CancelError?: boolean): ImageFile; /** Launches the Windows Scanner and Camera Wizard and returns Nothing. Future versions may return a collection of ImageFile objects. */ ShowAcquisitionWizard(Device: Device): any; /** - * Displays the properties dialog box for the specified Device - * @param boolean [CancelError=false] - */ + * Displays the properties dialog box for the specified Device + * @param boolean [CancelError=false] + */ ShowDeviceProperties(Device: Device, CancelError?: boolean): void; /** - * Displays the properties dialog box for the specified Item - * @param boolean [CancelError=false] - */ + * Displays the properties dialog box for the specified Item + * @param boolean [CancelError=false] + */ ShowItemProperties(Item: Item, CancelError?: boolean): void; /** Launches the Photo Printing Wizard with the absolute path of a specific file or Vector of absolute paths to files */ ShowPhotoPrintingWizard(Files: any): void; /** - * Displays a dialog box that enables the user to select a hardware device for image acquisition. Returns the selected Device object on success, otherwise Nothing - * @param WIA.WiaDeviceType [DeviceType=0] - * @param boolean [AlwaysSelectDevice=false] - * @param boolean [CancelError=false] - */ + * Displays a dialog box that enables the user to select a hardware device for image acquisition. Returns the selected Device object on success, otherwise Nothing + * @param WIA.WiaDeviceType [DeviceType=0] + * @param boolean [AlwaysSelectDevice=false] + * @param boolean [CancelError=false] + */ ShowSelectDevice(DeviceType?: WiaDeviceType, AlwaysSelectDevice?: boolean, CancelError?: boolean): Device; /** - * Displays a dialog box that enables the user to select an item for transfer from a hardware device for image acquisition. Returns the selection as an Items collection on success, otherwise Nothing - * @param WIA.WiaImageIntent [Intent=0] - * @param WIA.WiaImageBias [Bias=131072] - * @param boolean [SingleSelect=true] - * @param boolean [UseCommonUI=true] - * @param boolean [CancelError=false] - */ + * Displays a dialog box that enables the user to select an item for transfer from a hardware device for image acquisition. Returns the selection as an Items collection on success, otherwise Nothing + * @param WIA.WiaImageIntent [Intent=0] + * @param WIA.WiaImageBias [Bias=131072] + * @param boolean [SingleSelect=true] + * @param boolean [UseCommonUI=true] + * @param boolean [CancelError=false] + */ ShowSelectItems(Device: Device, Intent?: WiaImageIntent, Bias?: WiaImageBias, SingleSelect?: boolean, UseCommonUI?: boolean, CancelError?: boolean): Items; /** - * Displays a progress dialog box while transferring the specified Item to the local machine. See Item.Transfer for additional information. - * @param string [FormatID='{00000000-0000-0000-0000-000000000000}'] - * @param boolean [CancelError=false] - */ + * Displays a progress dialog box while transferring the specified Item to the local machine. See Item.Transfer for additional information. + * @param string [FormatID='{00000000-0000-0000-0000-000000000000}'] + * @param boolean [CancelError=false] + */ ShowTransfer(Item: Item, FormatID?: string, CancelError?: boolean): any; } @@ -337,27 +337,27 @@ declare namespace WIA { readonly DeviceInfos: DeviceInfos; /** - * Registers the specified EventID for the specified DeviceID. If DeviceID is "*" then OnEvent will be called whenever the event specified occurs for any device. Otherwise, OnEvent will only be called if the event specified occurs on the device specified. - * @param string [DeviceID='*'] - */ + * Registers the specified EventID for the specified DeviceID. If DeviceID is "*" then OnEvent will be called whenever the event specified occurs for any device. Otherwise, OnEvent will only be called if the event specified occurs on the device specified. + * @param string [DeviceID='*'] + */ RegisterEvent(EventID: string, DeviceID?: string): void; /** - * Registers the specified Command to launch when the specified EventID for the specified DeviceID occurs. Command can be either a ClassID or the full path name and the appropriate command-line arguments needed to invoke the application. - * @param string [DeviceID='*'] - */ + * Registers the specified Command to launch when the specified EventID for the specified DeviceID occurs. Command can be either a ClassID or the full path name and the appropriate command-line arguments needed to invoke the application. + * @param string [DeviceID='*'] + */ RegisterPersistentEvent(Command: string, Name: string, Description: string, Icon: string, EventID: string, DeviceID?: string): void; /** - * Unregisters the specified EventID for the specified DeviceID. UnregisterEvent should only be called for EventID and DeviceID for which you called RegisterEvent. - * @param string [DeviceID='*'] - */ + * Unregisters the specified EventID for the specified DeviceID. UnregisterEvent should only be called for EventID and DeviceID for which you called RegisterEvent. + * @param string [DeviceID='*'] + */ UnregisterEvent(EventID: string, DeviceID?: string): void; /** - * Unregisters the specified Command for the specified EventID for the specified DeviceID. UnregisterPersistentEvent should only be called for the Command, Name, Description, Icon, EventID and DeviceID for which you called RegisterPersistentEvent. - * @param string [DeviceID='*'] - */ + * Unregisters the specified Command for the specified EventID for the specified DeviceID. UnregisterPersistentEvent should only be called for the Command, Name, Description, Icon, EventID and DeviceID for which you called RegisterPersistentEvent. + * @param string [DeviceID='*'] + */ UnregisterPersistentEvent(Command: string, Name: string, Description: string, Icon: string, EventID: string, DeviceID?: string): void; } @@ -404,9 +404,9 @@ declare namespace WIA { interface Filters { /** - * Appends/Inserts a new Filter of the specified FilterID into a Filter collection - * @param number [Index=0] - */ + * Appends/Inserts a new Filter of the specified FilterID into a Filter collection + * @param number [Index=0] + */ Add(FilterID: string, Index?: number): void; /** Returns the number of members in the collection */ @@ -522,9 +522,9 @@ declare namespace WIA { readonly Properties: Properties; /** - * Returns an ImageFile object, in this version, in the format specified in FormatID if supported, otherwise using the preferred format for this imaging device. Future versions may return a collection of ImageFile objects. - * @param string [FormatID='{00000000-0000-0000-0000-000000000000}'] - */ + * Returns an ImageFile object, in this version, in the format specified in FormatID if supported, otherwise using the preferred format for this imaging device. Future versions may return a collection of ImageFile objects. + * @param string [FormatID='{00000000-0000-0000-0000-000000000000}'] + */ Transfer(FormatID?: string): any; /** Returns the underlying IWiaItem interface for this Item object */ @@ -617,9 +617,9 @@ declare namespace WIA { interface Vector { /** - * If Index is not zero, Inserts a new element into the Vector collection before the specified Index. If Index is zero, Appends a new element to the Vector collection. - * @param number [Index=0] - */ + * If Index is not zero, Inserts a new element into the Vector collection before the specified Index. If Index is zero, Appends a new element to the Vector collection. + * @param number [Index=0] + */ Add(Value: any, Index?: number): void; /** Returns/Sets the Vector of Bytes as an array of bytes */ @@ -635,36 +635,36 @@ declare namespace WIA { Date: VarDate; /** - * Used to get the Thumbnail property of an ImageFile which is an image file, The thumbnail property of an Item which is RGB data, or creating an ImageFile from raw ARGB data. Returns an ImageFile object on success. See the Picture method for more details. - * @param number [Width=0] - * @param number [Height=0] - */ + * Used to get the Thumbnail property of an ImageFile which is an image file, The thumbnail property of an Item which is RGB data, or creating an ImageFile from raw ARGB data. Returns an ImageFile object on success. See the Picture method for more details. + * @param number [Width=0] + * @param number [Height=0] + */ ImageFile(Width?: number, Height?: number): ImageFile; /** Returns/Sets the specified item in the vector by position */ Item(Index: number): any; /** - * If the Vector of Bytes contains an image file, then Width and Height are ignored. Otherwise a Vector of Bytes must be RGB data and a Vector of Longs must be ARGB data. Returns a Picture object on success. See the ImageFile method for more details. - * @param number [Width=0] - * @param number [Height=0] - */ + * If the Vector of Bytes contains an image file, then Width and Height are ignored. Otherwise a Vector of Bytes must be RGB data and a Vector of Longs must be ARGB data. Returns a Picture object on success. See the ImageFile method for more details. + * @param number [Width=0] + * @param number [Height=0] + */ Picture(Width?: number, Height?: number): any; /** Removes the designated element and returns it if successful */ Remove(Index: number): any; /** - * Stores the string Value into the Vector of Bytes including the NULL terminator. Value may be truncated unless Resizable is True. The string will be stored as an ANSI string unless Unicode is True, in which case it will be stored as a Unicode string. - * @param boolean [Resizable=true] - * @param boolean [Unicode=true] - */ + * Stores the string Value into the Vector of Bytes including the NULL terminator. Value may be truncated unless Resizable is True. The string will be stored as an ANSI string unless Unicode is True, in which case it will be stored as a Unicode string. + * @param boolean [Resizable=true] + * @param boolean [Unicode=true] + */ SetFromString(Value: string, Resizable?: boolean, Unicode?: boolean): void; /** - * Returns a Vector of Bytes as a String - * @param boolean [Unicode=true] - */ + * Returns a Vector of Bytes as a String + * @param boolean [Unicode=true] + */ String(Unicode?: boolean): string; } @@ -691,5 +691,4 @@ interface EnumeratorConstructor { new(col: WIA.Items): WIA.Item; new(col: WIA.Properties): WIA.Property; new(col: WIA.Vector): any; -} - +} \ No newline at end of file