feat(web)!: remove deprecated functions

This commit is contained in:
Amaan Qureshi 2025-09-11 03:11:16 -04:00 committed by Amaan Qureshi
parent d60ef9ad0a
commit 580cd9541a
7 changed files with 8 additions and 94 deletions

View file

@ -2,7 +2,6 @@ import { C, INTERNAL, Internal, assertInternal, SIZE_OF_INT, SIZE_OF_SHORT } fro
import { LookaheadIterator } from './lookahead_iterator';
import { unmarshalLanguageMetadata } from './marshal';
import { TRANSFER_BUFFER } from './parser';
import { Query } from './query';
const LANGUAGE_FUNCTION_REGEX = /^tree_sitter_\w+$/;
@ -63,14 +62,6 @@ export class Language {
return C.UTF8ToString(ptr);
}
/**
* @deprecated since version 0.25.0, use {@link Language#abiVersion} instead
* Gets the version of the language.
*/
get version(): number {
return C._ts_language_version(this[0]);
}
/**
* Gets the ABI version of the language.
*/
@ -232,23 +223,6 @@ export class Language {
return null;
}
/**
* @deprecated since version 0.25.0, call `new` on a {@link Query} instead
*
* Create a new query from a string containing one or more S-expression
* patterns.
*
* The query is associated with a particular language, and can only be run
* on syntax nodes parsed with that language. References to Queries can be
* shared between multiple threads.
*
* @link {@see https://tree-sitter.github.io/tree-sitter/using-parsers/queries}
*/
query(source: string): Query {
console.warn('Language.query is deprecated. Use new Query(language, source) instead.');
return new Query(this, source);
}
/**
* Load a language from a WebAssembly module.
* The module can be provided as a path to a file or as a buffer.