Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TypeScript] Change API types from class to interface #408

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions lib/odbc.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
declare namespace odbc {

class ColumnDefinition {
interface ColumnDefinition {
name: string;
dataType: number;
dataTypeName: string;
Expand All @@ -9,25 +9,25 @@ declare namespace odbc {
nullable: boolean;
}

class Result<T> extends Array<T> {
interface Result<T> extends Array<T> {
count: number;
columns: Array<ColumnDefinition>;
statement: string;
parameters: Array<number|string>;
return: number;
}

class OdbcError {
interface OdbcError {
message: string;
code: number;
state: string;
}

class NodeOdbcError extends Error {
interface NodeOdbcError extends Error {
odbcErrors: Array<OdbcError>;
}

class Statement {
interface Statement {

////////////////////////////////////////////////////////////////////////////
// Callbacks ///////////////////////////////////////////////////////////
Expand Down Expand Up @@ -81,7 +81,7 @@ declare namespace odbc {
cursor: boolean|string
}

class Connection {
interface Connection {

////////////////////////////////////////////////////////////////////////////
// Callbacks ///////////////////////////////////////////////////////////
Expand Down Expand Up @@ -145,7 +145,7 @@ declare namespace odbc {
close(): Promise<void>;
}

class Pool {
interface Pool {

////////////////////////////////////////////////////////////////////////////
// Callbacks ///////////////////////////////////////////////////////////
Expand Down Expand Up @@ -173,7 +173,7 @@ declare namespace odbc {
close(): Promise<void>;
}

class Cursor {
interface Cursor {
noData: boolean

////////////////////////////////////////////////////////////////////////////
Expand Down