本文整理匯總了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;
}
示例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);
}
示例3: emitStmt
function emitStmt(stmt: o.Statement, exportedVars: string[] = null): string {
if (!exportedVars) {
exportedVars = [];
}
return emitter.emitStatements(someModuleUrl, [stmt], exportedVars);
}
示例4: emitStmt
function emitStmt(stmt: o.Statement, exportedVars: string[] = null): string {
const source = emitter.emitStatements(someModuleUrl, [stmt], exportedVars || []);
return stripSourceMapAndNewLine(source);
}
示例5: emitStmt
function emitStmt(stmt: o.Statement, preamble?: string): string {
const source = emitter.emitStatements(someGenFilePath, [stmt], preamble);
return stripSourceMapAndNewLine(source);
}
示例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);
}
示例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) !;
}
示例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);
}