Skip to content

Commit d8d1a51

Browse files
committed
Update ignore, add lint ignore tags in newly included files.
1 parent a243c9d commit d8d1a51

3 files changed

Lines changed: 34 additions & 21 deletions

File tree

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
resources/_internal
2-
*.d.ts
2+
resources/Dist
3+
resources/extensions/*.d.ts

src/XrmDefinitelyTyped/Resources/metadata.d.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ declare namespace SDK {
2929
* This function must accept an Error object as a parameter.
3030
* @param passThroughObject An Object that will be passed through to as the second parameter to the successCallBack.
3131
*/
32+
//eslint-disable-next-line @typescript-eslint/no-explicit-any
3233
function RetrieveAllEntities(EntityFilters: EntityFilters, RetrieveAsIfPublished: boolean, successCallback: (metadata: EntityMetadata[], passThroughObject?: any) => any, errorCallback: (error: Error) => any, passThroughObject: any): void;
3334

3435
/**
@@ -45,6 +46,7 @@ declare namespace SDK {
4546
* This function must accept an Error object as a parameter.
4647
* @param passThroughObject An Object that will be passed through to as the second parameter to the successCallBack.
4748
*/
49+
//eslint-disable-next-line @typescript-eslint/no-explicit-any
4850
function RetrieveEntity(EntityFilters: EntityFilters, LogicalName: string, MetadataId: string | null, RetrieveAsIfPublished: boolean, successCallback: (metadata: EntityMetadata, passThroughObject?: any) => any, errorCallback: (error: Error) => any, passThroughObject: any): void;
4951
/**
5052
* Sends an asynchronous RetrieveAttribute Request to retrieve a specific entity.
@@ -59,10 +61,11 @@ declare namespace SDK {
5961
* This function must accept an Error object as a parameter.
6062
* @param passThroughObject An Object that will be passed through to as the second parameter to the successCallBack.
6163
*/
64+
//eslint-disable-next-line @typescript-eslint/no-explicit-any
6265
function RetrieveAttribute(EntityLogicalName: string, LogicalName: string, MetadataId: string | null, RetrieveAsIfPublished: boolean, successCallback: (metadata: AttributeMetadata, passThroughObject?: any) => any, errorCallback: (error: Error) => any, passThroughObject: any): void;
6366

6467
interface BasicMetadata {
65-
HasChanged: any;
68+
HasChanged: any; //eslint-disable-line @typescript-eslint/no-explicit-any
6669
MetadataId: string;
6770
IsManaged: boolean;
6871
}
@@ -225,7 +228,7 @@ declare namespace SDK {
225228
*/
226229
Attributes: AttributeMetadata[];
227230

228-
AutoCreateAccessTeams: any;
231+
AutoCreateAccessTeams: any; //eslint-disable-line @typescript-eslint/no-explicit-any
229232
AutoRouteToOwnerQueue: boolean;
230233

231234
CanBeInManyToMany: ManagedProperty<boolean>;

src/XrmDefinitelyTyped/Resources/xrm.d.ts

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
* @param item The current object.
8484
* @param index The index of the current object.
8585
*/
86-
(item: T, index: number): any;
86+
(item: T, index: number): any; //eslint-disable-line @typescript-eslint/no-explicit-any
8787
}
8888

8989
/**
@@ -130,43 +130,43 @@
130130
/**
131131
* A collection of attributes.
132132
*/
133-
interface AttributeCollection extends Collection<Attribute<any>> {}
133+
interface AttributeCollection extends Collection<Attribute<any>> {} //eslint-disable-line @typescript-eslint/no-empty-interface, @typescript-eslint/no-explicit-any
134134

135135
/**
136136
* A collection of controls.
137137
*/
138138

139-
interface ControlCollection extends Collection<AnyControl> {}
139+
interface ControlCollection extends Collection<AnyControl> {} //eslint-disable-line @typescript-eslint/no-empty-interface
140140

141141
/**
142142
* A collection of sections.
143143
*/
144-
interface SectionCollection extends Collection<PageSection> {}
144+
interface SectionCollection extends Collection<PageSection> {} //eslint-disable-line @typescript-eslint/no-empty-interface
145145

