How to use the @dataform/core/utils.isResolvable function in @dataform/core

To help you get started, we’ve selected a few @dataform/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dataform-co / dataform / core / table.ts View on Github external
public dependencies(value: Resolvable | Resolvable[]) {
    const newDependencies = utils.isResolvable(value) ? [value] : (value as Resolvable[]);
    newDependencies.forEach((d: Resolvable) => {
      // TODO: This code fails to function correctly if the inline table has not yet
      // been attached to the session. This code probably needs to be moved to compile().
      const allResolved = this.session.findActions(d);
      const resolved = allResolved.length > 0 ? allResolved[0] : undefined;
      if (!!resolved && resolved instanceof Table && resolved.proto.type === "inline") {
        resolved.proto.dependencies.forEach(childDep => this.addDependency(childDep));
      } else {
        this.addDependency(d);
      }
    });
    return this;
  }
github dataform-co / dataform / core / assertion.ts View on Github external
public dependencies(value: Resolvable | Resolvable[]) {
    const newDependencies = utils.isResolvable(value) ? [value] : (value as Resolvable[]);
    newDependencies.forEach((d: Resolvable) => {
      const depName = utils.stringifyResolvable(d);
      if (this.proto.dependencies.indexOf(depName) < 0) {
        this.proto.dependencies.push(depName);
      }
    });
    return this;
  }
github dataform-co / dataform / core / operation.ts View on Github external
public dependencies(value: Resolvable | Resolvable[]) {
    const newDependencies = utils.isResolvable(value) ? [value] : (value as Resolvable[]);
    newDependencies.forEach((d: Resolvable) => {
      const depName = utils.stringifyResolvable(d);
      if (this.proto.dependencies.indexOf(depName) < 0) {
        this.proto.dependencies.push(depName);
      }
    });
    return this;
  }