lt-script 1.0.6 → 1.0.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.
@@ -227,8 +227,6 @@ export class LuaEmitter {
227
227
  return this.hasSideEffects(node.left) || this.hasSideEffects(node.right);
228
228
  case AST.NodeType.UnaryExpr:
229
229
  return this.hasSideEffects(node.operand);
230
- case AST.NodeType.CallExpr:
231
- return true; // Calls ALWAYS have side effects
232
230
  case AST.NodeType.TableLiteral:
233
231
  return node.fields.some(f => this.hasSideEffects(f.value) || (f.key && f.key.kind !== AST.NodeType.Identifier && this.hasSideEffects(f.key)));
234
232
  case AST.NodeType.VectorLiteral:
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Check if a given name is a known FiveM/CFX native
3
+ */
4
+ export declare function isNative(name: string): boolean;
@@ -0,0 +1,7 @@
1
+ import { NATIVE_NAMES } from './NativeNames.js';
2
+ /**
3
+ * Check if a given name is a known FiveM/CFX native
4
+ */
5
+ export function isNative(name) {
6
+ return NATIVE_NAMES.has(name);
7
+ }
@@ -0,0 +1 @@
1
+ export declare const NATIVE_NAMES: ReadonlySet<string>;