@angular-wave/angular.ts 0.9.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@types/core/scope/scope.d.ts +1 -4
- package/@types/interface.d.ts +17 -3
- package/@types/shared/interface.d.ts +17 -0
- package/@types/shared/utils.d.ts +4 -19
- package/dist/angular-ts.esm.js +29 -152
- package/dist/angular-ts.umd.js +29 -152
- package/dist/angular-ts.umd.min.js +1 -1
- package/docs/layouts/shortcodes/version.html +1 -1
- package/docs/static/typedoc/assets/hierarchy.js +1 -1
- package/docs/static/typedoc/assets/main.js +2 -2
- package/docs/static/typedoc/assets/navigation.js +1 -1
- package/docs/static/typedoc/assets/search.js +1 -1
- package/docs/static/typedoc/classes/Location.html +20 -20
- package/docs/static/typedoc/classes/LocationProvider.html +5 -5
- package/docs/static/typedoc/classes/LogProvider.html +3 -3
- package/docs/static/typedoc/classes/PubSub.html +21 -21
- package/docs/static/typedoc/classes/PubSubProvider.html +1 -1
- package/docs/static/typedoc/classes/TemplateCacheProvider.html +2 -2
- package/docs/static/typedoc/hierarchy.html +1 -1
- package/docs/static/typedoc/index.html +1 -1
- package/docs/static/typedoc/interfaces/ChangesObject.html +3 -3
- package/docs/static/typedoc/interfaces/ComponentOptions.html +8 -8
- package/docs/static/typedoc/interfaces/Controller.html +6 -6
- package/docs/static/typedoc/interfaces/DefaultPorts.html +1 -1
- package/docs/static/typedoc/interfaces/Directive.html +18 -18
- package/docs/static/typedoc/interfaces/DirectivePrePost.html +1 -1
- package/docs/static/typedoc/interfaces/Html5Mode.html +1 -1
- package/docs/static/typedoc/interfaces/HttpProviderDefaults.html +7 -7
- package/docs/static/typedoc/interfaces/HttpService.html +21 -21
- package/docs/static/typedoc/interfaces/LogService.html +6 -6
- package/docs/static/typedoc/interfaces/NgModelController.html +15 -15
- package/docs/static/typedoc/interfaces/NgModelOptions.html +8 -8
- package/docs/static/typedoc/interfaces/Provider.html +17 -17
- package/docs/static/typedoc/interfaces/RequestConfig.html +15 -15
- package/docs/static/typedoc/interfaces/RequestShortcutConfig.html +11 -11
- package/docs/static/typedoc/interfaces/ServiceProvider.html +1 -1
- package/docs/static/typedoc/interfaces/TemplateCache.html +1 -1
- package/docs/static/typedoc/interfaces/TranscludeFunctionObject.html +4 -4
- package/docs/static/typedoc/interfaces/UrlParts.html +4 -4
- package/docs/static/typedoc/types/AnnotatedFactory.html +1 -1
- package/docs/static/typedoc/types/CloneAttachFunction.html +1 -1
- package/docs/static/typedoc/types/ControllerConstructor.html +1 -1
- package/docs/static/typedoc/types/DirectiveCompileFn.html +1 -1
- package/docs/static/typedoc/types/DirectiveController.html +1 -1
- package/docs/static/typedoc/types/DirectiveFactoryFn.html +1 -1
- package/docs/static/typedoc/types/DirectiveLinkFn.html +1 -1
- package/docs/static/typedoc/types/Expression.html +1 -1
- package/docs/static/typedoc/types/FilterFactory.html +1 -1
- package/docs/static/typedoc/types/FilterFn.html +1 -1
- package/docs/static/typedoc/types/Injectable.html +1 -1
- package/docs/static/typedoc/types/InjectableFactory.html +1 -1
- package/docs/static/typedoc/types/LogCall.html +1 -1
- package/docs/static/typedoc/types/LogServiceFactory.html +1 -1
- package/docs/static/typedoc/types/OnChangesObject.html +1 -1
- package/docs/static/typedoc/types/SwapModeType.html +1 -1
- package/docs/static/typedoc/types/TController.html +1 -1
- package/docs/static/typedoc/types/UrlChangeListener.html +4 -4
- package/docs/static/typedoc/variables/SwapMode.html +10 -10
- package/legacy.d.ts +0 -82
- package/package.json +2 -2
- package/src/animations/animate-js.js +2 -1
- package/src/animations/animate-queue.js +7 -6
- package/src/core/scope/scope.js +8 -10
- package/src/directive/http/form-router-test.html +44 -0
- package/src/directive/options/options-example.html +7 -3
- package/src/directive/options/options.js +1 -0
- package/src/directive/options/options.spec.js +117 -170
- package/src/interface.ts +20 -3
- package/src/router/directives/view-directive.js +0 -1
- package/src/router/resolve/resolve-context.js +0 -19
- package/src/router/state/state-registry.js +3 -10
- package/src/router/state/state-service.js +5 -5
- package/src/router/transition/transition.js +1 -86
- package/src/router/view-hook.spec.js +1 -1
- package/src/shared/interface.ts +19 -0
- package/src/shared/utils.js +3 -12
- package/tsconfig.types.json +2 -2
- package/@types/angular.d.ts +0 -150
- package/@types/animations/animate-cache.d.ts +0 -50
- package/@types/animations/animate-children-directive.d.ts +0 -10
- package/@types/animations/animate-css-driver.d.ts +0 -18
- package/@types/animations/animate-css.d.ts +0 -18
- package/@types/animations/animate-js-driver.d.ts +0 -14
- package/@types/animations/animate-js.d.ts +0 -23
- package/@types/animations/animate-queue.d.ts +0 -28
- package/@types/animations/animate-runner.d.ts +0 -31
- package/@types/animations/animate-swap.d.ts +0 -9
- package/@types/animations/animate.d.ts +0 -450
- package/@types/animations/animation.d.ts +0 -14
- package/@types/animations/interface.d.ts +0 -17
- package/@types/animations/raf-scheduler.d.ts +0 -37
- package/@types/animations/shared.d.ts +0 -74
- package/@types/core/compile/compile.d.ts +0 -201
- package/@types/core/controller/controller.d.ts +0 -54
- package/@types/core/di/injector.d.ts +0 -22
- package/@types/core/filter/filter.d.ts +0 -23
- package/@types/core/interpolate/interpolate.d.ts +0 -38
- package/@types/core/parse/ast/ast-node.d.ts +0 -56
- package/@types/core/parse/ast/ast.d.ts +0 -164
- package/@types/core/parse/lexer/lexer.d.ts +0 -119
- package/@types/core/parse/lexer/token.d.ts +0 -17
- package/@types/core/parse/parse.d.ts +0 -33
- package/@types/core/parse/parser/parser.d.ts +0 -41
- package/@types/core/sanitize/interface.d.ts +0 -10
- package/@types/core/sanitize/sanitize-uri.d.ts +0 -40
- package/@types/directive/aria/aria.d.ts +0 -104
- package/@types/directive/attrs/attrs.d.ts +0 -8
- package/@types/directive/bind/bind.d.ts +0 -18
- package/@types/directive/channel/channel.d.ts +0 -10
- package/@types/directive/class/class.d.ts +0 -3
- package/@types/directive/cloak/cloak.d.ts +0 -4
- package/@types/directive/controller/controller.d.ts +0 -4
- package/@types/directive/events/events.d.ts +0 -21
- package/@types/directive/form/form.d.ts +0 -264
- package/@types/directive/http/http.d.ts +0 -46
- package/@types/directive/if/if.d.ts +0 -10
- package/@types/directive/include/include.d.ts +0 -28
- package/@types/directive/init/init.d.ts +0 -4
- package/@types/directive/input/input.d.ts +0 -70
- package/@types/directive/messages/messages.d.ts +0 -63
- package/@types/directive/model/model.d.ts +0 -515
- package/@types/directive/model-options/model-options.d.ts +0 -56
- package/@types/directive/non-bindable/non-bindable.d.ts +0 -4
- package/@types/directive/observe/observe.d.ts +0 -9
- package/@types/directive/options/options.d.ts +0 -13
- package/@types/directive/ref/ref.d.ts +0 -11
- package/@types/directive/repeat/repeat.d.ts +0 -11
- package/@types/directive/script/script.d.ts +0 -10
- package/@types/directive/select/select.d.ts +0 -15
- package/@types/directive/setter/setter.d.ts +0 -12
- package/@types/directive/show-hide/show-hide.d.ts +0 -19
- package/@types/directive/style/style.d.ts +0 -4
- package/@types/directive/switch/switch.d.ts +0 -18
- package/@types/directive/transclude/transclude.d.ts +0 -10
- package/@types/directive/validators/validators.d.ts +0 -149
- package/@types/filters/filter.d.ts +0 -4
- package/@types/filters/filters.d.ts +0 -38
- package/@types/filters/limit-to.d.ts +0 -4
- package/@types/filters/order-by.d.ts +0 -7
- package/@types/index.d.ts +0 -2
- package/@types/ng.d.ts +0 -8
- package/@types/router/common/trace.d.ts +0 -66
- package/@types/router/directives/state-directives.d.ts +0 -46
- package/@types/router/directives/view-directive.d.ts +0 -138
- package/@types/router/glob/glob.d.ts +0 -81
- package/@types/router/hooks/core-resolvables.d.ts +0 -2
- package/@types/router/hooks/ignored-transition.d.ts +0 -1
- package/@types/router/hooks/invalid-transition.d.ts +0 -1
- package/@types/router/hooks/lazy-load.d.ts +0 -42
- package/@types/router/hooks/on-enter-exit-retain.d.ts +0 -3
- package/@types/router/hooks/redirect-to.d.ts +0 -4
- package/@types/router/hooks/resolve.d.ts +0 -4
- package/@types/router/hooks/update-globals.d.ts +0 -1
- package/@types/router/hooks/url.d.ts +0 -5
- package/@types/router/hooks/views.d.ts +0 -5
- package/@types/router/params/interface.d.ts +0 -606
- package/@types/router/params/param-factory.d.ts +0 -16
- package/@types/router/params/param-type.d.ts +0 -59
- package/@types/router/params/param-types.d.ts +0 -36
- package/@types/router/params/param.d.ts +0 -71
- package/@types/router/params/state-params.d.ts +0 -12
- package/@types/router/path/path-node.d.ts +0 -38
- package/@types/router/path/path-utils.d.ts +0 -88
- package/@types/router/resolve/interface.d.ts +0 -200
- package/@types/router/resolve/resolvable.d.ts +0 -50
- package/@types/router/resolve/resolve-context.d.ts +0 -102
- package/@types/router/router.d.ts +0 -47
- package/@types/router/state/interface.d.ts +0 -983
- package/@types/router/state/state-builder.d.ts +0 -95
- package/@types/router/state/state-matcher.d.ts +0 -7
- package/@types/router/state/state-object.d.ts +0 -83
- package/@types/router/state/state-queue-manager.d.ts +0 -29
- package/@types/router/state/state-registry.d.ts +0 -134
- package/@types/router/state/state-service.d.ts +0 -419
- package/@types/router/state/target-state.d.ts +0 -102
- package/@types/router/state/views.d.ts +0 -58
- package/@types/router/state-filters.d.ts +0 -39
- package/@types/router/template-factory.d.ts +0 -117
- package/@types/router/transition/hook-builder.d.ts +0 -45
- package/@types/router/transition/hook-registry.d.ts +0 -102
- package/@types/router/transition/interface.d.ts +0 -880
- package/@types/router/transition/reject-factory.d.ts +0 -43
- package/@types/router/transition/transition-event-type.d.ts +0 -24
- package/@types/router/transition/transition-hook.d.ts +0 -86
- package/@types/router/transition/transition-service.d.ts +0 -116
- package/@types/router/transition/transition.d.ts +0 -396
- package/@types/router/url/url-config.d.ts +0 -99
- package/@types/router/url/url-matcher.d.ts +0 -174
- package/@types/router/url/url-rule.d.ts +0 -161
- package/@types/router/url/url-rules.d.ts +0 -249
- package/@types/router/url/url-service.d.ts +0 -254
- package/@types/router/view/interface.d.ts +0 -44
- package/@types/router/view/view.d.ts +0 -149
- package/@types/router/view-scroll.d.ts +0 -10
- package/@types/services/anchor-scroll.d.ts +0 -25
- package/@types/services/cookie-reader.d.ts +0 -4
- package/@types/services/http/http.d.ts +0 -134
- package/@types/services/http-backend/http-backend.d.ts +0 -58
- package/@types/services/sce/sce.d.ts +0 -238
- package/@types/services/template-request.d.ts +0 -55
- package/@types/shared/common.d.ts +0 -197
- package/@types/shared/hof.d.ts +0 -108
- package/@types/shared/predicates.d.ts +0 -17
- package/@types/shared/queue.d.ts +0 -64
- package/@types/shared/strings.d.ts +0 -58
- package/@types/shared/test-utils.d.ts +0 -18
- package/docs/static/typedoc/classes/NgModule.html +0 -32
- package/src/router/params/README.md +0 -8
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
export const DirectiveSuffix: "Directive";
|
|
2
|
-
export class CompileProvider {
|
|
3
|
-
static $inject: string[];
|
|
4
|
-
/**
|
|
5
|
-
* @param {import('../../interface.js').Provider} $provide
|
|
6
|
-
* @param {import('../sanitize/sanitize-uri.js').SanitizeUriProvider} $$sanitizeUriProvider
|
|
7
|
-
*/
|
|
8
|
-
constructor(
|
|
9
|
-
$provide: import("../../interface.js").Provider,
|
|
10
|
-
$$sanitizeUriProvider: import("../sanitize/sanitize-uri.js").SanitizeUriProvider,
|
|
11
|
-
);
|
|
12
|
-
/**
|
|
13
|
-
* Register a new directive with the compiler.
|
|
14
|
-
*
|
|
15
|
-
* @param {string|Object} name Name of the directive in camel-case (i.e. `ngBind` which will match
|
|
16
|
-
* as `ng-bind`), or an object map of directives where the keys are the names and the values
|
|
17
|
-
* are the factories.
|
|
18
|
-
* @param {Function|Array} directiveFactory An injectable directive factory function. See the
|
|
19
|
-
* {@link guide/directive directive guide} and the {@link $compile compile API} for more info.
|
|
20
|
-
* @returns {CompileProvider} Self for chaining.
|
|
21
|
-
*/
|
|
22
|
-
directive: (
|
|
23
|
-
name: string | any,
|
|
24
|
-
directiveFactory: Function | any[],
|
|
25
|
-
) => CompileProvider;
|
|
26
|
-
/**
|
|
27
|
-
* @param {string|Object} name Name of the component in camelCase (i.e. `myComp` which will match `<my-comp>`),
|
|
28
|
-
* or an object map of components where the keys are the names and the values are the component definition objects.
|
|
29
|
-
* @param {import("../../interface.js").ComponentOptions} options Component definition object (a simplified
|
|
30
|
-
* {directive definition object}),
|
|
31
|
-
* with the following properties (all optional):
|
|
32
|
-
*
|
|
33
|
-
* - `controller` – `{(string|function()=}` – controller constructor function that should be
|
|
34
|
-
* associated with newly created scope or the name of a {controller} if passed as a string. An empty `noop` function by default.
|
|
35
|
-
* - `controllerAs` – `{string=}` – identifier name for to reference the controller in the component's scope.
|
|
36
|
-
* If present, the controller will be published to scope under the `controllerAs` name.
|
|
37
|
-
* If not present, this will default to be `$ctrl`.
|
|
38
|
-
* - `template` – `{string=|function()=}` – html template as a string or a function that
|
|
39
|
-
* returns an html template as a string which should be used as the contents of this component.
|
|
40
|
-
* Empty string by default.
|
|
41
|
-
*
|
|
42
|
-
* If `template` is a function, then it is {injected} with
|
|
43
|
-
* the following locals:
|
|
44
|
-
*
|
|
45
|
-
* - `$element` - Current element
|
|
46
|
-
* - `$attrs` - Current attributes object for the element
|
|
47
|
-
*
|
|
48
|
-
* - `templateUrl` – `{string=|function()=}` – path or function that returns a path to an html
|
|
49
|
-
* template that should be used as the contents of this component.
|
|
50
|
-
*
|
|
51
|
-
* If `templateUrl` is a function, then it is {injected} with
|
|
52
|
-
* the following locals:
|
|
53
|
-
*
|
|
54
|
-
* - `$element` - Current element
|
|
55
|
-
* - `$attrs` - Current attributes object for the element
|
|
56
|
-
*
|
|
57
|
-
* - `bindings` – `{object=}` – defines bindings between DOM attributes and component properties.
|
|
58
|
-
* Component properties are always bound to the component controller and not to the scope.
|
|
59
|
-
* See {`bindToController`}.
|
|
60
|
-
* - `transclude` – `{boolean=}` – whether {content transclusion} is enabled.
|
|
61
|
-
* Disabled by default.
|
|
62
|
-
* - `require` - `{Object<string, string>=}` - requires the controllers of other directives and binds them to
|
|
63
|
-
* this component's controller. The object keys specify the property names under which the required
|
|
64
|
-
* controllers (object values) will be bound. See {`require`}.
|
|
65
|
-
* - `$...` – additional properties to attach to the directive factory function and the controller
|
|
66
|
-
* constructor function. (This is used by the component router to annotate)
|
|
67
|
-
*
|
|
68
|
-
* @returns {CompileProvider} the compile provider itself, for chaining of function calls.
|
|
69
|
-
*/
|
|
70
|
-
component: (
|
|
71
|
-
name: string | any,
|
|
72
|
-
options: import("../../interface.js").ComponentOptions,
|
|
73
|
-
) => CompileProvider;
|
|
74
|
-
/**
|
|
75
|
-
* Retrieves or overrides the default regular expression that is used for determining trusted safe
|
|
76
|
-
* urls during a[href] sanitization.
|
|
77
|
-
*
|
|
78
|
-
* The sanitization is a security measure aimed at preventing XSS attacks via html links.
|
|
79
|
-
*
|
|
80
|
-
* Any url about to be assigned to a[href] via data-binding is first normalized and turned into
|
|
81
|
-
* an absolute url. Afterwards, the url is matched against the `aHrefSanitizationTrustedUrlList`
|
|
82
|
-
* regular expression. If a match is found, the original url is written into the dom. Otherwise,
|
|
83
|
-
* the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.
|
|
84
|
-
*
|
|
85
|
-
* @param {RegExp=} regexp New regexp to trust urls with.
|
|
86
|
-
* @returns {RegExp|import('../sanitize/sanitize-uri.js').SanitizeUriProvider} Current RegExp if called without value or self for
|
|
87
|
-
* chaining otherwise.
|
|
88
|
-
*/
|
|
89
|
-
aHrefSanitizationTrustedUrlList: (
|
|
90
|
-
regexp?: RegExp | undefined,
|
|
91
|
-
) => RegExp | import("../sanitize/sanitize-uri.js").SanitizeUriProvider;
|
|
92
|
-
/**
|
|
93
|
-
* Retrieves or overrides the default regular expression that is used for determining trusted safe
|
|
94
|
-
* urls during img[src] sanitization.
|
|
95
|
-
*
|
|
96
|
-
* The sanitization is a security measure aimed at prevent XSS attacks via html links.
|
|
97
|
-
*
|
|
98
|
-
* Any url about to be assigned to img[src] via data-binding is first normalized and turned into
|
|
99
|
-
* an absolute url. Afterwards, the url is matched against the `imgSrcSanitizationTrustedUrlList`
|
|
100
|
-
* regular expression. If a match is found, the original url is written into the dom. Otherwise,
|
|
101
|
-
* the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.
|
|
102
|
-
*
|
|
103
|
-
* @param {RegExp=} regexp New regexp to trust urls with.
|
|
104
|
-
* @returns {RegExp|import('../sanitize/sanitize-uri.js').SanitizeUriProvider} Current RegExp if called without value or self for
|
|
105
|
-
* chaining otherwise.
|
|
106
|
-
*/
|
|
107
|
-
imgSrcSanitizationTrustedUrlList: (
|
|
108
|
-
regexp?: RegExp | undefined,
|
|
109
|
-
) => RegExp | import("../sanitize/sanitize-uri.js").SanitizeUriProvider;
|
|
110
|
-
strictComponentBindingsEnabled: (enabled: any) => boolean | this;
|
|
111
|
-
/**
|
|
112
|
-
* Defines the security context for DOM properties bound by ng-prop-*.
|
|
113
|
-
*
|
|
114
|
-
* @param {string} elementName The element name or '*' to match any element.
|
|
115
|
-
* @param {string} propertyName The DOM property name.
|
|
116
|
-
* @param {string} ctx The {@link $sce} security context in which this value is safe for use, e.g. `$sce.URL`
|
|
117
|
-
* @returns {object} `this` for chaining
|
|
118
|
-
*/
|
|
119
|
-
addPropertySecurityContext: (
|
|
120
|
-
elementName: string,
|
|
121
|
-
propertyName: string,
|
|
122
|
-
ctx: string,
|
|
123
|
-
) => object;
|
|
124
|
-
$get: (
|
|
125
|
-
| string
|
|
126
|
-
| ((
|
|
127
|
-
$injector: import("../../core/di/internal-injector.js").InjectorService,
|
|
128
|
-
$interpolate: any,
|
|
129
|
-
$exceptionHandler: import("../../services/exception/exception-handler.js").ErrorHandler,
|
|
130
|
-
$templateRequest: any,
|
|
131
|
-
$parse: import("../parse/interface.ts").ParseService,
|
|
132
|
-
$controller: any,
|
|
133
|
-
$rootScope: import("../scope/scope.js").Scope,
|
|
134
|
-
$sce: any,
|
|
135
|
-
$animate: any,
|
|
136
|
-
) => (
|
|
137
|
-
compileNode: string | Element | Node | ChildNode | NodeList,
|
|
138
|
-
transcludeFn?: TranscludeFn,
|
|
139
|
-
maxPriority?: number,
|
|
140
|
-
ignoreDirective?: string,
|
|
141
|
-
previousCompileContext?: any,
|
|
142
|
-
) => PublicLinkFn)
|
|
143
|
-
)[];
|
|
144
|
-
}
|
|
145
|
-
/**
|
|
146
|
-
* A function passed as the fifth argument to a {@type PublicLinkFn} link function.
|
|
147
|
-
* It behaves like a linking function, with the `scope` argument automatically created
|
|
148
|
-
* as a new child of the transcluded parent scope.
|
|
149
|
-
*
|
|
150
|
-
* The function returns the DOM content to be injected (transcluded) into the directive.
|
|
151
|
-
*/
|
|
152
|
-
export type TranscludeFn = (
|
|
153
|
-
clone?: Element | Node | ChildNode | NodeList | Node[],
|
|
154
|
-
scope?: import("../scope/scope.js").Scope,
|
|
155
|
-
) => any;
|
|
156
|
-
/**
|
|
157
|
-
* A function passed as the fifth argument to a {@type PublicLinkFn} link function.
|
|
158
|
-
* It behaves like a linking function, with the `scope` argument automatically created
|
|
159
|
-
* as a new child of the transcluded parent scope.
|
|
160
|
-
*
|
|
161
|
-
* The function returns the DOM content to be injected (transcluded) into the directive.
|
|
162
|
-
*/
|
|
163
|
-
export type BoundTranscludeFn = () => Element | Node;
|
|
164
|
-
export type SimpleChange = {
|
|
165
|
-
currentValue: any;
|
|
166
|
-
firstChange: boolean;
|
|
167
|
-
};
|
|
168
|
-
export type PublicLinkFn = (
|
|
169
|
-
scope: import("../scope/scope.js").Scope,
|
|
170
|
-
cloneConnectFn?: TranscludeFn,
|
|
171
|
-
options?: any,
|
|
172
|
-
) => Element | Node | ChildNode | Node[];
|
|
173
|
-
export type CompileFn = (
|
|
174
|
-
compileNode: string | Element | Node | ChildNode | NodeList,
|
|
175
|
-
transcludeFn?: TranscludeFn,
|
|
176
|
-
maxPriority?: number,
|
|
177
|
-
ignoreDirective?: string,
|
|
178
|
-
previousCompileContext?: any,
|
|
179
|
-
) => PublicLinkFn;
|
|
180
|
-
export type LinkFnMapping = {
|
|
181
|
-
index: number;
|
|
182
|
-
nodeLinkFnCtx?: NodeLinkFnCtx;
|
|
183
|
-
childLinkFn?: CompositeLinkFn;
|
|
184
|
-
};
|
|
185
|
-
export type CompileNodesFn = () => CompositeLinkFn;
|
|
186
|
-
export type NodeLinkFn = () => Node | Element | NodeList;
|
|
187
|
-
export type NodeLinkFnCtx = {
|
|
188
|
-
nodeLinkFn: NodeLinkFn;
|
|
189
|
-
terminal: boolean;
|
|
190
|
-
transclude: TranscludeFn;
|
|
191
|
-
transcludeOnThisElement: boolean;
|
|
192
|
-
templateOnThisElement: boolean;
|
|
193
|
-
newScope: boolean;
|
|
194
|
-
};
|
|
195
|
-
export type ApplyDirectivesToNodeFn = () => NodeLinkFn;
|
|
196
|
-
export type CompositeLinkFn = (
|
|
197
|
-
scope: import("../scope/scope.js").Scope,
|
|
198
|
-
$linkNode: NodeRef,
|
|
199
|
-
parentBoundTranscludeFn?: Function,
|
|
200
|
-
) => any;
|
|
201
|
-
import { NodeRef } from "../../shared/noderef.js";
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
export function identifierForController(controller: any, ident: any): any;
|
|
2
|
-
/**
|
|
3
|
-
* The {@link ng.$controller $controller service} is used by AngularTS to create new
|
|
4
|
-
* controllers.
|
|
5
|
-
*
|
|
6
|
-
* This provider allows controller registration via the
|
|
7
|
-
* {@link ng.$controllerProvider#register register} method.
|
|
8
|
-
*/
|
|
9
|
-
export class ControllerProvider {
|
|
10
|
-
/**
|
|
11
|
-
* @type {Map<string, Function|Object>}
|
|
12
|
-
* @private
|
|
13
|
-
*/
|
|
14
|
-
private controllers;
|
|
15
|
-
/**
|
|
16
|
-
* Check if a controller with a given name exists.
|
|
17
|
-
*
|
|
18
|
-
* @param {string} name Controller name to check.
|
|
19
|
-
* @returns {boolean} True if the controller exists, false otherwise.
|
|
20
|
-
*/
|
|
21
|
-
has(name: string): boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Register a controller.
|
|
24
|
-
*
|
|
25
|
-
* @param {string|Object} name Controller name, or an object map of controllers where the keys are
|
|
26
|
-
* the names and the values are the constructors.
|
|
27
|
-
* @param {Function|Array} constructor Controller constructor function (optionally decorated with DI
|
|
28
|
-
* annotations in the array notation).
|
|
29
|
-
*/
|
|
30
|
-
register(name: string | any, constructor: Function | any[]): void;
|
|
31
|
-
/**
|
|
32
|
-
* $get method for dependency injection.
|
|
33
|
-
*/
|
|
34
|
-
$get: (
|
|
35
|
-
| string
|
|
36
|
-
| ((
|
|
37
|
-
$injector: import("../../core/di/internal-injector.js").InjectorService,
|
|
38
|
-
) => Function)
|
|
39
|
-
)[];
|
|
40
|
-
/**
|
|
41
|
-
* Adds an identifier to the controller instance in the given locals' scope.
|
|
42
|
-
*
|
|
43
|
-
* @param {Object} locals The locals object containing the scope.
|
|
44
|
-
* @param {string} identifier The identifier to assign.
|
|
45
|
-
* @param {Object} instance The controller instance.
|
|
46
|
-
* @param {string} name The name of the controller.
|
|
47
|
-
*/
|
|
48
|
-
addIdentifier(
|
|
49
|
-
locals: any,
|
|
50
|
-
identifier: string,
|
|
51
|
-
instance: any,
|
|
52
|
-
name: string,
|
|
53
|
-
): void;
|
|
54
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* @param {Array<String|Function>} modulesToLoad
|
|
4
|
-
* @param {boolean} [strictDi]
|
|
5
|
-
* @returns {InjectorService}
|
|
6
|
-
*/
|
|
7
|
-
export function createInjector(
|
|
8
|
-
modulesToLoad: Array<string | Function>,
|
|
9
|
-
strictDi?: boolean,
|
|
10
|
-
): InjectorService;
|
|
11
|
-
/**
|
|
12
|
-
* @param {any} fn
|
|
13
|
-
* @param {boolean} [strictDi]
|
|
14
|
-
* @param {String} [name]
|
|
15
|
-
* @returns {Array<string>}
|
|
16
|
-
*/
|
|
17
|
-
export function annotate(
|
|
18
|
-
fn: any,
|
|
19
|
-
strictDi?: boolean,
|
|
20
|
-
name?: string,
|
|
21
|
-
): Array<string>;
|
|
22
|
-
import { InjectorService } from "./internal-injector.js";
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export class FilterProvider {
|
|
2
|
-
static $inject: string[];
|
|
3
|
-
/**
|
|
4
|
-
* @param {import('../../interface.ts').Provider} $provide
|
|
5
|
-
*/
|
|
6
|
-
constructor($provide: import("../../interface.ts").Provider);
|
|
7
|
-
$provide: import("../../interface.ts").Provider;
|
|
8
|
-
/**
|
|
9
|
-
* @param {string|Record<string, import('../../interface.ts').FilterFactory>} name
|
|
10
|
-
* @param {import('../../interface.ts').FilterFactory} [factory]
|
|
11
|
-
* @return {import('../../interface.ts').Provider}
|
|
12
|
-
*/
|
|
13
|
-
register(
|
|
14
|
-
name: string | Record<string, import("../../interface.ts").FilterFactory>,
|
|
15
|
-
factory?: import("../../interface.ts").FilterFactory,
|
|
16
|
-
): import("../../interface.ts").Provider;
|
|
17
|
-
$get: (
|
|
18
|
-
| string
|
|
19
|
-
| ((
|
|
20
|
-
$injector: import("../../core/di/internal-injector.js").InjectorService,
|
|
21
|
-
) => import("../../interface.ts").FilterFn)
|
|
22
|
-
)[];
|
|
23
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* Used for configuring the interpolation markup. Defaults to `{{` and `}}`.
|
|
4
|
-
*
|
|
5
|
-
* <div class="alert alert-danger">
|
|
6
|
-
* This feature is sometimes used to mix different markup languages, e.g. to wrap an AngularTS
|
|
7
|
-
* template within a Python Jinja template (or any other template language). Mixing templating
|
|
8
|
-
* languages is **very dangerous**. The embedding template language will not safely escape AngularTS
|
|
9
|
-
* expressions, so any user-controlled values in the template will cause Cross Site Scripting (XSS)
|
|
10
|
-
* security bugs!
|
|
11
|
-
* </div>
|
|
12
|
-
*/
|
|
13
|
-
export class InterpolateProvider {
|
|
14
|
-
/**
|
|
15
|
-
* @type {string} Symbol to denote start of expression in the interpolated string. Defaults to `{{`.
|
|
16
|
-
*/
|
|
17
|
-
startSymbol: string;
|
|
18
|
-
/**
|
|
19
|
-
* @type {string} Symbol to denote the end of expression in the interpolated string. Defaults to `}}`.
|
|
20
|
-
*/
|
|
21
|
-
endSymbol: string;
|
|
22
|
-
$get: (
|
|
23
|
-
| string
|
|
24
|
-
| ((
|
|
25
|
-
$parse: import("../parse/interface.ts").ParseService,
|
|
26
|
-
$sce: any,
|
|
27
|
-
) => {
|
|
28
|
-
(
|
|
29
|
-
text: string,
|
|
30
|
-
mustHaveExpression?: boolean | undefined,
|
|
31
|
-
trustedContext?: string | undefined,
|
|
32
|
-
allOrNothing?: boolean | undefined,
|
|
33
|
-
): Function;
|
|
34
|
-
startSymbol(): string;
|
|
35
|
-
endSymbol(): string;
|
|
36
|
-
})
|
|
37
|
-
)[];
|
|
38
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { ASTType } from "../ast-type.js";
|
|
2
|
-
/**
|
|
3
|
-
* Represents a node in an Abstract Syntax Tree (AST).
|
|
4
|
-
*/
|
|
5
|
-
export type ASTNode = {
|
|
6
|
-
/** The type of the AST node. */
|
|
7
|
-
type: ASTType;
|
|
8
|
-
/** The name of the identifier, if applicable. */
|
|
9
|
-
name?: string;
|
|
10
|
-
/** The kind of the property (e.g., 'init'). */
|
|
11
|
-
kind?: string;
|
|
12
|
-
/** The value of the node if it is a literal. */
|
|
13
|
-
value?: any;
|
|
14
|
-
/** The elements of an array node. */
|
|
15
|
-
elements?: ASTNode[];
|
|
16
|
-
/** The properties of an object node. */
|
|
17
|
-
properties?: ASTNode[];
|
|
18
|
-
/** The key of an object property. */
|
|
19
|
-
key?: ASTNode;
|
|
20
|
-
/** The left-hand side of a binary expression. */
|
|
21
|
-
left?: ASTNode;
|
|
22
|
-
/** The right-hand side of a binary expression. */
|
|
23
|
-
right?: ASTNode;
|
|
24
|
-
/** The argument of a unary expression. */
|
|
25
|
-
argument?: ASTNode;
|
|
26
|
-
/** The test expression of a conditional expression. */
|
|
27
|
-
test?: ASTNode;
|
|
28
|
-
/** The alternate expression of a conditional expression. */
|
|
29
|
-
alternate?: ASTNode;
|
|
30
|
-
/** The consequent expression of a conditional expression. */
|
|
31
|
-
consequent?: ASTNode;
|
|
32
|
-
/** The body of a program or block statement. */
|
|
33
|
-
body?: ASTNode[];
|
|
34
|
-
/** A list of expressions to observe in a program or block statement. */
|
|
35
|
-
toWatch?: ASTNode[];
|
|
36
|
-
/** The expression of an expression statement. */
|
|
37
|
-
expression?: ASTNode;
|
|
38
|
-
/** The callee of a call expression. */
|
|
39
|
-
callee?: ASTNode;
|
|
40
|
-
/** The arguments of a call expression. */
|
|
41
|
-
arguments?: ASTNode[];
|
|
42
|
-
/** Indicates if a unary operator is a prefix. */
|
|
43
|
-
prefix?: boolean;
|
|
44
|
-
/** The object of a member expression. */
|
|
45
|
-
object?: ASTNode;
|
|
46
|
-
/** The property of a member expression. */
|
|
47
|
-
property?: ASTNode;
|
|
48
|
-
/** Indicates if a member expression is computed. */
|
|
49
|
-
computed?: boolean;
|
|
50
|
-
/** The operator of a binary or logical expression. */
|
|
51
|
-
operator?: string;
|
|
52
|
-
/** Indicates if the expression should be filtered. */
|
|
53
|
-
filter?: boolean;
|
|
54
|
-
/** Indicates in node depends on non-shallow state of objects */
|
|
55
|
-
isPure?: boolean;
|
|
56
|
-
};
|
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @class
|
|
3
|
-
*/
|
|
4
|
-
export class AST {
|
|
5
|
-
/**
|
|
6
|
-
* @param {import('../lexer/lexer.js').Lexer} lexer - The lexer instance for tokenizing input
|
|
7
|
-
*/
|
|
8
|
-
constructor(lexer: import("../lexer/lexer.js").Lexer);
|
|
9
|
-
/** @type {import('../lexer/lexer.js').Lexer} */
|
|
10
|
-
lexer: import("../lexer/lexer.js").Lexer;
|
|
11
|
-
selfReferential: {
|
|
12
|
-
this: {
|
|
13
|
-
type: number;
|
|
14
|
-
};
|
|
15
|
-
$locals: {
|
|
16
|
-
type: number;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* Parses the input text and generates an AST.
|
|
21
|
-
* @param {string} text - The input text to parse.
|
|
22
|
-
* @returns {ASTNode} The root node of the AST.
|
|
23
|
-
*/
|
|
24
|
-
ast(text: string): ASTNode;
|
|
25
|
-
text: string;
|
|
26
|
-
tokens: import("../lexer/token.js").Token[];
|
|
27
|
-
/**
|
|
28
|
-
* Parses a program.
|
|
29
|
-
* @returns {ASTNode} The program node.
|
|
30
|
-
*/
|
|
31
|
-
program(): ASTNode;
|
|
32
|
-
/**
|
|
33
|
-
* Parses an expression statement.
|
|
34
|
-
* @returns {ASTNode} The expression statement node.
|
|
35
|
-
*/
|
|
36
|
-
expressionStatement(): ASTNode;
|
|
37
|
-
/**
|
|
38
|
-
* Parses a filter chain.
|
|
39
|
-
* @returns {ASTNode} The filter chain node.
|
|
40
|
-
*/
|
|
41
|
-
filterChain(): ASTNode;
|
|
42
|
-
/**
|
|
43
|
-
* Parses an assignment expression.
|
|
44
|
-
* @returns {ASTNode} The assignment expression node.
|
|
45
|
-
*/
|
|
46
|
-
assignment(): ASTNode;
|
|
47
|
-
/**
|
|
48
|
-
* Parses a ternary expression.
|
|
49
|
-
* @returns {ASTNode} The ternary expression node.
|
|
50
|
-
*/
|
|
51
|
-
ternary(): ASTNode;
|
|
52
|
-
/**
|
|
53
|
-
* Parses a logical OR expression.
|
|
54
|
-
* @returns {ASTNode} The logical OR expression node.
|
|
55
|
-
*/
|
|
56
|
-
logicalOR(): ASTNode;
|
|
57
|
-
/**
|
|
58
|
-
* Parses a logical AND expression.
|
|
59
|
-
* @returns {ASTNode} The logical AND expression node.
|
|
60
|
-
*/
|
|
61
|
-
logicalAND(): ASTNode;
|
|
62
|
-
/**
|
|
63
|
-
* Parses an equality expression.
|
|
64
|
-
* @returns {ASTNode} The equality expression node.
|
|
65
|
-
*/
|
|
66
|
-
equality(): ASTNode;
|
|
67
|
-
/**
|
|
68
|
-
* Parses a relational expression.
|
|
69
|
-
* @returns {ASTNode} The relational expression node.
|
|
70
|
-
*/
|
|
71
|
-
relational(): ASTNode;
|
|
72
|
-
/**
|
|
73
|
-
* Parses an additive expression.
|
|
74
|
-
* @returns {ASTNode} The additive expression node.
|
|
75
|
-
*/
|
|
76
|
-
additive(): ASTNode;
|
|
77
|
-
/**
|
|
78
|
-
* Parses a multiplicative expression.
|
|
79
|
-
* @returns {ASTNode} The multiplicative expression node.
|
|
80
|
-
*/
|
|
81
|
-
multiplicative(): ASTNode;
|
|
82
|
-
/**
|
|
83
|
-
* Parses a unary expression.
|
|
84
|
-
* @returns {ASTNode} The unary expression node.
|
|
85
|
-
*/
|
|
86
|
-
unary(): ASTNode;
|
|
87
|
-
/**
|
|
88
|
-
* Parses a primary expression.
|
|
89
|
-
* @returns {ASTNode} The primary expression node.
|
|
90
|
-
*/
|
|
91
|
-
primary(): ASTNode;
|
|
92
|
-
/**
|
|
93
|
-
* Parses a filter.
|
|
94
|
-
* @param {ASTNode} baseExpression - The base expression to apply the filter to.
|
|
95
|
-
* @returns {ASTNode} The filter node.
|
|
96
|
-
*/
|
|
97
|
-
filter(baseExpression: ASTNode): ASTNode;
|
|
98
|
-
/**
|
|
99
|
-
* Parses function arguments.
|
|
100
|
-
* @returns {ASTNode[]} The arguments array.
|
|
101
|
-
*/
|
|
102
|
-
parseArguments(): ASTNode[];
|
|
103
|
-
/**
|
|
104
|
-
* Parses an identifier.
|
|
105
|
-
* @returns {ASTNode} The identifier node.
|
|
106
|
-
*/
|
|
107
|
-
identifier(): ASTNode;
|
|
108
|
-
/**
|
|
109
|
-
* Parses a constant.
|
|
110
|
-
* @returns {ASTNode} The constant node.
|
|
111
|
-
*/
|
|
112
|
-
constant(): ASTNode;
|
|
113
|
-
/**
|
|
114
|
-
* Parses an array declaration.
|
|
115
|
-
* @returns {ASTNode} The array declaration node.
|
|
116
|
-
*/
|
|
117
|
-
arrayDeclaration(): ASTNode;
|
|
118
|
-
/**
|
|
119
|
-
* Parses an object.
|
|
120
|
-
* @returns {ASTNode} The object node.
|
|
121
|
-
*/
|
|
122
|
-
object(): ASTNode;
|
|
123
|
-
/**
|
|
124
|
-
* Throws a syntax error.
|
|
125
|
-
* @param {string} msg - The error message.
|
|
126
|
-
* @param {import("../lexer/lexer.js").Token} [token] - The token that caused the error.
|
|
127
|
-
*/
|
|
128
|
-
throwError(msg: string, token?: import("../lexer/lexer.js").Token): void;
|
|
129
|
-
/**
|
|
130
|
-
* Consumes a token if it matches the expected type.
|
|
131
|
-
* @param {string} [e1] - The expected token type.
|
|
132
|
-
* @returns {import("../lexer/lexer.js").Token} The consumed token.
|
|
133
|
-
*/
|
|
134
|
-
consume(e1?: string): import("../lexer/lexer.js").Token;
|
|
135
|
-
/**
|
|
136
|
-
* Returns the next token without consuming it.
|
|
137
|
-
* @returns {import("../lexer/lexer.js").Token} The next token.
|
|
138
|
-
*/
|
|
139
|
-
peekToken(): import("../lexer/lexer.js").Token;
|
|
140
|
-
/**
|
|
141
|
-
* Checks if the next token matches any of the expected types.
|
|
142
|
-
* @param {...string} [expected] - The expected token types.
|
|
143
|
-
* @returns {import('../lexer/lexer.js').Token|boolean} The next token if it matches, otherwise false.
|
|
144
|
-
*/
|
|
145
|
-
peek(...expected: string[]): import("../lexer/lexer.js").Token | boolean;
|
|
146
|
-
/**
|
|
147
|
-
* Checks if the token at the specified index matches any of the expected types.
|
|
148
|
-
* @param {number} i - The index to check.
|
|
149
|
-
* @param {...string} [expected] - The expected token types.
|
|
150
|
-
* @returns {import("../lexer/lexer.js").Token|boolean} The token at the specified index if it matches, otherwise false.
|
|
151
|
-
*/
|
|
152
|
-
peekAhead(
|
|
153
|
-
i: number,
|
|
154
|
-
...expected: string[]
|
|
155
|
-
): import("../lexer/lexer.js").Token | boolean;
|
|
156
|
-
/**
|
|
157
|
-
* Consumes the next token if it matches any of the expected types.
|
|
158
|
-
* @param {...string} [expected] - The expected token types.
|
|
159
|
-
* @returns {import("../lexer/lexer.js").Token|boolean} The consumed token if it matches, otherwise false.
|
|
160
|
-
*/
|
|
161
|
-
expect(...expected: string[]): import("../lexer/lexer.js").Token | boolean;
|
|
162
|
-
}
|
|
163
|
-
export type ASTNode = import("./ast-node.ts").ASTNode;
|
|
164
|
-
export type Token = import("../lexer/token.js").Token;
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @typedef {Object} LexerOptions
|
|
3
|
-
* @property {(ch: string, codePoint: number) => boolean} [isIdentifierStart] - Custom function to determine if a character is a valid identifier start.
|
|
4
|
-
* @property {(ch: string, codePoint: number) => boolean} [isIdentifierContinue] - Custom function to determine if a character is a valid identifier continuation.
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Represents a lexer that tokenizes input text. The Lexer takes the original expression string and returns an array of tokens parsed from that string.
|
|
8
|
-
* For example, the string "a + b" would result in tokens for a, +, and b.
|
|
9
|
-
*/
|
|
10
|
-
export class Lexer {
|
|
11
|
-
/**
|
|
12
|
-
* Creates an instance of Lexer.
|
|
13
|
-
* @param {LexerOptions} options - Lexer options.
|
|
14
|
-
*/
|
|
15
|
-
constructor(options: LexerOptions);
|
|
16
|
-
/** @type {LexerOptions} */
|
|
17
|
-
options: LexerOptions;
|
|
18
|
-
/**
|
|
19
|
-
* Tokenizes the input text.
|
|
20
|
-
* @param {string} text Input text to lex.
|
|
21
|
-
* @returns {Array<Token>} Array of tokens.
|
|
22
|
-
*/
|
|
23
|
-
lex(text: string): Array<Token>;
|
|
24
|
-
text: string;
|
|
25
|
-
index: number;
|
|
26
|
-
/** @type {Array<Token>} */
|
|
27
|
-
tokens: Array<Token>;
|
|
28
|
-
/**
|
|
29
|
-
* Checks if a character is contained in a set of characters.
|
|
30
|
-
* @param {string} ch Character to check.
|
|
31
|
-
* @param {string} chars Set of characters.
|
|
32
|
-
* @returns {boolean} True if character is in the set, false otherwise.
|
|
33
|
-
*/
|
|
34
|
-
is(ch: string, chars: string): boolean;
|
|
35
|
-
/**
|
|
36
|
-
* Peeks at the next character in the text.
|
|
37
|
-
* @param {number} [i=1] Number of characters to peek.
|
|
38
|
-
* @returns {string|false} Next character or false if end of text.
|
|
39
|
-
*/
|
|
40
|
-
peek(i?: number): string | false;
|
|
41
|
-
/**
|
|
42
|
-
* Checks if a character is a number.
|
|
43
|
-
* @param {string} ch Character to check.
|
|
44
|
-
* @returns {boolean} True if character is a number, false otherwise.
|
|
45
|
-
*/
|
|
46
|
-
isNumber(ch: string): boolean;
|
|
47
|
-
/**
|
|
48
|
-
* Checks if a character is whitespace.
|
|
49
|
-
* @param {string} ch Character to check.
|
|
50
|
-
* @returns {boolean} True if character is whitespace, false otherwise.
|
|
51
|
-
*/
|
|
52
|
-
isWhitespace(ch: string): boolean;
|
|
53
|
-
/**
|
|
54
|
-
* Checks if a character is a valid identifier start.
|
|
55
|
-
* @param {string} ch Character to check.
|
|
56
|
-
* @returns {boolean} True if character is a valid identifier start, false otherwise.
|
|
57
|
-
*/
|
|
58
|
-
isIdentifierStart(ch: string): boolean;
|
|
59
|
-
/**
|
|
60
|
-
* Checks if a character is a valid identifier continuation.
|
|
61
|
-
* @param {string} ch Character to check.
|
|
62
|
-
* @returns {boolean} True if character is a valid identifier continuation, false otherwise.
|
|
63
|
-
*/
|
|
64
|
-
isIdentifierContinue(ch: string): boolean;
|
|
65
|
-
/**
|
|
66
|
-
* Converts a character to its Unicode code point.
|
|
67
|
-
* @param {string} ch Character to convert.
|
|
68
|
-
* @returns {number} Unicode code point.
|
|
69
|
-
*/
|
|
70
|
-
codePointAt(ch: string): number;
|
|
71
|
-
/**
|
|
72
|
-
* Peeks at the next multicharacter sequence in the text.
|
|
73
|
-
* @returns {string} Next multicharacter sequence.
|
|
74
|
-
*/
|
|
75
|
-
peekMultichar(): string;
|
|
76
|
-
/**
|
|
77
|
-
* Checks if a character is an exponent operator.
|
|
78
|
-
* @param {string} ch Character to check.
|
|
79
|
-
* @returns {boolean} True if character is an exponent operator, false otherwise.
|
|
80
|
-
*/
|
|
81
|
-
isExpOperator(ch: string): boolean;
|
|
82
|
-
/**
|
|
83
|
-
* Throws a lexer error.
|
|
84
|
-
* @param {string} error Error message.
|
|
85
|
-
* @param {number} [start] Start index.
|
|
86
|
-
* @param {number} [end] End index.
|
|
87
|
-
* @throws {Error} Lexer error.
|
|
88
|
-
*/
|
|
89
|
-
throwError(error: string, start?: number, end?: number): void;
|
|
90
|
-
/**
|
|
91
|
-
* Reads and tokenizes a number from the text.
|
|
92
|
-
* @return {void}
|
|
93
|
-
*/
|
|
94
|
-
readNumber(): void;
|
|
95
|
-
/**
|
|
96
|
-
* Reads and tokenizes an identifier from the text.
|
|
97
|
-
*/
|
|
98
|
-
readIdent(): void;
|
|
99
|
-
/**
|
|
100
|
-
* Reads and tokenizes a string from the text.
|
|
101
|
-
* @param {string} quote Quote character used for the string.
|
|
102
|
-
*/
|
|
103
|
-
readString(quote: string): void;
|
|
104
|
-
/**
|
|
105
|
-
* @returns {string}
|
|
106
|
-
*/
|
|
107
|
-
handleUnicodeEscape(): string;
|
|
108
|
-
}
|
|
109
|
-
export type Token = import("./token.ts").Token;
|
|
110
|
-
export type LexerOptions = {
|
|
111
|
-
/**
|
|
112
|
-
* - Custom function to determine if a character is a valid identifier start.
|
|
113
|
-
*/
|
|
114
|
-
isIdentifierStart?: (ch: string, codePoint: number) => boolean;
|
|
115
|
-
/**
|
|
116
|
-
* - Custom function to determine if a character is a valid identifier continuation.
|
|
117
|
-
*/
|
|
118
|
-
isIdentifierContinue?: (ch: string, codePoint: number) => boolean;
|
|
119
|
-
};
|