           ex.push "          | _ -> this._#{name}ComponentPool.Pop()"
           for p in properties
             ex.push "        c.#{p.split(':')[0]} <- #{p.split(':')[0]};"
-          ex.push "        this.AddComponent(int ComponentId.#{Name}, c)"
+          ex.push "        this.AddComponent(Component.#{Name}, c)"
           ex.push ""
           ex.push "    member this.Replace#{Name}(#{params(properties)}) ="
           ex.push "        let previousComponent = if this.has#{Name} then this.#{name} else null"

          ex.push "          | _ -> this._#{name}ComponentPool.Pop()"
          for p in properties
            ex.push "        c.#{p.split(':')[0]} <- #{p.split(':')[0]};"
          ex.push "        this.ReplaceComponent(int ComponentId.#{Name}, c) |> ignore"
          ex.push "        if not(isNull(previousComponent)) then"
          ex.push "            this._#{name}ComponentPool.Push(previousComponent)"
          ex.push "        this"
          ex.push ""
          ex.push "    member this.Remove#{Name}() ="
          ex.push "        let c = this.#{name}"
          ex.push "        this.RemoveComponent(int ComponentId.#{Name}) |> ignore"
          ex.push "        this._#{name}ComponentPool.Push(c)"
          ex.push ""
          ex.push "type Matcher with "
          ex.push "    static member #{Name} with get() = Matcher.AllOf(int ComponentId.#{Name}) "
          ex.push ""
          
               
    if flags.indexOf('-x') 
      console.log sb.join('\n')
    else           
      console.log ex.join('\n')          
    
    
    # mkdirp.sync path.join(process.cwd(), 'build/')
    # fs.writeFileSync(path.join(process.cwd(), "build/#{Name}.fs"), sb.join('\n'))


    sb = []
    ex = []
    sys = {}
    
    sb.push "namespace #{config.namespace}"
    sb.push ""
    sb.push "(**"
    sb.push " * Entitas Generated Components for #{config.namespace}"
    sb.push " *"
    sb.push " * do not edit this file"
    sb.push " *)"
    sb.push ""
    sb.push "open Entitas"
    sb.push "open System"
    sb.push "open System.Collections.Generic"
    
    ex.push "module #{config.namespace}Extensions"
    ex.push ""
    ex.push "(**"
    ex.push " * Entitas Generated Extensions for #{config.namespace}"
    ex.push " *"
    ex.push " * do not edit this file"
    ex.push " *)"
    ex.push ""
    ex.push "open Entitas"
    ex.push "open #{config.namespace}"
    ex.push "open System"
    ex.push "open System.Collections.Generic"

    ###
     * Components Type Definitions
