File tree Expand file tree Collapse file tree
docs-starlight/src/content/docs/sdks Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11---
22title : Javascript/Typescript SDK
33---
4+
5+ import { Code } from ' @astrojs/starlight/components' ;
6+ import { Tabs , TabItem } from ' @astrojs/starlight/components' ;
7+
8+ Absurd SQLite provides first class support for Javascript and Typescript through the <a href = " https://www.npmjs.com/package/@absurd-sqlite/sdk" target = " _blank" >typescript</a > SDK.
9+
10+ ## Installation
11+
12+ <Tabs defaultValue = " npm" class = " mb-4" syncKey = " packageManager" >
13+ <TabItem value = " npm" label = " npm" >
14+ ``` bash
15+ npm install @absurd-sqlite/sdk
16+ ```
17+ </TabItem >
18+ <TabItem value = " yarn" label = " yarn" >
19+ ``` bash
20+ yarn add @absurd-sqlite/sdk
21+ ```
22+ </TabItem >
23+ <TabItem value = " bun" label = " bun" >
24+ ``` bash
25+ bun add @absurd-sqlite/sdk
26+ ```
27+ </TabItem >
28+ </Tabs >
29+
30+ ## Usages
31+
32+ ### Basic Usage
33+
34+ See [ here] ( https://github.com/b4fun/absurd-sqlite/blob/main/samples/typescript-client/src/index.ts ) .
35+
36+ { /* TODO: embed sample here */ }
37+
38+ ### Downloading Extension
39+
40+ <Tabs defaultValue = " typescript" class = " mb-4" syncKey = " lang" >
41+ <TabItem value = " typescript" label = " TypeScript" >
42+ ``` typescript
43+ import { downloadAbsurdSQLiteExtension } from ' @absurd-sqlite/sdk/fs' ;
44+
45+ const extensionPath = await downloadAbsurdSQLiteExtension ();
46+ console .log (` Extension downloaded to: ${extensionPath } ` );
47+ ```
48+ </TabItem >
49+ <TabItem value = " javascript" label = " JavaScript" >
50+ ``` javascript
51+ import { downloadAbsurdSQLiteExtension } from ' @absurd-sqlite/sdk/fs' ;
52+
53+ const extensionPath = await downloadAbsurdSQLiteExtension ();
54+ console .log (` Extension downloaded to: ${ extensionPath} ` );
55+ ```
56+ </TabItem >
57+ </Tabs >
You can’t perform that action at this time.
0 commit comments