Skip to content

NodeJS API TypeScript types #1599

Open
Open
@Petah

Description

@Petah

Is there a way to use the NodeJS API with TypeScript and have correct typing?

[{
	"resource": "/Users/me/genai-ts/index.ts",
	"owner": "typescript",
	"code": "7016",
	"severity": 8,
	"message": "Could not find a declaration file for module 'genaiscript/api'. '/Users/me/genai-ts/node_modules/genaiscript/built/api.mjs' implicitly has an 'any' type.\n  Try `npm i --save-dev @types/genaiscript` if it exists or add a new declaration (.d.ts) file containing `declare module 'genaiscript/api';`",
	"source": "ts",
	"startLineNumber": 1,
	"startColumn": 21,
	"endLineNumber": 1,
	"endColumn": 38
}]
Image

I didn't see any info on it in the docs here https://microsoft.github.io/genaiscript/reference/api/

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