Compare commits

...

1 Commits

Author SHA1 Message Date
Ruben Fiszel
0ca4ec9d32 all 2023-12-12 18:13:48 +01:00
3 changed files with 31 additions and 1 deletions

View File

@@ -14,6 +14,7 @@
"@popperjs/core": "^2.11.6",
"@redocly/json-to-json-schema": "^0.0.1",
"@tanstack/svelte-table": "^8.9.9",
"@typescript/ata": "^0.9.4",
"ag-grid-community": "^31.0.0",
"ag-grid-enterprise": "^31.0.0",
"ansi_up": "^5.2.1",
@@ -1618,6 +1619,14 @@
"url": "https://opencollective.com/typescript-eslint"
}
},
"node_modules/@typescript/ata": {
"version": "0.9.4",
"resolved": "https://registry.npmjs.org/@typescript/ata/-/ata-0.9.4.tgz",
"integrity": "sha512-PaJ16WouPV/SaA+c0tnOKIqYq24+m93ipl/e0Dkxuianer+ibc5b0/6ZgfCFF8J7QEp57dySMSP9nWOFaCfJnw==",
"peerDependencies": {
"typescript": "^4.4.4"
}
},
"node_modules/@ungap/structured-clone": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz",
@@ -9066,7 +9075,6 @@
"version": "5.2.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz",
"integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==",
"dev": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"

View File

@@ -71,6 +71,9 @@
"yootils": "^0.3.1"
},
"overrides": {
"@typescript/ata": {
"typescript": "$typescript"
},
"@rgossiaux/svelte-headlessui": {
"svelte": "$svelte"
},
@@ -97,6 +100,7 @@
"@popperjs/core": "^2.11.6",
"@redocly/json-to-json-schema": "^0.0.1",
"@tanstack/svelte-table": "^8.9.9",
"@typescript/ata": "^0.9.4",
"ag-grid-community": "^31.0.0",
"ag-grid-enterprise": "^31.0.0",
"ansi_up": "^5.2.1",

View File

@@ -33,6 +33,7 @@
import { CloseAction, ErrorAction, RequestType, NotificationType } from 'vscode-languageclient'
import { MonacoBinding } from 'y-monaco'
import { dbSchemas, type DBSchema, copilotInfo, codeCompletionSessionEnabled } from '$lib/stores'
import { setupTypeAcquisition } from '@typescript/ata'
import {
createHash as randomHash,
@@ -747,6 +748,23 @@
}
)
} else if (lang === 'typescript' && scriptLang !== 'deno') {
ata = setupTypeAcquisition({
projectName: 'TypeScript Playground',
typescript: ts,
logger: console,
delegate: {
receivedFile: addLibraryToRuntime,
progress: (downloaded: number, total: number) => {
// console.log({ dl, ttl })
},
started: () => {
console.log('ATA start')
},
finished: (f) => {
console.log('ATA done')
}
}
})
await connectToLanguageServer(
`${wsProtocol}://${window.location.host}/ws/bun`,
'bun',