private FlagedType ResolveType(TypeScriptContext context, string name) { var e = new TypeResolveEventArgs(name); e.Type = context.ResolveType(name, n => ResolveType(context, n)); TypeResolved?.Invoke(this, e); if (e.Type.Type == null) { throw new ArgumentException(string.Format("'{0}'が解決できませんでした。", name)); } return(e.Type); }