public TypeScriptResolver(ICompilation compilation) { if (compilation == null) throw new ArgumentNullException("compilation"); this.compilation = compilation; this.conversions = TypeScriptConversions.Get(compilation); this.context = new TypeScriptTypeResolveContext(compilation.MainAssembly); var pc = compilation.MainAssembly.UnresolvedAssembly as TypeScriptProjectContent; if (pc != null) { this.checkForOverflow = pc.CompilerSettings.CheckForOverflow; } }
private TypeScriptResolver(ICompilation compilation, TypeScriptConversions conversions, TypeScriptTypeResolveContext context, bool checkForOverflow, bool isWithinLambdaExpression, TypeDefinitionCache currentTypeDefinitionCache, ImmutableStack<IVariable> localVariableStack, ObjectInitializerContext objectInitializerStack) { this.compilation = compilation; this.conversions = conversions; this.context = context; this.checkForOverflow = checkForOverflow; this.isWithinLambdaExpression = isWithinLambdaExpression; this.currentTypeDefinitionCache = currentTypeDefinitionCache; this.localVariableStack = localVariableStack; this.objectInitializerStack = objectInitializerStack; }
public TypeScriptResolver(TypeScriptTypeResolveContext context) { if (context == null) throw new ArgumentNullException("context"); this.compilation = context.Compilation; this.conversions = TypeScriptConversions.Get(compilation); this.context = context; if (context.CurrentTypeDefinition != null) currentTypeDefinitionCache = new TypeDefinitionCache(context.CurrentTypeDefinition); }