pinets 0.9.5 → 0.9.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/pinets.min.browser.es.js +23 -40
- package/dist/pinets.min.browser.es.js.map +1 -1
- package/dist/pinets.min.browser.js +48 -65
- package/dist/pinets.min.browser.js.map +1 -1
- package/dist/pinets.min.cjs +23 -40
- package/dist/pinets.min.cjs.map +1 -1
- package/dist/pinets.min.es.js +45 -62
- package/dist/pinets.min.es.js.map +1 -1
- package/dist/types/Context.class.d.ts +24 -0
- package/dist/types/PineTS.class.d.ts +18 -1
- package/dist/types/errors/PineRuntimeError.d.ts +27 -0
- package/dist/types/index.d.ts +10 -1
- package/dist/types/marketData/Alpaca/AlpacaProvider.class.d.ts +115 -0
- package/dist/types/marketData/BaseProvider.d.ts +92 -0
- package/dist/types/marketData/Binance/BinanceProvider.class.d.ts +10 -12
- package/dist/types/marketData/FMP/FMPProvider.class.d.ts +69 -0
- package/dist/types/marketData/IProvider.d.ts +20 -7
- package/dist/types/marketData/Mock/MockProvider.class.d.ts +12 -29
- package/dist/types/marketData/Provider.class.d.ts +4 -1
- package/dist/types/marketData/aggregation.d.ts +38 -0
- package/dist/types/marketData/types.d.ts +106 -0
- package/dist/types/namespaces/Core.d.ts +40 -2
- package/dist/types/transpiler/analysis/ScopeManager.d.ts +4 -0
- package/dist/types/transpiler/pineToJS/codegen.d.ts +34 -1
- package/dist/types/transpiler/pineToJS/parser.d.ts +1 -0
- package/dist/types/transpiler/settings.d.ts +1 -0
- package/dist/types/transpiler/transformers/StatementTransformer.d.ts +10 -0
- package/package.json +4 -4
- package/dist/types/NaProxy.d.ts +0 -19
- package/dist/types/TimeSeries.class.d.ts +0 -49
- package/dist/types/TimeSeries.d.ts +0 -15
- package/dist/types/namespaces/Input.d.ts +0 -24
- package/dist/types/namespaces/PineArray.d.ts +0 -62
- package/dist/types/namespaces/PineColor.d.ts +0 -0
- package/dist/types/namespaces/PineMath.d.ts +0 -28
- package/dist/types/namespaces/PineRequest.d.ts +0 -8
- package/dist/types/namespaces/Plot.helper.d.ts +0 -16
- package/dist/types/namespaces/TechnicalAnalysis.d.ts +0 -30
- package/dist/types/namespaces/request/types/barmerge.type.d.ts +0 -7
- package/dist/types/namespaces/strategy/StrategySimulator.d.ts +0 -84
- package/dist/types/namespaces/strategy/closedtrades/index.d.ts +0 -18
- package/dist/types/namespaces/strategy/methods/any.d.ts +0 -5
- package/dist/types/namespaces/strategy/methods/cancel.d.ts +0 -1
- package/dist/types/namespaces/strategy/methods/cancel_all.d.ts +0 -1
- package/dist/types/namespaces/strategy/methods/cash.d.ts +0 -5
- package/dist/types/namespaces/strategy/methods/close.d.ts +0 -1
- package/dist/types/namespaces/strategy/methods/close_all.d.ts +0 -1
- package/dist/types/namespaces/strategy/methods/closedtrades.d.ts +0 -4
- package/dist/types/namespaces/strategy/methods/entry.d.ts +0 -3
- package/dist/types/namespaces/strategy/methods/equity.d.ts +0 -4
- package/dist/types/namespaces/strategy/methods/exit.d.ts +0 -3
- package/dist/types/namespaces/strategy/methods/fixed.d.ts +0 -5
- package/dist/types/namespaces/strategy/methods/long.d.ts +0 -4
- package/dist/types/namespaces/strategy/methods/netprofit.d.ts +0 -4
- package/dist/types/namespaces/strategy/methods/opentrades.d.ts +0 -4
- package/dist/types/namespaces/strategy/methods/order.d.ts +0 -6
- package/dist/types/namespaces/strategy/methods/param.d.ts +0 -5
- package/dist/types/namespaces/strategy/methods/percent_of_equity.d.ts +0 -5
- package/dist/types/namespaces/strategy/methods/position_avg_price.d.ts +0 -5
- package/dist/types/namespaces/strategy/methods/position_entry.d.ts +0 -5
- package/dist/types/namespaces/strategy/methods/position_entry_name.d.ts +0 -5
- package/dist/types/namespaces/strategy/methods/position_size.d.ts +0 -5
- package/dist/types/namespaces/strategy/methods/short.d.ts +0 -4
- package/dist/types/namespaces/strategy/models/Order.d.ts +0 -31
- package/dist/types/namespaces/strategy/models/Position.d.ts +0 -16
- package/dist/types/namespaces/strategy/models/Trade.d.ts +0 -45
- package/dist/types/namespaces/strategy/opentrades/index.d.ts +0 -10
- package/dist/types/namespaces/strategy/risk/index.d.ts +0 -11
- package/dist/types/namespaces/strategy/strategy.index.d.ts +0 -53
- package/dist/types/namespaces/strategy/types.d.ts +0 -92
- package/dist/types/namespaces/strategy/utils.d.ts +0 -28
- package/dist/types/namespaces/ta/getters/obv.d.ts +0 -12
- package/dist/types/namespaces/ta/getters/tr.d.ts +0 -1
- package/dist/types/transpiler/ScopeManager.class.d.ts +0 -36
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Series } from '../../../Series';
|
|
2
|
-
export declare class ClosedTradesAccessor {
|
|
3
|
-
private context;
|
|
4
|
-
constructor(context: any);
|
|
5
|
-
private getSimulator;
|
|
6
|
-
get first_index(): number;
|
|
7
|
-
size(tradeNum: number | Series): number;
|
|
8
|
-
profit(tradeNum: number | Series): number;
|
|
9
|
-
profit_percent(tradeNum: number | Series): number;
|
|
10
|
-
entry_price(tradeNum: number | Series): number;
|
|
11
|
-
exit_price(tradeNum: number | Series): number;
|
|
12
|
-
entry_bar_index(tradeNum: number | Series): number;
|
|
13
|
-
exit_bar_index(tradeNum: number | Series): number;
|
|
14
|
-
commission(tradeNum: number | Series): number;
|
|
15
|
-
[Symbol.toPrimitive](hint: string): number | string;
|
|
16
|
-
valueOf(): number;
|
|
17
|
-
toString(): string;
|
|
18
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function cancel(context: any): (id: string) => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function cancel_all(context: any): () => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function close(context: any): (id?: string, comment?: string) => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function close_all(context: any): (comment?: string) => void;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Order } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* Places a basic order
|
|
4
|
-
* Usage: strategy.order(id, direction, qty=na, limit=na, stop=na, ...)
|
|
5
|
-
*/
|
|
6
|
-
export declare function order(context: any): (id: any, direction: any, qty?: any, limit?: any, stop?: any, ...rest: any[]) => Order;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
export interface OrderData {
|
|
2
|
-
id: string;
|
|
3
|
-
type: 'entry' | 'exit' | 'order';
|
|
4
|
-
direction?: 'long' | 'short';
|
|
5
|
-
fromEntry?: string;
|
|
6
|
-
qty: number;
|
|
7
|
-
limit?: number;
|
|
8
|
-
stop?: number;
|
|
9
|
-
ocaName?: string;
|
|
10
|
-
ocaType?: 'cancel' | 'reduce' | 'none';
|
|
11
|
-
comment?: string;
|
|
12
|
-
status: 'pending' | 'filled' | 'cancelled';
|
|
13
|
-
}
|
|
14
|
-
export declare class Order implements OrderData {
|
|
15
|
-
id: string;
|
|
16
|
-
type: 'entry' | 'exit' | 'order';
|
|
17
|
-
qty: number;
|
|
18
|
-
direction?: 'long' | 'short';
|
|
19
|
-
fromEntry?: string;
|
|
20
|
-
limit?: number;
|
|
21
|
-
stop?: number;
|
|
22
|
-
ocaName?: string;
|
|
23
|
-
ocaType?: 'cancel' | 'reduce' | 'none';
|
|
24
|
-
comment?: string;
|
|
25
|
-
status: 'pending' | 'filled' | 'cancelled';
|
|
26
|
-
constructor(id: string, type: 'entry' | 'exit' | 'order', qty: number, direction?: 'long' | 'short', fromEntry?: string, limit?: number, stop?: number, ocaName?: string, ocaType?: 'cancel' | 'reduce' | 'none', comment?: string);
|
|
27
|
-
checkFill(currentPrice: number, high: number, low: number): boolean;
|
|
28
|
-
getFillPrice(currentPrice: number, high: number, low: number): number;
|
|
29
|
-
cancel(): void;
|
|
30
|
-
fill(): void;
|
|
31
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export declare class Position {
|
|
2
|
-
entryId: string;
|
|
3
|
-
direction: 'long' | 'short';
|
|
4
|
-
entryComment?: string;
|
|
5
|
-
entryBarIndex?: number;
|
|
6
|
-
entryTime?: number;
|
|
7
|
-
size: number;
|
|
8
|
-
avgPrice: number;
|
|
9
|
-
unrealizedProfit: number;
|
|
10
|
-
unrealizedProfitPercent: number;
|
|
11
|
-
constructor(entryId: string, direction: 'long' | 'short', entryPrice: number, entrySize: number, entryComment?: string, entryBarIndex?: number, entryTime?: number);
|
|
12
|
-
addEntry(price: number, size: number): void;
|
|
13
|
-
removeExit(size: number): void;
|
|
14
|
-
updateProfit(currentPrice: number): void;
|
|
15
|
-
isOpen(): boolean;
|
|
16
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
export interface TradeData {
|
|
2
|
-
id: string;
|
|
3
|
-
entryId: string;
|
|
4
|
-
entryBarIndex: number;
|
|
5
|
-
entryTime: number;
|
|
6
|
-
entryPrice: number;
|
|
7
|
-
exitBarIndex?: number;
|
|
8
|
-
exitTime?: number;
|
|
9
|
-
exitPrice?: number;
|
|
10
|
-
size: number;
|
|
11
|
-
direction: 'long' | 'short';
|
|
12
|
-
entryComment?: string;
|
|
13
|
-
exitComment?: string;
|
|
14
|
-
commission: number;
|
|
15
|
-
maxDrawdown: number;
|
|
16
|
-
maxRunup: number;
|
|
17
|
-
closed: boolean;
|
|
18
|
-
}
|
|
19
|
-
export declare class Trade implements TradeData {
|
|
20
|
-
entryId: string;
|
|
21
|
-
direction: 'long' | 'short';
|
|
22
|
-
entryPrice: number;
|
|
23
|
-
size: number;
|
|
24
|
-
entryComment?: string;
|
|
25
|
-
entryBarIndex: number;
|
|
26
|
-
entryTime: number;
|
|
27
|
-
commission: number;
|
|
28
|
-
id: string;
|
|
29
|
-
exitPrice?: number;
|
|
30
|
-
exitTime?: number;
|
|
31
|
-
exitBarIndex?: number;
|
|
32
|
-
exitComment?: string;
|
|
33
|
-
exitId?: string;
|
|
34
|
-
closed: boolean;
|
|
35
|
-
maxDrawdown: number;
|
|
36
|
-
maxRunup: number;
|
|
37
|
-
constructor(entryId: string, direction: 'long' | 'short', entryPrice: number, size: number, entryComment?: string, entryBarIndex?: number, entryTime?: number, commission?: number);
|
|
38
|
-
close(exitPrice: number, exitSize: number, exitId?: string, exitComment?: string, exitBarIndex?: number, exitTime?: number): void;
|
|
39
|
-
get profit(): number;
|
|
40
|
-
get profitPercent(): number;
|
|
41
|
-
get maxDrawdownPercent(): number;
|
|
42
|
-
get maxRunupPercent(): number;
|
|
43
|
-
updateMaxDrawdown(currentPrice: number): void;
|
|
44
|
-
updateMaxRunup(currentPrice: number): void;
|
|
45
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Series } from '../../../Series';
|
|
2
|
-
export declare class OpenTradesAccessor {
|
|
3
|
-
private context;
|
|
4
|
-
constructor(context: any);
|
|
5
|
-
private getSimulator;
|
|
6
|
-
size(tradeNum: number | Series): number;
|
|
7
|
-
profit(tradeNum: number | Series): number;
|
|
8
|
-
entry_price(tradeNum: number | Series): number;
|
|
9
|
-
entry_bar_index(tradeNum: number | Series): number;
|
|
10
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare class RiskManager {
|
|
2
|
-
private context;
|
|
3
|
-
constructor(context: any);
|
|
4
|
-
private getSimulator;
|
|
5
|
-
allow_entry_in(direction: 'all' | 'long' | 'short'): void;
|
|
6
|
-
max_drawdown(value: number, percent?: boolean): void;
|
|
7
|
-
max_position_size(maxSize: number, positionType?: 'long' | 'short'): void;
|
|
8
|
-
max_intraday_loss(maxLoss: number): void;
|
|
9
|
-
max_cons_loss_days(maxDays: number): void;
|
|
10
|
-
max_intraday_filled_orders(maxOrders: number): void;
|
|
11
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
export type { StrategyConfig, StrategyState, Trade, Order, Position } from './types';
|
|
2
|
-
import { any } from './methods/any';
|
|
3
|
-
import { order } from './methods/order';
|
|
4
|
-
import { param } from './methods/param';
|
|
5
|
-
import { opentrades } from './methods/opentrades';
|
|
6
|
-
import { closedtrades } from './methods/closedtrades';
|
|
7
|
-
import { netprofit } from './methods/netprofit';
|
|
8
|
-
import { position_size } from './methods/position_size';
|
|
9
|
-
import { position_avg_price } from './methods/position_avg_price';
|
|
10
|
-
import { position_entry } from './methods/position_entry';
|
|
11
|
-
import { equity } from './methods/equity';
|
|
12
|
-
import { long } from './methods/long';
|
|
13
|
-
import { short } from './methods/short';
|
|
14
|
-
import { cash } from './methods/cash';
|
|
15
|
-
import { percent_of_equity } from './methods/percent_of_equity';
|
|
16
|
-
import { fixed } from './methods/fixed';
|
|
17
|
-
declare const methods: {
|
|
18
|
-
any: typeof any;
|
|
19
|
-
order: typeof order;
|
|
20
|
-
param: typeof param;
|
|
21
|
-
opentrades: typeof opentrades;
|
|
22
|
-
closedtrades: typeof closedtrades;
|
|
23
|
-
netprofit: typeof netprofit;
|
|
24
|
-
position_size: typeof position_size;
|
|
25
|
-
position_avg_price: typeof position_avg_price;
|
|
26
|
-
position_entry: typeof position_entry;
|
|
27
|
-
equity: typeof equity;
|
|
28
|
-
long: typeof long;
|
|
29
|
-
short: typeof short;
|
|
30
|
-
cash: typeof cash;
|
|
31
|
-
percent_of_equity: typeof percent_of_equity;
|
|
32
|
-
fixed: typeof fixed;
|
|
33
|
-
};
|
|
34
|
-
export declare class Strategy {
|
|
35
|
-
private context;
|
|
36
|
-
any: ReturnType<typeof methods.any>;
|
|
37
|
-
order: ReturnType<typeof methods.order>;
|
|
38
|
-
param: ReturnType<typeof methods.param>;
|
|
39
|
-
opentrades: ReturnType<typeof methods.opentrades>;
|
|
40
|
-
closedtrades: ReturnType<typeof methods.closedtrades>;
|
|
41
|
-
netprofit: ReturnType<typeof methods.netprofit>;
|
|
42
|
-
position_size: ReturnType<typeof methods.position_size>;
|
|
43
|
-
position_avg_price: ReturnType<typeof methods.position_avg_price>;
|
|
44
|
-
position_entry: ReturnType<typeof methods.position_entry>;
|
|
45
|
-
equity: ReturnType<typeof methods.equity>;
|
|
46
|
-
long: ReturnType<typeof methods.long>;
|
|
47
|
-
short: ReturnType<typeof methods.short>;
|
|
48
|
-
cash: ReturnType<typeof methods.cash>;
|
|
49
|
-
percent_of_equity: ReturnType<typeof methods.percent_of_equity>;
|
|
50
|
-
fixed: ReturnType<typeof methods.fixed>;
|
|
51
|
-
constructor(context: any);
|
|
52
|
-
}
|
|
53
|
-
export default Strategy;
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Strategy configuration options
|
|
3
|
-
*/
|
|
4
|
-
export interface StrategyConfig {
|
|
5
|
-
title: string;
|
|
6
|
-
shorttitle?: string;
|
|
7
|
-
overlay: boolean;
|
|
8
|
-
format?: string;
|
|
9
|
-
precision?: number;
|
|
10
|
-
scale?: string;
|
|
11
|
-
pyramiding?: number;
|
|
12
|
-
calc_on_order_fills?: boolean;
|
|
13
|
-
calc_on_every_tick?: boolean;
|
|
14
|
-
max_bars_back?: number;
|
|
15
|
-
backtest_fill_limits_assumption?: number;
|
|
16
|
-
default_qty_type?: string;
|
|
17
|
-
default_qty_value?: number;
|
|
18
|
-
initial_capital?: number;
|
|
19
|
-
currency?: string;
|
|
20
|
-
slippage?: number;
|
|
21
|
-
commission_type?: string;
|
|
22
|
-
commission_value?: number;
|
|
23
|
-
margin_long?: number;
|
|
24
|
-
margin_short?: number;
|
|
25
|
-
explicit_plot_zorder?: boolean;
|
|
26
|
-
max_lines_count?: number;
|
|
27
|
-
max_labels_count?: number;
|
|
28
|
-
max_boxes_count?: number;
|
|
29
|
-
max_polylines_count?: number;
|
|
30
|
-
risk_free_rate?: number;
|
|
31
|
-
use_bar_magnifier?: boolean;
|
|
32
|
-
fill_orders_on_standard_ohlc?: boolean;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Trade object representing an individual trade
|
|
36
|
-
*/
|
|
37
|
-
export interface Trade {
|
|
38
|
-
id: string;
|
|
39
|
-
entryId: string;
|
|
40
|
-
direction: number;
|
|
41
|
-
qty: number;
|
|
42
|
-
entryPrice: number;
|
|
43
|
-
entryBar: number;
|
|
44
|
-
entryTime: number;
|
|
45
|
-
exitPrice?: number;
|
|
46
|
-
exitBar?: number;
|
|
47
|
-
exitTime?: number;
|
|
48
|
-
profit?: number;
|
|
49
|
-
status: 'open' | 'closed';
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Order object representing a pending or filled order
|
|
53
|
-
*/
|
|
54
|
-
export interface Order {
|
|
55
|
-
id: string;
|
|
56
|
-
direction: number | string;
|
|
57
|
-
qty: number;
|
|
58
|
-
type: 'market' | 'limit' | 'stop' | 'stop-limit';
|
|
59
|
-
limitPrice?: number;
|
|
60
|
-
stopPrice?: number;
|
|
61
|
-
bar: number;
|
|
62
|
-
time: number;
|
|
63
|
-
fillPrice?: number;
|
|
64
|
-
fillBar?: number;
|
|
65
|
-
fillTime?: number;
|
|
66
|
-
status: 'pending' | 'filled' | 'cancelled';
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Position tracking
|
|
70
|
-
*/
|
|
71
|
-
export interface Position {
|
|
72
|
-
size: number;
|
|
73
|
-
avgPrice: number;
|
|
74
|
-
direction: number;
|
|
75
|
-
entryBar: number;
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Strategy state stored in context
|
|
79
|
-
*/
|
|
80
|
-
export interface StrategyState {
|
|
81
|
-
config: StrategyConfig;
|
|
82
|
-
trades: Trade[];
|
|
83
|
-
openTrades: Trade[];
|
|
84
|
-
closedTrades: Trade[];
|
|
85
|
-
position: Position;
|
|
86
|
-
equity: number;
|
|
87
|
-
netProfit: number;
|
|
88
|
-
grossProfit: number;
|
|
89
|
-
grossLoss: number;
|
|
90
|
-
pendingOrders: Order[];
|
|
91
|
-
initialCapital: number;
|
|
92
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Parse strategy() function arguments
|
|
3
|
-
*/
|
|
4
|
-
export declare function parseStrategyOptions(args: any[]): any;
|
|
5
|
-
/**
|
|
6
|
-
* Calculate order quantity based on strategy configuration
|
|
7
|
-
*/
|
|
8
|
-
export declare function calculateOrderQty(context: any, specifiedQty: number | undefined, direction: number, fillPrice: number): number;
|
|
9
|
-
/**
|
|
10
|
-
* Process pending orders and execute them
|
|
11
|
-
*/
|
|
12
|
-
export declare function processStrategyOrders(context: any): void;
|
|
13
|
-
/**
|
|
14
|
-
* Parse direction string/number to numeric value
|
|
15
|
-
*/
|
|
16
|
-
export declare function parseDirection(direction: number | string): number;
|
|
17
|
-
/**
|
|
18
|
-
* Open a new trade
|
|
19
|
-
*/
|
|
20
|
-
export declare function openTrade(context: any, entryId: string, direction: number, qty: number, price: number, time: number): void;
|
|
21
|
-
/**
|
|
22
|
-
* Close partial or full position
|
|
23
|
-
*/
|
|
24
|
-
export declare function closePartialPosition(context: any, qtyToClose: number, exitPrice: number, exitTime: number): void;
|
|
25
|
-
/**
|
|
26
|
-
* Initialize strategy state
|
|
27
|
-
*/
|
|
28
|
-
export declare function initializeStrategy(context: any, config: any): void;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* On-Balance Volume (OBV)
|
|
3
|
-
* Cumulative indicator that adds volume on up days and subtracts on down days
|
|
4
|
-
*
|
|
5
|
-
* Logic:
|
|
6
|
-
* - If close > close[1]: OBV = OBV[1] + volume
|
|
7
|
-
* - If close < close[1]: OBV = OBV[1] - volume
|
|
8
|
-
* - If close == close[1]: OBV = OBV[1]
|
|
9
|
-
*
|
|
10
|
-
* Note: OBV starts at 0 on the first bar (when there's no previous close to compare)
|
|
11
|
-
*/
|
|
12
|
-
export declare function obv(context: any): () => any;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function tr(context: any): () => number;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
export declare class ScopeManager {
|
|
2
|
-
private scopes;
|
|
3
|
-
private scopeTypes;
|
|
4
|
-
private scopeCounts;
|
|
5
|
-
private contextBoundVars;
|
|
6
|
-
private arrayPatternElements;
|
|
7
|
-
private rootParams;
|
|
8
|
-
private varKinds;
|
|
9
|
-
private loopVars;
|
|
10
|
-
private loopVarNames;
|
|
11
|
-
private paramIdCounter;
|
|
12
|
-
private cacheIdCounter;
|
|
13
|
-
private tempVarCounter;
|
|
14
|
-
private taCallIdCounter;
|
|
15
|
-
get nextParamIdArg(): any;
|
|
16
|
-
get nextCacheIdArg(): any;
|
|
17
|
-
getNextTACallId(): any;
|
|
18
|
-
constructor();
|
|
19
|
-
pushScope(type: string): void;
|
|
20
|
-
popScope(): void;
|
|
21
|
-
getCurrentScopeType(): string;
|
|
22
|
-
getCurrentScopeCount(): number;
|
|
23
|
-
addContextBoundVar(name: string, isRootParam?: boolean): void;
|
|
24
|
-
removeContextBoundVar(name: any): void;
|
|
25
|
-
addArrayPatternElement(name: string): void;
|
|
26
|
-
isContextBound(name: string): boolean;
|
|
27
|
-
isArrayPatternElement(name: string): boolean;
|
|
28
|
-
isRootParam(name: string): boolean;
|
|
29
|
-
addLoopVariable(originalName: string, transformedName: string): void;
|
|
30
|
-
getLoopVariableName(name: string): string | undefined;
|
|
31
|
-
isLoopVariable(name: string): boolean;
|
|
32
|
-
addVariable(name: string, kind: string): string;
|
|
33
|
-
getVariable(name: string): [string, string];
|
|
34
|
-
generateTempVar(): string;
|
|
35
|
-
}
|
|
36
|
-
export default ScopeManager;
|