146146
/**
147147
* A collection of tabs.
148148
*/
149-
interface TabCollection extends Collection<PageTab<SectionCollection>> {}
149+
interface TabCollection extends Collection<PageTab<SectionCollection>> {} //eslint-disable-line @typescript-eslint/no-empty-interface
150150

151151
/**
152152
* A collection of attributes.
153153
*/
154-
interface AttributeCollectionBase extends CollectionBase<Attribute<any>> {}
154+
interface AttributeCollectionBase extends CollectionBase<Attribute<any>> {} //eslint-disable-line @typescript-eslint/no-empty-interface, @typescript-eslint/no-explicit-any
155155

156156
/**
157157
* A collection of controls.
158158
*/
159-
interface ControlCollectionBase extends CollectionBase<AnyControl> {}
159+
interface ControlCollectionBase extends CollectionBase<AnyControl> {} //eslint-disable-line @typescript-eslint/no-empty-interface
160160

161161
/**
162162
* A collection of sections.
163163
*/
164-
interface SectionCollectionBase extends CollectionBase<PageSection> {}
164+
interface SectionCollectionBase extends CollectionBase<PageSection> {} //eslint-disable-line @typescript-eslint/no-empty-interface
165165

166166
/**
167167
* A collection of tabs.
168168
*/
169-
interface TabCollectionBase extends CollectionBase<PageTab<SectionCollectionBase>> {}
169+
interface TabCollectionBase extends CollectionBase<PageTab<SectionCollectionBase>> {} //eslint-disable-line @typescript-eslint/no-empty-interface
170170

171171
type AttributeType = "boolean" | "datetime" | "decimal" | "double" | "integer" | "lookup" | "memo" | "money" | "optionset" | "string" | "multiselectoptionset";
172172

@@ -225,7 +225,7 @@
225225
/**
226226
* Get a reference to the Xrm.Page.data.entity object that is the parent to all attributes.
227227
*/
228-
getParent(): PageEntity<Collection<Attribute<any>>>;
228+
getParent(): PageEntity<Collection<Attribute<any>>>; //eslint-disable-line @typescript-eslint/no-explicit-any
229229

230230
/**
231231
* Returns an object with three Boolean properties corresponding to privileges indicating if the user can create,
@@ -239,14 +239,14 @@
239239
*
240240
* @param functionRef The event handler for the on change event.
241241
*/
242-
addOnChange(functionRef: (context?: ExecutionContext<this, undefined>) => any): void;
242+
addOnChange(functionRef: (context?: ExecutionContext<this, undefined>) => any): void; //eslint-disable-line @typescript-eslint/no-explicit-any
243243

244244
/**
245245
* Removes a function from the OnChange event hander for an attribute.
246246
*
247247
* @param functionRef The event handler for the on change event.
248248
*/
249-
removeOnChange(functionRef: Function): void;
249+
removeOnChange(functionRef: Function): void; //eslint-disable-line @typescript-eslint/ban-types
250250

251251
/**
252252
* Causes the OnChange event to occur on the attribute so that any script associated to that event can execute.
@@ -410,6 +410,7 @@
410410
setVisible(visible: boolean): void;
411411
}
412412

413+
//eslint-disable-next-line @typescript-eslint/no-explicit-any
413414
interface Control<T extends Xrm.Attribute<any>> extends BaseControl {
414415
/**
415416
* Get the attribute this control is bound to.
@@ -461,7 +462,7 @@
461462
/**
462463
* Returns the object in the form that represents an IFRAME or WebResource.
463464
*/
464-
getObject(): any;
465+
getObject(): any; //eslint-disable-line @typescript-eslint/no-explicit-any
465466

466467
/**
467468
* Returns the current URL being displayed in an IFRAME or WebResource.
@@ -506,6 +507,7 @@
506507
/**
507508
* Interface for a DateTime form control.
508509
*/
510+
//eslint-disable-next-line @typescript-eslint/no-empty-interface
509511
interface DateControl extends Control<Attribute<Date>> {}
510512

