Sha256: 8191271d9d2e4b8ce62ddb81983a174e92b857f2963333a13df519d62589bc3b

Contents?: true

Size: 420 Bytes

Versions: 1

Compression:

Stored size: 420 Bytes

Contents

require 'typescript/monkey'

class Typescript::Monkey::Transformer
  def self.instance
    @instance ||= new
  end

  def self.call(input)
    instance.call(input)
  end

  def call(input)
    filename = input[:filename]
    source   = input[:data]
    context  = input[:environment].context_class.new(input)

    result = ::Typescript::Monkey::Compiler.compile(filename, source, context)
    { data: result }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
typescript-monkey-0.9.0 lib/typescript/monkey/transformer.rb