當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript JavaScriptEmitter.emitStatements方法代碼示例

本文整理匯總了TypeScript中@angular/compiler/src/output/js_emitter.JavaScriptEmitter.emitStatements方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript JavaScriptEmitter.emitStatements方法的具體用法?TypeScript JavaScriptEmitter.emitStatements怎麽用?TypeScript JavaScriptEmitter.emitStatements使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在@angular/compiler/src/output/js_emitter.JavaScriptEmitter的用法示例。


在下文中一共展示了JavaScriptEmitter.emitStatements方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: emit

export function emit() {
  var emitter = new JavaScriptEmitter(new SimpleJsImportGenerator());
  var emittedCode = emitter.emitStatements(
      assetUrl('compiler', 'output/output_emitter_codegen_untyped', 'test'), codegenStmts,
      codegenExportsVars);
  return emittedCode;
}
開發者ID:BahKoo,項目名稱:angular,代碼行數:7,代碼來源:output_emitter_codegen_untyped.ts

示例2: emitSourceMap

 function emitSourceMap(
     stmt: o.Statement | o.Statement[], exportedVars: string[] = null,
     preamble?: string): SourceMap {
   const stmts = Array.isArray(stmt) ? stmt : [stmt];
   const source = emitter.emitStatements(
       someSourceFilePath, someGenFilePath, stmts, exportedVars || [], preamble);
   return extractSourceMap(source);
 }
開發者ID:JohnnyQQQQ,項目名稱:angular,代碼行數:8,代碼來源:js_emitter_node_only_spec.ts

示例3: emitStmt

 function emitStmt(stmt: o.Statement, exportedVars: string[] = null): string {
   if (!exportedVars) {
     exportedVars = [];
   }
   return emitter.emitStatements(someModuleUrl, [stmt], exportedVars);
 }
開發者ID:gonzofish,項目名稱:angular,代碼行數:6,代碼來源:js_emitter_spec.ts

示例4: emitStmt

 function emitStmt(stmt: o.Statement, exportedVars: string[] = null): string {
   const source = emitter.emitStatements(someModuleUrl, [stmt], exportedVars || []);
   return stripSourceMapAndNewLine(source);
 }
開發者ID:acramatte,項目名稱:angular,代碼行數:4,代碼來源:js_emitter_spec.ts

示例5: emitStmt

 function emitStmt(stmt: o.Statement, preamble?: string): string {
   const source = emitter.emitStatements(someGenFilePath, [stmt], preamble);
   return stripSourceMapAndNewLine(source);
 }
開發者ID:AnthonyPAlicea,項目名稱:angular,代碼行數:4,代碼來源:js_emitter_spec.ts

示例6: emitSourceMap

 function emitSourceMap(
     stmt: o.Statement | o.Statement[], exportedVars: string[] = null): SourceMap {
   const stmts = Array.isArray(stmt) ? stmt : [stmt];
   const source = emitter.emitStatements(someModuleUrl, stmts, exportedVars || []);
   return extractSourceMap(source);
 }
開發者ID:acramatte,項目名稱:angular,代碼行數:6,代碼來源:js_emitter_node_only_spec.ts

示例7: emitSourceMap

 function emitSourceMap(stmt: o.Statement | o.Statement[], preamble?: string): SourceMap {
   const stmts = Array.isArray(stmt) ? stmt : [stmt];
   const source = emitter.emitStatements(someGenFilePath, stmts, preamble);
   return extractSourceMap(source) !;
 }
開發者ID:AnthonyPAlicea,項目名稱:angular,代碼行數:5,代碼來源:js_emitter_node_only_spec.ts

示例8: emitStmt

 function emitStmt(
     stmt: o.Statement, exportedVars: string[] | null = null, preamble?: string): string {
   const source = emitter.emitStatements(
       someSourceFilePath, someGenFilePath, [stmt], exportedVars || [], preamble);
   return stripSourceMapAndNewLine(source);
 }
開發者ID:maxisam,項目名稱:angular,代碼行數:6,代碼來源:js_emitter_spec.ts


注:本文中的@angular/compiler/src/output/js_emitter.JavaScriptEmitter.emitStatements方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。