511513
/**
@@ -538,6 +540,7 @@
538540
/**
539541
* Interface for a SubGrid form control.
540542
*/
543+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
541544
interface SubGridControl<T extends string> extends BaseControl {
542545
/**
543546
* Refreshes the data displayed in a subgrid.
@@ -548,6 +551,7 @@
548551
/**
549552
* Type to be be used for iterating over a list of controls and being able to interact with all of them with precursory checks for undefined
550553
*/
554+
//eslint-disable-next-line @typescript-eslint/no-explicit-any
551555
type AnyControl = BaseControl & Partial<Control<any> & WebResourceControl & IFrameControl & LookupControl<string> & SubGridControl<string> & DateControl & OptionSetControl<any>>;
552556

553557
const enum ViewTypeNumber {
@@ -579,11 +583,13 @@
579583
/**
580584
* Interface for a string form control.
581585
*/
586+
//eslint-disable-next-line @typescript-eslint/no-empty-interface
582587
interface StringControl extends Control<Attribute<string>> {}
583588

584589
/**
585590
* Interface for a number form control.
586591
*/
592+
//eslint-disable-next-line @typescript-eslint/no-empty-interface
587593
interface NumberControl extends Control<NumberAttribute> {}
588594

589595
/**
@@ -601,14 +607,15 @@
601607
* @param functionRef Reference to a function. It will be added to the bottom of the event handler pipeline.
602608
* The execution context is automatically set to be passed as the first parameter passed to event handlers set using this method.
603609
*/
610+
//eslint-disable-next-line @typescript-eslint/no-explicit-any
604611
addOnSave(functionRef: (context?: SaveEventContext<this>) => any): void;
605612

606613
/**
607614
* Removes a function to be called when the record is saved.
608615
*
609616
* @param functionRef Reference to a function that was added to the OnSave event.
610617
*/
611-
removeOnSave(functionRef: Function): void;
618+
removeOnSave(functionRef: Function): void; //eslint-disable-line @typescript-eslint/ban-types
612619

613620
/**
614621
* Returns a string representing the GUID id value for the record.
@@ -658,16 +665,17 @@
658665
* @param key Key for the value
659666
* @param value The value to be stored
660667
*/
661-
setSharedVariable(key: string, value: any): void;
668+
setSharedVariable(key: string, value: any): void; //eslint-disable-line @typescript-eslint/no-explicit-any
662669

663670
/**
664671
* Retrieves a variable set using setSharedVariable.
665672
*
666673
* @param key Key for the desired value
667674
*/
668-
getSharedVariable(key: string): any;
675+
getSharedVariable(key: string): any; //eslint-disable-line @typescript-eslint/no-explicit-any
669676
}
670677

678+
//eslint-disable-next-line @typescript-eslint/no-empty-interface
671679
interface SaveEventContext<T> extends ExecutionContext<T, SaveEventArgs> { }
672680

673681
interface SaveEventArgs {
@@ -1126,7 +1134,7 @@
11261134
/**
11271135
* Generic getAttribute
11281136
*/
1129-
getAttribute(attrName: string): Xrm.Attribute<any> | undefined;
1137+
getAttribute(attrName: string): Xrm.Attribute<any> | undefined; //eslint-disable-line @typescript-eslint/no-explicit-any
11301138

11311139
/**
11321140
* Generic getControl
@@ -1139,6 +1147,7 @@ type BaseXrm = typeof Xrm;
11391147
/**
11401148
* Client-side xRM object model.
11411149
*/
1150+
//eslint-disable-next-line @typescript-eslint/no-unused-vars
11421151
interface Xrm<T extends Xrm.PageBase<Xrm.AttributeCollectionBase, Xrm.TabCollectionBase, Xrm.ControlCollectionBase>> extends BaseXrm {
11431152
/**
11441153
* Various utility functions can be found here.
@@ -1147,7 +1156,7 @@ interface Xrm<T extends Xrm.PageBase<Xrm.AttributeCollectionBase, Xrm.TabCollect
11471156
}
11481157

11491158
declare namespace Xrm {
1150-
var Utility: Utility;
1159+
let Utility: Utility;
11511160

11521161
/**
11531162
* Interface for a Lookup which is used by some Xrm.Utility functions.

0 commit comments

Comments
 (0)