Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(types): Improve types coverage & docs for js parser #17094

Merged
merged 2 commits into from
Apr 28, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 21 additions & 1 deletion types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,15 @@ declare abstract class BasicEvaluatedExpression {
* Can this expression have side effects?
*/
couldHaveSideEffects(): boolean;
asBool(): any;
TheLarkInn marked this conversation as resolved.
Show resolved Hide resolved

/**
* Creates a boolean representation of this evaluated expression.
*/
asBool(): undefined | boolean;

/**
* Creates a nullish coalescing representation of this evaluated expression.
*/
asNullish(): undefined | boolean;
asString(): any;
setString(string?: any): BasicEvaluatedExpression;
Expand Down Expand Up @@ -10938,6 +10946,12 @@ declare interface RuntimeValueOptions {
buildDependencies?: string[];
version?: string | (() => string);
}

/**
* Helper function for joining two ranges into a single range. This is useful
* when working with AST nodes, as it allows you to combine the ranges of child nodes
* to create the range of the _parent node_.
*/
declare interface ScopeInfo {
definitions: StackedMap<string, ScopeInfo | VariableInfo>;
topLevelScope: boolean | "arrow";
Expand Down Expand Up @@ -11975,6 +11989,12 @@ declare interface SyntheticDependencyLocation {
declare const TOMBSTONE: unique symbol;
declare const TRANSITIVE: unique symbol;
declare const TRANSITIVE_ONLY: unique symbol;

/**
* Helper function for joining two ranges into a single range. This is useful
* when working with AST nodes, as it allows you to combine the ranges of child nodes
* to create the range of the _parent node_.
*/
declare interface TagInfo {
tag: any;
data: any;
Expand Down