Closed Type Exported Function Parameter

After installing version 0.8.1.1 from Typescript, I get the following error: "the exported function parameter has or uses the private type" vs "

In version 0.8.1, I had no problems. Now, even if I unistall 0.8.1.1 and reinstall the 0.8.1 problem. The code looks like this:

import vs = module("app/framework/ViewStack"); export module Framework { export class ViewStacks { public static addViewStack( id: string, idContainer: string, idParentContainer: string, idLoadingPanel: string, loaded: bool ): vs.Framework.ViewStack { } } } In another file export module Framework { export class ViewStack { } } 

The error is noted in the returned type vs .Framework.ViewStack of type addViewStack. The error indicates that vs .Framework.ViewStack is private, but it was imported according to the import clause.

By the way, I'm using Visual Studio Web Express 2012, and the compiler command: tsc --sourcemap --module amd ...

If I change the return type to any, it certainly works. Nothing has changed, and it all worked.

Each class or module that defines an exported variable with the type of the class exported by another module takes place erros.

Can you help me?

Early

+4
source share
1 answer

here is the solution http://typescript.codeplex.com/discussions/405800 , you need to "export import"

+6
source

All Articles