<commit_before>require "language/node"

class Typescript < Formula
  desc "Language for application scale JavaScript development"
  homepage "http://typescriptlang.org/"
  url "https://registry.npmjs.org/typescript/-/typescript-2.8.4.tgz"
  sha256 "8d68caa85da66160b0f189b042f40e4ea73955b344283c2e0c78585b794edd22"
  head "https://github.com/Microsoft/TypeScript.git"

  bottle do
    cellar :any_skip_relocation
    sha256 "740d212dd804a4f7a798a26aee18b2b61acc70d09c751ff02caf818ac8596810" => :high_sierra
    sha256 "88128dd7bce3387eacf00a83d162582deba78ac587d5c780b9ca3b282b8066b2" => :sierra
    sha256 "7e5af0f06f13d679a8183272fb35d60b6fefab452421fc2ed7d400c466c26843" => :el_capitan
  end

  depends_on "node"

  def install
    system "npm", "install", *Language::Node.std_npm_install_args(libexec)
    bin.install_symlink Dir["#{libexec}/bin/*"]
  end

  test do
    (testpath/"test.ts").write <<~EOS
      class Test {
        greet() {
          return "Hello, world!";
        }
      };
      var test = new Test();
      document.body.innerHTML = test.greet();
    EOS

    system bin/"tsc", "test.ts"
    assert_predicate testpath/"test.js", :exist?, "test.js was not generated"
  end
end
<commit_msg>typescript: update 2.8.4 bottle for Linuxbrew.<commit_after>require "language/node"

class Typescript < Formula
  desc "Language for application scale JavaScript development"
  homepage "http://typescriptlang.org/"
  url "https://registry.npmjs.org/typescript/-/typescript-2.8.4.tgz"
  sha256 "8d68caa85da66160b0f189b042f40e4ea73955b344283c2e0c78585b794edd22"
  head "https://github.com/Microsoft/TypeScript.git"

  bottle do
    cellar :any_skip_relocation
    sha256 "740d212dd804a4f7a798a26aee18b2b61acc70d09c751ff02caf818ac8596810" => :high_sierra
    sha256 "88128dd7bce3387eacf00a83d162582deba78ac587d5c780b9ca3b282b8066b2" => :sierra
    sha256 "7e5af0f06f13d679a8183272fb35d60b6fefab452421fc2ed7d400c466c26843" => :el_capitan
    sha256 "3eb79390e4cfedcf264a967a410faff66a491bd8d29ec67fd5c45e999daf36b5" => :x86_64_linux
  end

  depends_on "node"

  def install
    system "npm", "install", *Language::Node.std_npm_install_args(libexec)
    bin.install_symlink Dir["#{libexec}/bin/*"]
  end

  test do
    (testpath/"test.ts").write <<~EOS
      class Test {
        greet() {
          return "Hello, world!";
        }
      };
      var test = new Test();
      document.body.innerHTML = test.greet();
    EOS

    system bin/"tsc", "test.ts"
    assert_predicate testpath/"test.js", :exist?, "test.js was not generated"
  end
end

{'fraction_non_alphanumeric': 0.10828772478498827, 'fraction_numerical': 0.15676309616888193, 'mean_word_length': 4.107784431137724, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 10, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '619314', 'n_tokens_mistral': 1222, 'n_tokens_neox': 998, 'n_words': 156}