This commit adds the basic building blocks for linking partial declarations.
In particular it provides a generic `FileLinker` class that delegates to
a set of (not yet implemented) `PartialLinker` classes.
The Babel plugin makes use of this `FileLinker` providing concrete classes
for `AstHost` and `AstFactory` that work with Babel AST. It can be created
with the following code:
```ts
const plugin = createEs2015LinkerPlugin({ /* options */ });
```
PR Close #39116
		
	
			
		
			
				
	
	
		
			37 lines
		
	
	
		
			934 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
		
			934 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| load("//tools:defaults.bzl", "jasmine_node_test", "ts_library")
 | |
| 
 | |
| package(default_visibility = ["//visibility:public"])
 | |
| 
 | |
| ts_library(
 | |
|     name = "test_lib",
 | |
|     testonly = True,
 | |
|     srcs = glob([
 | |
|         "**/*.ts",
 | |
|     ]),
 | |
|     deps = [
 | |
|         "//packages:types",
 | |
|         "//packages/compiler",
 | |
|         "//packages/compiler-cli/linker",
 | |
|         "//packages/compiler-cli/linker/babel",
 | |
|         "//packages/compiler-cli/src/ngtsc/translator",
 | |
|         "@npm//@babel/core",
 | |
|         "@npm//@babel/generator",
 | |
|         "@npm//@babel/parser",
 | |
|         "@npm//@babel/template",
 | |
|         "@npm//@babel/traverse",
 | |
|         "@npm//@babel/types",
 | |
|         "@npm//@types/babel__core",
 | |
|         "@npm//@types/babel__generator",
 | |
|         "@npm//@types/babel__template",
 | |
|         "@npm//@types/babel__traverse",
 | |
|     ],
 | |
| )
 | |
| 
 | |
| jasmine_node_test(
 | |
|     name = "test",
 | |
|     bootstrap = ["//tools/testing:node_no_angular_es5"],
 | |
|     deps = [
 | |
|         ":test_lib",
 | |
|     ],
 | |
| )
 |