Skip to content

Typescript Support #10

@vgsk

Description

@vgsk

Just wondering if it would be possible for you to include typescript support into the module with examples and necessary type declaration ?

I am currently using the module and it worked just fine putting my own declaration file (.d.ts) in my earlier project (typescript 3.7.3) and the same is not working in my project (typescript 4.1.2). I am not able to use it like

import db from 'informixdb';

It give me an error even after have a declaration file informixdb.d.ts in the same directory with

declare module 'informixdb';

[undefined] uncaughtException: ⨯ Unable to compile TypeScript:
src/informix-db-connection.ts:2:16 - error TS7016: Could not find a declaration file for module 'informixdb'. '/home/vgsk/WORK/LoadBuilder/lb-api-server/node_modules/informixdb/lib/odbc.js' implicitly has an 'any' type.
Try npm i --save-dev @types/informixdb if it exists or add a new declaration (.d.ts) file containing declare module 'informixdb';

2 import db from 'informixdb';
~~~~~~~~~~~~

I have the following in the tsconfig.json

"include": [
    "src/**/*"
],    

Would appreciate it if you could help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions