Typescript support for RenderPipeline

Add typescript support for RenderPipeline.
Bugs fixing.