fix: use node: scheme for node imports

This commit is contained in:
alina 🌸 2024-04-02 03:49:03 +03:00
parent 15cb920904
commit 9491b2b1e6
Signed by: teidesu
SSH key fingerprint: SHA256:uNeCpw6aTSU4aIObXLvHfLkDa82HWH9EiOj9AXOIRpI
5 changed files with 8 additions and 6 deletions

View file

@ -2285,7 +2285,10 @@ export interface TelegramClient extends ITelegramClient {
* *
* @param params File download parameters * @param params File download parameters
*/ */
downloadAsNodeStream(location: FileDownloadLocation, params?: FileDownloadParameters): import('stream').Readable downloadAsNodeStream(
location: FileDownloadLocation,
params?: FileDownloadParameters,
): import('node:stream').Readable
/** /**
* Download a file and return it as a readable stream, * Download a file and return it as a readable stream,
* streaming file contents. * streaming file contents.

View file

@ -13,4 +13,4 @@ declare function downloadAsNodeStream(
client: ITelegramClient, client: ITelegramClient,
location: FileDownloadLocation, location: FileDownloadLocation,
params?: FileDownloadParameters, params?: FileDownloadParameters,
): import('stream').Readable ): import('node:stream').Readable

View file

@ -1,5 +1,5 @@
/* eslint-disable no-restricted-imports */ /* eslint-disable no-restricted-imports */
import type { ReadStream } from 'fs' import type { ReadStream } from 'node:fs'
import { tdFileId } from '@mtcute/file-id' import { tdFileId } from '@mtcute/file-id'
import { tl } from '@mtcute/tl' import { tl } from '@mtcute/tl'

View file

@ -1,4 +1,4 @@
import type { Worker as NodeWorker } from 'worker_threads' import type { Worker as NodeWorker } from 'node:worker_threads'
import { tl } from '@mtcute/tl' import { tl } from '@mtcute/tl'

View file

@ -1,5 +1,4 @@
import { IReferenceMessagesRepository } from '@mtcute/core' import { IReferenceMessagesRepository } from '../../../highlevel/storage/repository/ref-messages.js'
import { BaseSqliteStorageDriver } from '../driver.js' import { BaseSqliteStorageDriver } from '../driver.js'
import { ISqliteStatement } from '../types.js' import { ISqliteStatement } from '../types.js'