surrealdb / surrealdb.js

SurrealDB SDK for JavaScript
https://surrealdb.com
Apache License 2.0
272 stars 45 forks source link

Feature: Export types used in module #208

Closed OTheNonE closed 2 months ago

OTheNonE commented 5 months ago

Is your feature request related to a problem?

I want to use some of the SurrealDB.js types to define functions, in this case specifically the LiveQueryResponse. I find myself having to re-create the types in order to define type-safe functions using the module.

Describe the solution

Export the types as following:

import { Surreal, type LiveQueryResponse } from "surrealdb.js";

Alternative methods

Creating the types myself...

SurrealDB version

surreal 1.1.1

SurrealDB.js version

v0.11.0

Contact Details

olavnon@gmail.com

Is there an existing issue for this?

Code of Conduct

kearfy commented 2 months ago

This should be resolved by #227