obsidian-typings 4.48.0 → 4.49.0

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.
@@ -8884,10 +8884,11 @@ export interface Multiselect {
8884
8884
  /**
8885
8885
  * Find a duplicate in the multiselect.
8886
8886
  *
8887
+ * @param value - the value that will be checked for being a duplicate.
8887
8888
  * @param values - the values to find a duplicate in.
8888
- * @returns `true` if a duplicate was found, `false` otherwise.
8889
+ * @returns the index of value if duplicate, otherwise `-1`.
8889
8890
  */
8890
- findDuplicate?(this: Multiselect, values: string[]): boolean;
8891
+ findDuplicate?(value: string, values: string[]): number;
8891
8892
  /**
8892
8893
  * Focus an element of the multiselect.
8893
8894
  *
@@ -8915,7 +8916,7 @@ export interface Multiselect {
8915
8916
  * @param findDuplicate - the function to find a duplicate.
8916
8917
  * @returns the multiselect.
8917
8918
  */
8918
- preventDuplicates(findDuplicate: (this: Multiselect, values: string[]) => number): this;
8919
+ preventDuplicates(findDuplicate: (value: string, values: string[]) => number): this;
8919
8920
  /**
8920
8921
  * Remove an element of the multiselect.
8921
8922
  *
@@ -25095,10 +25095,11 @@ export interface Multiselect {
25095
25095
  /**
25096
25096
  * Find a duplicate in the multiselect.
25097
25097
  *
25098
+ * @param value - the value that will be checked for being a duplicate.
25098
25099
  * @param values - the values to find a duplicate in.
25099
- * @returns `true` if a duplicate was found, `false` otherwise.
25100
+ * @returns the index of value if duplicate, otherwise `-1`.
25100
25101
  */
25101
- findDuplicate?(this: Multiselect, values: string[]): boolean;
25102
+ findDuplicate?(value: string, values: string[]): number;
25102
25103
  /**
25103
25104
  * Focus an element of the multiselect.
25104
25105
  *
@@ -25126,7 +25127,7 @@ export interface Multiselect {
25126
25127
  * @param findDuplicate - the function to find a duplicate.
25127
25128
  * @returns the multiselect.
25128
25129
  */
25129
- preventDuplicates(findDuplicate: (this: Multiselect, values: string[]) => number): this;
25130
+ preventDuplicates(findDuplicate: (value: string, values: string[]) => number): this;
25130
25131
  /**
25131
25132
  * Remove an element of the multiselect.
25132
25133
  *
@@ -93158,16 +93158,15 @@
93158
93158
  {
93159
93159
  "kind": "MethodSignature",
93160
93160
  "canonicalReference": "obsidian-typings!Multiselect#findDuplicate:member(1)",
93161
- "docComment": "/**\n * Find a duplicate in the multiselect.\n *\n * @param values - the values to find a duplicate in.\n *\n * @returns `true` if a duplicate was found, `false` otherwise.\n */\n",
93161
+ "docComment": "/**\n * Find a duplicate in the multiselect.\n *\n * @param value - the value that will be checked for being a duplicate.\n *\n * @param values - the values to find a duplicate in.\n *\n * @returns the index of value if duplicate, otherwise `-1`.\n */\n",
93162
93162
  "excerptTokens": [
93163
93163
  {
93164
93164
  "kind": "Content",
93165
- "text": "findDuplicate?(this: "
93165
+ "text": "findDuplicate?(value: "
93166
93166
  },
93167
93167
  {
93168
- "kind": "Reference",
93169
- "text": "Multiselect",
93170
- "canonicalReference": "obsidian-typings!Multiselect:interface"
93168
+ "kind": "Content",
93169
+ "text": "string"
93171
93170
  },
93172
93171
  {
93173
93172
  "kind": "Content",
@@ -93183,7 +93182,7 @@
93183
93182
  },
93184
93183
  {
93185
93184
  "kind": "Content",
93186
- "text": "boolean"
93185
+ "text": "number"
93187
93186
  },
93188
93187
  {
93189
93188
  "kind": "Content",
@@ -93199,7 +93198,7 @@
93199
93198
  "overloadIndex": 1,
93200
93199
  "parameters": [
93201
93200
  {
93202
- "parameterName": "this",
93201
+ "parameterName": "value",
93203
93202
  "parameterTypeTokenRange": {
93204
93203
  "startIndex": 1,
93205
93204
  "endIndex": 2
@@ -93531,16 +93530,7 @@
93531
93530
  },
93532
93531
  {
93533
93532
  "kind": "Content",
93534
- "text": "(this: "
93535
- },
93536
- {
93537
- "kind": "Reference",
93538
- "text": "Multiselect",
93539
- "canonicalReference": "obsidian-typings!Multiselect:interface"
93540
- },
93541
- {
93542
- "kind": "Content",
93543
- "text": ", values: string[]) => number"
93533
+ "text": "(value: string, values: string[]) => number"
93544
93534
  },
93545
93535
  {
93546
93536
  "kind": "Content",
@@ -93557,8 +93547,8 @@
93557
93547
  ],
93558
93548
  "isOptional": false,
93559
93549
  "returnTypeTokenRange": {
93560
- "startIndex": 5,
93561
- "endIndex": 6
93550
+ "startIndex": 3,
93551
+ "endIndex": 4
93562
93552
  },
93563
93553
  "releaseTag": "Public",
93564
93554
  "overloadIndex": 1,
@@ -93567,7 +93557,7 @@
93567
93557
  "parameterName": "findDuplicate",
93568
93558
  "parameterTypeTokenRange": {
93569
93559
  "startIndex": 1,
93570
- "endIndex": 4
93560
+ "endIndex": 2
93571
93561
  },
93572
93562
  "isOptional": false
93573
93563
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "obsidian-typings",
3
- "version": "4.48.0",
3
+ "version": "4.49.0",
4
4
  "description": "Extended type definitions for the Obsidian API (https://obsidian.md)",
5
5
  "main": "",
6
6
  "module": "",