Skip to content

Commit ca0bc85

Browse files
committed
Fix missing types
1 parent a7c094c commit ca0bc85

35 files changed

Lines changed: 770 additions & 159 deletions

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: build build-ts check test test-integrations test-types types public-namespace-api update-public-namespace-api docs-examples-check coverage coverage-check coverage-update-baseline coverage-open setup ensure-deps ensure-docs-deps lint lint-check lint-fix hugo
1+
.PHONY: build build-ts check test test-integrations test-types test-namespace-js types public-namespace-api update-public-namespace-api docs-examples-check coverage coverage-check coverage-update-baseline coverage-open setup ensure-deps ensure-docs-deps lint lint-check lint-fix hugo
22

33
BUILD_DIR = ./dist
44
TS_BUILD_DIR = ./.build
@@ -81,12 +81,17 @@ check: ensure-deps
8181
@echo "Typechecking source"
8282
./node_modules/.bin/tsc
8383
@$(MAKE) test-types
84+
@$(MAKE) test-namespace-js
8485
@$(MAKE) docs-examples-check
8586

8687
test-types: ensure-deps
8788
@echo "Typechecking tests"
8889
./node_modules/.bin/tsc --project tsconfig.test.json
8990

91+
test-namespace-js: types
92+
@echo "Typechecking JavaScript namespace consumer"
93+
./node_modules/.bin/tsc --project tsconfig.namespace-js.json
94+
9095
docs-examples-check: ensure-deps
9196
@echo "Checking docs example API references"
9297
@node ./utils/check-docs-examples.mjs

