fix: API 合并错误
fix: 暂时撤销对 HttpClient 的翻译,它的改动太大了
This commit is contained in:
		
							parent
							
								
									3e0ef413a8
								
							
						
					
					
						commit
						b046dfdb6e
					
				
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @ -32,6 +32,7 @@ export interface HttpParameterCodec { | ||||
|  * Use the `HttpParameterCodec` class to encode and decode the query-string values. | ||||
|  * | ||||
|  * 一个 `HttpParameterCodec`,它使用 `encodeURIComponent` 和 `decodeURIComponent` 来序列化和解析 URL 参数的 key 和 value。 | ||||
|  * 如果你传入未编码的查询参数,那么接收端可能会对这些参数进行错误解析。请使用 `HttpParameterCodec` 类对查询字符串的值进行编码和解码。 | ||||
|  * | ||||
|  * @publicApi | ||||
|  */ | ||||
|  | ||||
| @ -145,7 +145,7 @@ export class Location { | ||||
|    * Given a string representing a URL, returns the URL path after stripping the | ||||
|    * trailing slashes. | ||||
|    * | ||||
|    * 给出一个字符串形式的 URL,返回一个标准化的 URL 路径,但不包括首尾的斜杠。 | ||||
|    * 给出一个字符串形式的 URL,返回一个去掉末尾斜杠之后的 URL 路径。 | ||||
|    * | ||||
|    * @param url String representing a URL. | ||||
|    * | ||||
|  | ||||
| @ -22,6 +22,7 @@ import {ViewEncapsulation} from './view'; | ||||
|  * Type of the Directive decorator / constructor function. | ||||
|  * | ||||
|  * 指令装饰器的类型和构造函数。 | ||||
|  * | ||||
|  * @publicApi | ||||
|  */ | ||||
| export interface DirectiveDecorator { | ||||
| @ -780,7 +781,6 @@ export interface PipeDecorator { | ||||
|    * to a template. To make it a member of an NgModule, | ||||
|    * list it in the `declarations` field of the `NgModule` metadata. | ||||
|    * | ||||
|    * 声明一个可复用的 pipe 函数,并提供配置元数据。 | ||||
|    */ | ||||
|   (obj: Pipe): TypeDecorator; | ||||
| 
 | ||||
| @ -930,7 +930,7 @@ export interface OutputDecorator { | ||||
|   * The DOM property bound to the output property is automatically updated during change detection. | ||||
|   * | ||||
|   * 一个装饰器,用于把一个类字段标记为输出属性,并提供配置元数据。 | ||||
|   * 声明一个可绑定的输出属性,Angular 在变更检测期间会自动更新它。 | ||||
|   * 凡是绑定到输出属性上的 DOM 属性,Angular 在变更检测期间都会自动进行更新。 | ||||
|   * | ||||
|   * @usageNotes | ||||
|   * | ||||
|  | ||||
| @ -57,7 +57,7 @@ export type ɵɵNgModuleDefWithMeta<T, Declarations, Imports, Exports> = NgModul | ||||
|  * never create the object directly since the shape of this object | ||||
|  * can change between versions. | ||||
|  * | ||||
|  * 注意:总是使用 `defineNgModule` 函数来创建该对象,永远不要直接创建它,因为该对象的结构在不同版本间可能会不一样。 | ||||
|  * 注意:总是使用 `ɵɵdefineNgModule` 函数来创建该对象,永远不要直接创建它,因为该对象的结构在不同版本间可能会不一样。 | ||||
|  */ | ||||
| export interface NgModuleDef<T> { | ||||
|   /** Token representing the module. Used by DI. | ||||
|  | ||||
| @ -198,10 +198,13 @@ export abstract class AbstractControl { | ||||
|    * | ||||
|    * * For an enabled `FormGroup`, the values of enabled controls as an object | ||||
|    * with a key-value pair for each member of the group. | ||||
|    * | ||||
|    *   对于启用状态的 `FormGroup`,它是由组中的每个已启用的成员控件的名称和值组成的对象。 | ||||
|    * | ||||
|    * * For a disabled `FormGroup`, the values of all controls as an object | ||||
|    * with a key-value pair for each member of the group. | ||||
|    * | ||||
|    *   对于 `FormGroup`,它是由组中的每个已启用的成员控件的名称和值组成的对象。 | ||||
|    *   对于禁用状态的 `FormGroup`,它是由组中的所有成员控件的名称和值组成的对象。 | ||||
|    * | ||||
|    * * For a `FormArray`, the values of enabled controls as an array. | ||||
|    * | ||||
| @ -1874,7 +1877,7 @@ export class FormGroup extends AbstractControl { | ||||
|    * * `onlySelf`: When true, each change only affects this control, and not its parent. Default is | ||||
|    * true. | ||||
|    * | ||||
|    *   `onlySelf`::如果为 `true`,则每个变更仅仅影响当前控件,而不会影响父控件。默认为 `false`。 | ||||
|    *   `onlySelf`:如果为 `true`,则每个变更仅仅影响当前控件,而不会影响父控件。默认为 `false`。 | ||||
|    * | ||||
|    * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and | ||||
|    * `valueChanges` | ||||
| @ -2177,7 +2180,7 @@ export class FormGroup extends AbstractControl { | ||||
|  * the `FormArray` directly, as that result in strange and unexpected behavior such | ||||
|  * as broken change detection. | ||||
|  * | ||||
|  * 要改变数组中的控件列表,可以使用 `FormArray` 本身的 `push`、`insert` 或 `removeAt` 方法。这些方法能确保表单数组正确的跟踪这些子控件。 | ||||
|  * 要改变数组中的控件列表,可以使用 `FormArray` 本身的 `push`、`insert`、`removeAt` 或 `clear` 方法。这些方法能确保表单数组正确的跟踪这些子控件。 | ||||
|  * 不要直接修改实例化 `FormArray` 时传入的那个 `AbstractControl` 数组,否则会导致奇怪的、非预期的行为,比如破坏变更检测机制。 | ||||
|  * | ||||
|  * @publicApi | ||||
|  | ||||
| @ -17,7 +17,7 @@ export {SecurityContext}; | ||||
| /** | ||||
|  * Marker interface for a value that's safe to use in a particular context. | ||||
|  * | ||||
|  * | ||||
|  * @publicApi | ||||
|  * 一个标记性接口,用于表示一个值可以安全的用在特定的上下文中。 | ||||
|  */ | ||||
| export interface SafeValue {} | ||||
| @ -25,7 +25,7 @@ export interface SafeValue {} | ||||
| /** | ||||
|  * Marker interface for a value that's safe to use as HTML. | ||||
|  * | ||||
|  * | ||||
|  * @publicApi | ||||
|  * 一个标记性接口,用于表示一个值可以安全地用在 HTML 上下文中。 | ||||
|  */ | ||||
| export interface SafeHtml extends SafeValue {} | ||||
| @ -33,7 +33,7 @@ export interface SafeHtml extends SafeValue {} | ||||
| /** | ||||
|  * Marker interface for a value that's safe to use as style (CSS). | ||||
|  * | ||||
|  * | ||||
|  * @publicApi | ||||
|  * 一个标记性接口,用于表示一个值可以安全地用在样式(CSS)上下文中。 | ||||
|  */ | ||||
| export interface SafeStyle extends SafeValue {} | ||||
| @ -41,7 +41,7 @@ export interface SafeStyle extends SafeValue {} | ||||
| /** | ||||
|  * Marker interface for a value that's safe to use as JavaScript. | ||||
|  * | ||||
|  * | ||||
|  * @publicApi | ||||
|  * 一个标记性接口,用于表示一个值可以安全地用在 JavaScript 上下文中。 | ||||
|  */ | ||||
| export interface SafeScript extends SafeValue {} | ||||
| @ -49,7 +49,7 @@ export interface SafeScript extends SafeValue {} | ||||
| /** | ||||
|  * Marker interface for a value that's safe to use as a URL linking to a document. | ||||
|  * | ||||
|  * | ||||
|  * @publicApi | ||||
|  * 一个标记性接口,用于表示一个值可以安全地用作 URL 链接到一个文档。 | ||||
|  */ | ||||
| export interface SafeUrl extends SafeValue {} | ||||
| @ -57,7 +57,7 @@ export interface SafeUrl extends SafeValue {} | ||||
| /** | ||||
|  * Marker interface for a value that's safe to use as a URL to load executable code from. | ||||
|  * | ||||
|  * | ||||
|  * @publicApi | ||||
|  * 一个标记性接口,用于表示一个值可以安全地用作 URL 以加载可执行代码。 | ||||
|  */ | ||||
| export interface SafeResourceUrl extends SafeValue {} | ||||
|  | ||||
| @ -53,7 +53,6 @@ export type UrlMatchResult = { | ||||
|  * is not expressive enough. | ||||
|  * | ||||
|  * 一个用于匹配路由和 URL 的函数。 | ||||
|  * | ||||
|  * 当 `path` 和 `pathMatch` 的组合不足以表达时,可以为 `Route.matcher` 实现一个自定义的 URL 匹配器。 | ||||
|  * | ||||
|  * @param segments An array of URL segments. | ||||
| @ -279,10 +278,12 @@ export type RunGuardsAndResolvers = 'pathParamsChange' | 'pathParamsOrQueryParam | ||||
|  * Empty-path route configurations can be used to instantiate components that do not 'consume' | ||||
|  * any URL segments. | ||||
|  * | ||||
|  * 空路径路由可用来实例化一些不"消费"任何 url 区段的组件。 | ||||
|  * | ||||
|  * In the following configuration, when navigating to | ||||
|  * `/team/11`, the router instantiates the 'AllUsers' component. | ||||
|  * | ||||
|  * 空路径路由可用来实例化一些不"消费"任何 url 区段的组件。来看下列配置: | ||||
|  * 在下列配置中,当导航到 `/team/11` 时,路由器会实例化 'AllUsers' 组件。 | ||||
|  * | ||||
|  * ``` | ||||
|  * [{ | ||||
| @ -304,8 +305,6 @@ export type RunGuardsAndResolvers = 'pathParamsChange' | 'pathParamsOrQueryParam | ||||
|  * | ||||
|  * Note that an empty path route inherits its parent's parameters and data. | ||||
|  * | ||||
|  * 空路径路由还可以有子路由。 | ||||
|  * | ||||
|  * ``` | ||||
|  * [{ | ||||
|  *   path: 'team/:id', | ||||
| @ -411,9 +410,6 @@ export type RunGuardsAndResolvers = 'pathParamsChange' | 'pathParamsOrQueryParam | ||||
|  * It then extracts the set of routes defined in that NgModule, | ||||
|  * and transparently adds those routes to the main configuration. | ||||
|  * | ||||
|  * 惰性加载可以通过把应用拆分成多个发布包,并按需加载它们,来加速应用的启动时间。 | ||||
|  * 路由器的设计让惰性加载非常简易。只要用 `loadChildren` 属性代替 `children` 属性就可以了,例如: | ||||
|  * | ||||
|  * ``` | ||||
|  * [{ | ||||
|  *   path: 'team/:id', | ||||
|  | ||||
| @ -38,7 +38,7 @@ import {isUrlTree} from './utils/type_guards'; | ||||
|  * | ||||
|  * Options that modify the navigation strategy. | ||||
|  * | ||||
|  * 表示在导航时用到的额外选项。 | ||||
|  * 用于修订导航策略的额外选项。 | ||||
|  * @publicApi | ||||
|  */ | ||||
| export interface NavigationExtras { | ||||
| @ -307,7 +307,7 @@ function defaultRouterHook(snapshot: RouterStateSnapshot, runExtras: { | ||||
|  * | ||||
|  * An NgModule that provides navigation and URL manipulation capabilities. | ||||
|  * | ||||
|  * 提供导航和操纵 URL 的能力。 | ||||
|  * 一个提供导航和操纵 URL 能力的 NgModule。 | ||||
|  * | ||||
|  * @see `Route`. | ||||
|  * @see [Routing and Navigation Guide](guide/router). | ||||
| @ -368,7 +368,7 @@ export class Router { | ||||
|    * True if at least one navigation event has occurred, | ||||
|    * false otherwise. | ||||
|    * | ||||
|    * 表示是否发生过至少一次导航。 | ||||
|    * 如果为 True 则表示是否发生过至少一次导航,反之为 False。 | ||||
|    */ | ||||
|   navigated: boolean = false; | ||||
|   private lastSuccessfulId: number = -1; | ||||
| @ -399,12 +399,17 @@ export class Router { | ||||
| 
 | ||||
|   /** | ||||
|    * How to handle a navigation request to the current URL. One of: | ||||
|    * | ||||
|    * 定义当路由器收到一个导航到当前 URL 的请求时应该怎么做。可取下列值之一: | ||||
|    * | ||||
|    * - `'ignore'` :  The router ignores the request. | ||||
|    * | ||||
|    *   `'ignore'`:路由器会忽略此请求。 | ||||
|    * | ||||
|    * - `'reload'` : The router reloads the URL. Use to implement a "refresh" feature. | ||||
|    * | ||||
|    * 定义当路由器收到一个导航到当前 URL 的请求时应该怎么做。 | ||||
|    * 默认情况下,路由器将会忽略这次导航。但这样会阻止类似于 "刷新" 按钮的特性。 | ||||
|    * 使用该选项可以配置导航到当前 URL 时的行为。默认值为 'ignore'。 | ||||
|    *   `'reload'`:路由器会重新加载当前 URL。用来实现"刷新"功能。 | ||||
|    * | ||||
|    */ | ||||
|   onSameUrlNavigation: 'reload'|'ignore' = 'ignore'; | ||||
| 
 | ||||
| @ -412,17 +417,17 @@ export class Router { | ||||
|    * How to merge parameters, data, and resolved data from parent to child | ||||
|    * routes. One of: | ||||
|    * | ||||
|    * 定义路由器如何从父路由向子路由合并参数、数据。可用选项为: | ||||
|    * 如何从父路由向子路由合并参数、数据和解析到的数据。可取下列值之一: | ||||
|    * | ||||
|    * - `'emptyOnly'` : Inherit parent parameters, data, and resolved data | ||||
|    * for path-less or component-less routes. | ||||
|    * | ||||
|    *   `'emptyOnly'`,默认值,只从无路径或无组件的路由继承父级参数。 | ||||
|    *   `'emptyOnly'`:让无路径或无组件的路由继承父级的参数、数据和解析到的数据。 | ||||
|    * | ||||
|    * - `'always'` : Inherit parent parameters, data, and resolved data | ||||
|    * for all child routes. | ||||
|    * | ||||
|    *   `'always'`,允许无条件地继承父级参数。 | ||||
|    *   `'always'`:让所有子路由都继承父级的参数、数据和解析到的数据。 | ||||
|    * | ||||
|    */ | ||||
|   paramsInheritanceStrategy: 'emptyOnly'|'always' = 'emptyOnly'; | ||||
| @ -1019,7 +1024,7 @@ export class Router { | ||||
|   /** | ||||
|    * Navigate based on the provided URL, which must be absolute. | ||||
|    * | ||||
|    * 基于所提供的 url 进行导航。这种导航永远使用绝对路径。 | ||||
|    * 基于所提供的 URL 进行导航,必须使用绝对路径。 | ||||
|    * | ||||
|    * @param url An absolute URL. The function does not apply any delta to the current URL. | ||||
|    * | ||||
|  | ||||
| @ -465,7 +465,7 @@ export interface ExtraOptions { | ||||
|    * You can implement custom scroll restoration behavior by adapting the enabled behavior as | ||||
|    * follows: | ||||
|    * | ||||
|    * 你可以通过如下方式来适配启用时的行为,来自定义恢复滚动位置的策略。 | ||||
|    * 你可以通过如下方式来适配启用时的行为,来自定义恢复滚动位置的策略: | ||||
|    * | ||||
|    * ```typescript
 | ||||
|    * class AppModule { | ||||
| @ -619,7 +619,7 @@ export interface ExtraOptions { | ||||
|    * In other words, you're required to use `../` rather than `./`. This is currently the default | ||||
|    * behavior. Setting this option to `corrected` enables the fix. | ||||
|    * | ||||
|    * 换句话说,要使用 `../` 而不是 `./`。目前 v6 版本的默认值是 `legacy`,到 v7 就会移除该选项,以纠正此行为。 | ||||
|    * 换句话说,要使用 `../` 而不是 `./`。它是当前版本的默认行为。把该选项设置为 `corrected` 可以启用这项修正。 | ||||
|    */ | ||||
|   relativeLinkResolution?: 'legacy'|'corrected'; | ||||
| } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user