From 9d409aeadcfcc8b064663bc96bfd51d65bd109e6 Mon Sep 17 00:00:00 2001 From: oscar_busk Date: Wed, 23 Aug 2017 22:10:51 +0200 Subject: [PATCH] Angular: add comment about debugInfo on scope() Add a comment explaining that the scope() and isolatedScope() methods requires debugInfoEnabled(true) to return the $scope. --- types/angular/jqlite.d.ts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/types/angular/jqlite.d.ts b/types/angular/jqlite.d.ts index fd199da74b..858201fb18 100644 --- a/types/angular/jqlite.d.ts +++ b/types/angular/jqlite.d.ts @@ -661,8 +661,21 @@ interface JQuery { controller(name?: string): any; injector(): ng.auto.IInjectorService; - /** It's declared generic for custom scope interfaces */ + /** + * Returns the `$scope` of the element. + * + * **IMPORTANT**: Requires `debugInfoEnabled` to be true. + * + * See https://docs.angularjs.org/guide/production#disabling-debug-data for more information. + */ scope(): T; + /** + * Returns the `$scope` of the element. + * + * **IMPORTANT**: Requires `debugInfoEnabled` to be true. + * + * See https://docs.angularjs.org/guide/production#disabling-debug-data for more information. + */ isolateScope(): T; inheritedData(key: string, value: any): this;