@angular-wave/angular.ts 0.0.62 → 0.0.63

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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@angular-wave/angular.ts",
3
3
  "description": "A modern, optimized and typesafe version of AngularJS",
4
4
  "license": "MIT",
5
- "version": "0.0.62",
5
+ "version": "0.0.63",
6
6
  "type": "module",
7
7
  "main": "dist/angular-ts.esm.js",
8
8
  "browser": "dist/angular-ts.umd.js",
@@ -1923,15 +1923,6 @@ describe("angular", () => {
1923
1923
  expect(injector).toBeDefined();
1924
1924
  });
1925
1925
 
1926
- it("should resume deferred bootstrap, if defined", () => {
1927
- window.name = "NG_DEFER_BOOTSTRAP!";
1928
-
1929
- angular.resumeDeferredBootstrap = () => {};
1930
- const spy = spyOn(angular, "resumeDeferredBootstrap");
1931
- injector = angular.bootstrap(element);
1932
- expect(spy).toHaveBeenCalled();
1933
- });
1934
-
1935
1926
  it("should wait for extra modules", () => {
1936
1927
  window.name = "NG_DEFER_BOOTSTRAP!";
1937
1928
  angular.bootstrap(element);
@@ -27,7 +27,7 @@ export function $$AnimateCssDriverProvider($$animationProvider) {
27
27
  *
28
28
  * @param {*} $animateCss
29
29
  * @param {typeof import('../core/animate/animate-runner').AnimateRunner} $$AnimateRunner
30
- * @param {*} $rootElement
30
+ * @param {JQLite} $rootElement
31
31
  * @returns
32
32
  */
33
33
  function ($animateCss, $$AnimateRunner, $rootElement) {
@@ -149,6 +149,15 @@ export function $$AnimateQueueProvider($animateProvider) {
149
149
  "$$animation",
150
150
  "$$AnimateRunner",
151
151
  "$templateRequest",
152
+ /**
153
+ *
154
+ * @param {*} $rootScope
155
+ * @param {JQLite} $rootElement
156
+ * @param {*} $$animation
157
+ * @param {*} $$AnimateRunner
158
+ * @param {*} $templateRequest
159
+ * @returns
160
+ */
152
161
  function (
153
162
  $rootScope,
154
163
  $rootElement,
@@ -481,39 +481,6 @@ export function $CompileProvider($provide, $$sanitizeUriProvider) {
481
481
  return $$sanitizeUriProvider.imgSrcSanitizationTrustedUrlList();
482
482
  };
483
483
 
484
- /**
485
- * @ngdoc method
486
- * @name $compileProvider#debugInfoEnabled
487
- *
488
- * @param {boolean=} enabled update the debugInfoEnabled state if provided, otherwise just return the
489
- * current debugInfoEnabled state
490
- * @returns {*} current value if used as getter or itself (chaining) if used as setter
491
- *
492
- * @kind function
493
- *
494
- * @description
495
- * Call this method to enable/disable various debug runtime information in the compiler such as adding
496
- * binding information and a reference to the current scope on to DOM elements.
497
- * If enabled, the compiler will add the following to DOM elements that have been bound to the scope
498
- * * Data properties used by the {@link angular.element#methods `scope()`/`isolateScope()` methods} to return
499
- * the element's scope.
500
- * * Placeholder comments will contain information about what directive and binding caused the placeholder.
501
- * E.g. `<!-- ngIf: shouldShow() -->`.
502
- *
503
- * You may want to disable this in production for a significant performance boost. See
504
- * {@link guide/production#disabling-debug-data Disabling Debug Data} for more.
505
- *
506
- * The default value is true.
507
- */
508
- let debugInfoEnabled = true;
509
- this.debugInfoEnabled = function (enabled) {
510
- if (isDefined(enabled)) {
511
- debugInfoEnabled = enabled;
512
- return this;
513
- }
514
- return debugInfoEnabled;
515
- };
516
-
517
484
  /**
518
485
  * @ngdoc method
519
486
  * @name $compileProvider#strictComponentBindingsEnabled
@@ -4585,17 +4585,6 @@ describe("$compile", () => {
4585
4585
  ]);
4586
4586
  });
4587
4587
 
4588
- it("should allow debugInfoEnabled to be configured", () => {
4589
- createInjector([
4590
- "ng",
4591
- ($compileProvider) => {
4592
- expect($compileProvider.debugInfoEnabled()).toBe(true); // the default
4593
- $compileProvider.debugInfoEnabled(false);
4594
- expect($compileProvider.debugInfoEnabled()).toBe(false);
4595
- },
4596
- ]);
4597
- });
4598
-
4599
4588
  it("should allow strictComponentBindingsEnabled to be configured", () => {
4600
4589
  createInjector([
4601
4590
  "ng",
@@ -7645,42 +7634,6 @@ describe("$compile", () => {
7645
7634
  });
7646
7635
  });
7647
7636
 
7648
- describe("decorating with binding info", () => {
7649
- it("should not occur if `debugInfoEnabled` is false", () => {
7650
- createInjector([
7651
- "test1",
7652
- ($compileProvider) => {
7653
- $compileProvider.debugInfoEnabled(false);
7654
- },
7655
- ]).invoke((_$compile_, _$rootScope_, _$templateCache_) => {
7656
- $compile = _$compile_;
7657
- $rootScope = _$rootScope_;
7658
- $templateCache = _$templateCache_;
7659
- });
7660
- element = $compile("<div>{{1+2}}</div>")($rootScope);
7661
- expect(element[0].classList.contains("ng-binding")).toBe(false);
7662
- expect(element.data("$binding")).toBeUndefined();
7663
- });
7664
-
7665
- // TODO figure out debug strat
7666
- // it("should occur if `debugInfoEnabled` is true", () => {
7667
- // createInjector([
7668
- // "test1",
7669
- // ($compileProvider) => {
7670
- // $compileProvider.debugInfoEnabled(true);
7671
- // },
7672
- // ]).invoke((_$compile_, _$rootScope_, _$templateCache_) => {
7673
- // $compile = _$compile_;
7674
- // $rootScope = _$rootScope_;
7675
- // $templateCache = _$templateCache_;
7676
- // });
7677
-
7678
- // element = $compile("<div>{{1+2}}</div>")($rootScope);
7679
- // expect(element[0].classList.contains("ng-binding")).toBe(true);
7680
- // expect(element.data("$binding")).toEqual(["1+2"]);
7681
- // });
7682
- });
7683
-
7684
7637
  it("should observe interpolated attrs", () => {
7685
7638
  $compile('<div some-attr="{{value}}" observer></div>')($rootScope);
7686
7639
 
@@ -859,6 +859,13 @@ export function $LocationProvider() {
859
859
  "$rootScope",
860
860
  "$browser",
861
861
  "$rootElement",
862
+ /**
863
+ *
864
+ * @param {*} $rootScope
865
+ * @param {*} $browser
866
+ * @param {JQLite} $rootElement
867
+ * @returns
868
+ */
862
869
  function ($rootScope, $browser, $rootElement) {
863
870
  let $location;
864
871
  let LocationMode;
@@ -1,7 +1,7 @@
1
1
  import { dealoc, JQLite } from "../../shared/jqlite/jqlite";
2
2
  import { publishExternalAPI } from "../../public";
3
3
  import { createInjector } from "../../injector";
4
- import { Angular } from "../../loader";
4
+ import { Angular, setupModuleLoader } from "../../loader";
5
5
 
6
6
  describe("ngInit", () => {
7
7
  let element;
@@ -49,7 +49,7 @@ describe("ngInit", () => {
49
49
  });
50
50
 
51
51
  it("should be evaluated after ngController", () => {
52
- angular.module("test1", ["ng"]);
52
+ window.angular.module("test1", ["ng"]);
53
53
  createInjector([
54
54
  "ng",
55
55
  ($controllerProvider) => {
package/src/injector.js CHANGED
@@ -79,6 +79,13 @@ function annotate(fn, strictDi, name) {
79
79
 
80
80
  const providerSuffix = "Provider";
81
81
  const INSTANTIATING = {};
82
+
83
+ /**
84
+ *
85
+ * @param {*} modulesToLoad
86
+ * @param {*} strictDi
87
+ * @returns {import("./types").InjectorService}
88
+ */
82
89
  export function createInjector(modulesToLoad, strictDi) {
83
90
  if (isDefined(strictDi) && !isBoolean(strictDi)) {
84
91
  throw $injectorMinErr("strictDi must be boolean");