dist/angular-ts.esm.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Version: 0.29.0 - May 27, 2026 02:59:27 */
1+
/* Version: 0.29.0 - May 27, 2026 03:09:28 */
22
/**
33
* Canonical token names for the built-in injectables exposed by the core `ng`
44
* module.

dist/angular-ts.umd.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Version: 0.29.0 - May 27, 2026 02:59:23 */
1+
/* Version: 0.29.0 - May 27, 2026 03:09:25 */
22
(function (global, factory) {
33
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
44
typeof define === 'function' && define.amd ? define(['exports'], factory) :

dist/angular-ts.umd.min.js.gz

-101 KB
Binary file not shown.

integrations/closure/clojurescript/scripts/generate-cljs-types.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ const cljsRoot = resolve(integrationRoot, "clojurescript");
88
const externsPath = resolve(integrationRoot, "externs/angular.js");
99
const outputPath = resolve(cljsRoot, "src/angular_ts/generated.cljs");
1010
const checkMode = process.argv.includes("--check");
11-
const expectedTypeTagCount = 195;
12-
const expectedStrictWrapperCount = 248;
13-
const expectedStrictPropertyReaderCount = 374;
11+
const expectedTypeTagCount = 194;
12+
const expectedStrictWrapperCount = 249;
13+
const expectedStrictPropertyReaderCount = 377;
1414

1515
const source = readFileSync(externsPath, "utf8");
1616

integrations/closure/clojurescript/src/angular_ts/generated.cljs

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@
6868
"js/ng.FilterService"
6969
"js/ng.HttpMethod"
7070
"js/ng.HttpParamSerializerProvider"
71-
"js/ng.HttpParamSerializerSerService"
7271
"js/ng.HttpParamSerializerService"
7372
"js/ng.HttpPromise"
7473
"js/ng.HttpProvider"
@@ -227,7 +226,7 @@
227226
"js/ng.AnnotatedDirectiveFactory" "Dependency-annotated directive factory array containing dependency token names followed by a directive factory function."
228227
"js/ng.AnnotatedFactory" "Dependency-annotated injectable array containing dependency token names followed by the factory or constructor function."
229228
"js/ng.AppComponentOptions" "Public AngularTS AppComponentOptions contract exposed through the global ng namespace for Closure-annotated applications."
230-
"js/ng.AriaProvider" "Public AngularTS AriaProvider contract exposed through the global ng namespace for Closure-annotated applications."
229+
"js/ng.AriaProvider" "Used for configuring the ARIA attributes injected and managed by ngAria. ```js angular.module('myApp', ['ngAria'], function config($ariaProvider) { $ariaProvider.config({ ariaValue: true, tabindex: false }); }); ``` ## Dependencies Requires the {@link ngAria } module to be installed."
231230
"js/ng.AriaService" "Public AngularTS AriaService contract exposed through the global ng namespace for Closure-annotated applications."
232231
"js/ng.CachedRestBackendOptions" "Configuration for {@link CachedRestBackend}."
233232
"js/ng.CompileLifecycleProvider" "Publishes controller creation/destruction events from `$compile`."
@@ -266,11 +265,10 @@
266265
"js/ng.FilterProvider" "Public AngularTS FilterProvider contract exposed through the global ng namespace for Closure-annotated applications."
267266
"js/ng.FilterService" "Public AngularTS FilterService contract exposed through the global ng namespace for Closure-annotated applications."
268267
"js/ng.HttpMethod" "Public AngularTS HttpMethod contract exposed through the global ng namespace for Closure-annotated applications."
269-
"js/ng.HttpParamSerializerProvider" "Public AngularTS HttpParamSerializerProvider contract exposed through the global ng namespace for Closure-annotated applications."
270-
"js/ng.HttpParamSerializerSerService" "Function that serializes query params into a URL-encoded string."
268+
"js/ng.HttpParamSerializerProvider" "Default params serializer that converts objects to strings according to the following rules: * `{'foo': 'bar'}` results in `foo=bar` * `{'foo': Date.now()}` results in `foo=2015-04-01T09%3A50%3A49.262Z` (`toISOString()` and encoded representation of a Date object) * `{'foo': ['bar', 'baz']}` results in `foo=bar&foo=baz` (repeated key for each array element) * `{'foo': {'bar':'baz'}}` results in `foo=%7B%22bar%22%3A%22baz%22%7D` (stringified and encoded representation of an object) Note that serializer will sort the request parameters alphabetically. Provider configuration surface available as `$httpParamSerializerProvider`."
271269
"js/ng.HttpParamSerializerService" "Function that serializes query params into a URL-encoded string."
272270
"js/ng.HttpPromise" "Public AngularTS HttpPromise contract exposed through the global ng namespace for Closure-annotated applications."
273-
"js/ng.HttpProvider" "Public AngularTS HttpProvider contract exposed through the global ng namespace for Closure-annotated applications."
271+
"js/ng.HttpProvider" "Configures the default behavior of the `$http` service. Provider configuration surface available as `$httpProvider`."
274272
"js/ng.HttpProviderDefaults" "Default request settings exposed through `$httpProvider.defaults`. Not every `RequestShortcutConfig` field is supported here; this shape only includes the fields that the runtime reads from provider-level defaults. https://docs.angularjs.org/api/ng/service/$http#defaults https://docs.angularjs.org/api/ng/service/$http#usage https://docs.angularjs.org/api/ng/provider/$httpProvider The properties section"
275273
"js/ng.HttpResponse" "Public AngularTS HttpResponse contract exposed through the global ng namespace for Closure-annotated applications."
276274
"js/ng.HttpResponseStatus" "Final transport status reported by transport completion handlers."
@@ -320,7 +318,7 @@
320318
"js/ng.RouterProvider" "Mutable router state/config shared across state, URL, and transition services."
321319
"js/ng.SceDelegateProvider" "' ]); // The banned resource URL list overrides the trusted resource URL list so the open redirect // here is blocked. $sceDelegateProvider.bannedResourceUrlList([ 'http://myapp.example.com/clickThru**' ]); }); ``` Note that an empty trusted resource URL list will block every resource URL from being loaded, and will require you to manually mark each one as trusted with `$sce.trustAsResourceUrl`. However, templates requested by {@link ng.$templateRequest $templateRequest} that are present in {@link ng.$templateCache $templateCache} will not go through this check. If you have a mechanism to populate your templates in that cache at config time, then it is a good idea to remove 'self' from the trusted resource URL lsit. This helps to mitigate the security impact of certain types of issues, like for instance attacker-controlled `ng-includes`."
322320
"js/ng.SceDelegateService" "Public AngularTS SceDelegateService contract exposed through the global ng namespace for Closure-annotated applications."
323-
"js/ng.SceProvider" "Public AngularTS SceProvider contract exposed through the global ng namespace for Closure-annotated applications."
321+
"js/ng.SceProvider" "Provider configuration surface available as `$sceProvider`."
324322
"js/ng.SceService" "Public AngularTS SceService contract exposed through the global ng namespace for Closure-annotated applications."
325323
"js/ng.Scope" "Reactive scope object used by AngularTS templates, directives, event propagation, listener registration, and queued change delivery."
326324
"js/ng.ScopeElement" "Public AngularTS ScopeElement contract exposed through the global ng namespace for Closure-annotated applications."
@@ -543,6 +541,7 @@
543541
"root-scope-service-dollartranscluded"
544542
"sce-delegate-provider-banned-resource-url-list"
545543
"sce-delegate-provider-trusted-resource-url-list"
544+
"sce-provider-enabled"
546545
"sce-service-is-enabled"
547546
"sce-service-parse"
548547
"sce-service-parse-as-html"
@@ -731,10 +730,13 @@
731730
"error-handling-config-object-max-depth"
732731
"event-bus-provider-event-bus"
733732
"filter-provider-dollarget"
733+
"http-provider-defaults"
734734
"http-provider-defaults-headers"
735735
"http-provider-defaults-with-credentials"
736736
"http-provider-defaults-xsrf-cookie-name"
737737
"http-provider-defaults-xsrf-header-name"
738+
"http-provider-interceptors"
739+
"http-provider-xsrf-trusted-origins"
738740
"http-response-config"
739741
"http-response-status"
740742
"http-response-status-text"
@@ -1806,6 +1808,11 @@
18061808
^js/Array [^js/ng.SceDelegateProvider target ^js/Array value]
18071809
(.trustedResourceUrlList target value))
18081810

1811+
(defn sce-provider-enabled
1812+
"Enables or disables SCE application-wide and returns the current state.\n\nParams:\n- value: {(boolean|undefined)}\n\nReturns: {boolean}"
1813+
^boolean [^js/ng.SceProvider target ^boolean value]
1814+
(.enabled target value))
1815+
18091816
(defn sce-service-is-enabled
18101817
"Public SceService.isEnabled member exposed by the AngularTS namespace contract.\n\nReturns: {boolean}"
18111818
^boolean [^js/ng.SceService target]
@@ -2755,6 +2762,11 @@
27552762
^js/Array [^js/ng.FilterProvider target]
27562763
(.-$get target))
27572764

2765+
(defn http-provider-defaults
2766+
"Default values applied to all `$http` requests unless a request overrides them.\n\nType: {!ng.HttpProviderDefaults}"
2767+
^js/ng.HttpProviderDefaults [^js/ng.HttpProvider target]
2768+
(.-defaults target))
2769+
27582770
(defn http-provider-defaults-headers
27592771
"Default headers merged into each request.\n\nType: {(!Object<string, (!Object<string, (boolean|function(!ng.RequestConfig): ?|null|number|string|undefined)>|boolean|function(!ng.RequestConfig): ?|null|number|string|undefined)>|undefined)}"
27602772
^js/Object [^js/ng.HttpProviderDefaults target]
@@ -2775,6 +2787,16 @@
27752787
^string [^js/ng.HttpProviderDefaults target]
27762788
(.-xsrfHeaderName target))
27772789

2790+
(defn http-provider-interceptors
2791+
"Interceptor factories applied to requests and responses.\n\nType: {!Array<(!Array<function(): !Object>|function(): !Object|string)>}"
2792+
^js/Array [^js/ng.HttpProvider target]
2793+
(.-interceptors target))
2794+
2795+
(defn http-provider-xsrf-trusted-origins
2796+
"Origins trusted to receive the XSRF token.\n\nType: {!Array<string>}"
2797+
^js/Array [^js/ng.HttpProvider target]
2798+
(.-xsrfTrustedOrigins target))
2799+
27782800
(defn http-response-config
27792801
"Request configuration that produced this response.\n\nType: {!ng.RequestConfig}"
27802802
^js/ng.RequestConfig [^js/ng.HttpResponse target]

integrations/closure/externs/angular.js

Lines changed: 42 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1054,7 +1054,7 @@ ng.AnimateProvider.prototype.register = function(name, preset) {};
10541054
ng.AnimateProvider.prototype.$get;
10551055

10561056
/**
1057-
* Public AngularTS AriaProvider contract exposed through the global ng namespace for Closure-annotated applications.
1057+
* Used for configuring the ARIA attributes injected and managed by ngAria. ```js angular.module('myApp', ['ngAria'], function config($ariaProvider) { $ariaProvider.config({ ariaValue: true, tabindex: false }); }); ``` ## Dependencies Requires the {@link ngAria } module to be installed.
10581058
* @record
10591059
*/
10601060
ng.AriaProvider = function() {};
@@ -1245,23 +1245,47 @@ ng.ExceptionHandlerProvider.prototype.handler = function(exception) {};
12451245
ng.ExceptionHandlerProvider.prototype.$get = function() {};
12461246

12471247
/**
1248-
* Public AngularTS HttpParamSerializerProvider contract exposed through the global ng namespace for Closure-annotated applications.
1248+
* Default params serializer that converts objects to strings according to the following rules: * `{'foo': 'bar'}` results in `foo=bar` * `{'foo': Date.now()}` results in `foo=2015-04-01T09%3A50%3A49.262Z` (`toISOString()` and encoded representation of a Date object) * `{'foo': ['bar', 'baz']}` results in `foo=bar&foo=baz` (repeated key for each array element) * `{'foo': {'bar':'baz'}}` results in `foo=%7B%22bar%22%3A%22baz%22%7D` (stringified and encoded representation of an object) Note that serializer will sort the request parameters alphabetically. Provider configuration surface available as `$httpParamSerializerProvider`.
12491249
* @record
12501250
*/
12511251
ng.HttpParamSerializerProvider = function() {};
12521252

12531253
/**
1254-
* Public HttpParamSerializerProvider.$get member exposed by the AngularTS namespace contract.
1254+
* Creates the runtime query-parameter serializer.
12551255
* @type {(function(): function((!Object<string, ?>|undefined)): string|undefined)}
12561256
*/
12571257
ng.HttpParamSerializerProvider.prototype.$get;
12581258

12591259
/**
1260-
* Public AngularTS HttpProvider contract exposed through the global ng namespace for Closure-annotated applications.
1260+
* Configures the default behavior of the `$http` service. Provider configuration surface available as `$httpProvider`.
12611261
* @record
12621262
*/
12631263
ng.HttpProvider = function() {};
12641264

1265+
/**
1266+
* Default values applied to all `$http` requests unless a request overrides them.
1267+
* @type {!ng.HttpProviderDefaults}
1268+
*/
1269+
ng.HttpProvider.prototype.defaults;
1270+
1271+
/**
1272+
* Interceptor factories applied to requests and responses.
1273+
* @type {!Array<(!Array<function(): !Object>|function(): !Object|string)>}
1274+
*/
1275+
ng.HttpProvider.prototype.interceptors;
1276+
1277+
/**
1278+
* Origins trusted to receive the XSRF token.
1279+
* @type {!Array<string>}
1280+
*/
1281+
ng.HttpProvider.prototype.xsrfTrustedOrigins;
1282+
1283+
/**
1284+
* Public HttpProvider.$get member exposed by the AngularTS namespace contract.
1285+
* @type {(?|undefined)}
1286+
*/
1287+
ng.HttpProvider.prototype.$get;
1288+
12651289
/**
12661290
* Public AngularTS InterpolateProvider contract exposed through the global ng namespace for Closure-annotated applications.
12671291
* @record
@@ -1467,11 +1491,24 @@ ng.SceDelegateProvider.prototype.imgSrcSanitizationTrustedUrlList = function(reg
14671491
ng.SceDelegateProvider.prototype.$get;
14681492

14691493
/**
1470-
* Public AngularTS SceProvider contract exposed through the global ng namespace for Closure-annotated applications.
1494+
* Provider configuration surface available as `$sceProvider`.
14711495
* @record
14721496
*/
14731497
ng.SceProvider = function() {};
14741498

1499+
/**
1500+
* Enables or disables SCE application-wide and returns the current state.
1501+
* @param {(boolean|undefined)} value
1502+
* @return {boolean}
1503+
*/
1504+
ng.SceProvider.prototype.enabled = function(value) {};
1505+
1506+
/**
1507+
* Public SceProvider.$get member exposed by the AngularTS namespace contract.
1508+
* @type {(?|undefined)}
1509+
*/
1510+
ng.SceProvider.prototype.$get;
1511+
14751512
/**
14761513
* Public AngularTS SseProvider contract exposed through the global ng namespace for Closure-annotated applications.
14771514
* @record
@@ -2597,12 +2634,6 @@ ng.CurrencyFilterOptions = function() {};
25972634
*/
25982635
ng.RelativeTimeFilterOptions = function() {};
25992636

2600-
/**
2601-
* Function that serializes query params into a URL-encoded string.
2602-
* @typedef {function((!Object<string, ?>|undefined)): string}
2603-
*/
2604-
ng.HttpParamSerializerSerService;
2605-
26062637
/**
26072638
* Function that serializes query params into a URL-encoded string.
26082639
* @typedef {function((!Object<string, ?>|undefined)): string}

integrations/dart/NG_NAMESPACE_PARITY.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ part of the Dart public facade.
118118
| `ExceptionHandlerService` | started |
119119
| `FilterService` | started |
120120
| `HttpParamSerializerService` | started |
121-
| `HttpParamSerializerSerService` | started |
122121
| `HttpService` | started |
123122
| `InjectorService` | started |
124123
| `InterpolateService` | started |

0 commit comments

Comments
 (0)