From 1aad15414807bebbcf11dad108d479ac50292336 Mon Sep 17 00:00:00 2001 From: Tim Schumacher Date: Tue, 22 Aug 2017 16:04:02 +0200 Subject: [PATCH 01/10] As the loopback API supports promises, so should the type definitions. --- types/loopback/index.d.ts | 101 ++++++++++++++++++------------- types/loopback/loopback-tests.ts | 26 +++++++- 2 files changed, 81 insertions(+), 46 deletions(-) diff --git a/types/loopback/index.d.ts b/types/loopback/index.d.ts index ce4134cb43..0fd42bde9d 100644 --- a/types/loopback/index.d.ts +++ b/types/loopback/index.d.ts @@ -1,8 +1,9 @@ -// Type definitions for Loopback 3.1 +// Type definitions for Loopback 3.2 // Project: https://github.com/strongloop/loopback // Definitions by: Andres D Jimenez +// Tim Schumacher // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 +// TypeScript Version: 2.3 /************************************************ * * @@ -146,7 +147,7 @@ declare namespace l { * `` * @returns {Array} Array of model classes */ - models(): any[]; + models(): Array; /** * Get all remote objects. @@ -1020,24 +1021,24 @@ declare namespace l { * @param {any} options An optional options object to pass to underlying data-access calls. * @param {() => void} callback Callback function */ - static bulkUpdate(updates: any[], options: any, callback: () => void): void; + static bulkUpdate(updates: any[], options: any, callback?: () => void): Promise | void; /** * Get the changes to a model since the specified checkpoint. Provide a filter object * to reduce the number of results returned. * @param {number} since Return only changes since this checkpoint. * @param {any} filter Include only changes that match this filter, the same as for [#persistedmodel-find](find()). - * @callback {() => void} callback Callback function called with `(err, changes)` arguments. Required. + * @callback {() => void} callback Callback function called with `(err, changes)` arguments. * @param {Error} err Error object; see [Error object](docs.strongloop.com/display/LB/Error+object). * @param {Array} changes An Array of [Change](#change) objects */ - static changes(since: number, filter: any, callback: (err: Error, changes: any[]) => void): void; + static changes(since: number, filter: any, callback?: (err: Error, changes: any[]) => void): Promise | void; /** * Create a checkpoint * @param {() => void} callback */ - static checkpoint(callback: () => void): void; + static checkpoint(callback?: () => void): Promise | void; /** * Return the number of records that match the optional "where" filter. @@ -1051,7 +1052,7 @@ declare namespace l { * @param {Error} err Error object; see [Error object](docs.strongloop.com/display/LB/Error+object). * @param {number} count number of instances updated */ - static count(where?: any, callback?: (err: Error, count: number) => void): void; + static count(where?: any, callback?: (err: Error, count: number) => void): Promise | void; /** * Create new instance of Model, and save to database @@ -1060,14 +1061,14 @@ declare namespace l { * @param {Error} err Error object; see [Error object](docs.strongloop.com/display/LB/Error+object). * @param {any} models Model instances or null */ - static create(data?: any|any[], callback?: (err: Error, models: any) => void): void; + static create(data?: any|any[], callback?: (err: Error, models: T|T[]) => void): Promise | void; /** * Create a change stream. See here for more info http://loopback.io/doc/en/lb2/Realtime-server-sent-events.html * @param {any} options Only changes to models matching this where filter will be included in the ChangeStream. * @param {() => void} callback */ - static createChangeStream(options: {where: any}, callback: (err: Error, changes: any) => void): void; + static createChangeStream(options: {where: any}, callback?: (err: Error, changes: any) => void): Promise | void; /** * Create an update list (for `Model.bulkUpdate()`) from a delta list @@ -1075,7 +1076,7 @@ declare namespace l { * @param {Array} deltas * @param {() => void} callback */ - static createUpdates(deltas: any[], callback: () => void): void; + static createUpdates(deltas: any[], callback?: () => void): Promise | void; /** * Get the current checkpoint ID @@ -1083,7 +1084,7 @@ declare namespace l { * @param {Error} err Error object; see [Error object](docs.strongloop.com/display/LB/Error+object). * @param {number} currentCheckpointId Current checkpoint ID */ - static currentCheckpoint(callback: (err: Error, currentCheckpointId: number) => void): void; + static currentCheckpoint(callback?: (err: Error, currentCheckpointId: number) => void): Promise | void; /** * Destroy all model instances that match the optional `where` specification @@ -1099,7 +1100,7 @@ declare namespace l { * @param {any} info Additional information about the command outcome. * @param {number} info.count number of instances (rows, documents) destroyed */ - static destroyAll(where?: any, callback?: (err: Error, info: any, infoCount: number) => void): void; + static destroyAll(where?: any, callback?: (err: Error, info: any, infoCount: number) => void): Promise<{ info: any, infoCount: number}> | void; /** * Destroy model instance with the specified ID. @@ -1107,7 +1108,7 @@ declare namespace l { * @callback {() => void} callback Callback function called with `(err)` arguments. Required. * @param {Error} err Error object; see [Error object](docs.strongloop.com/display/LB/Error+object) */ - static destroyById(id: any, callback: (err: Error) => void): void; + static destroyById(id: any, callback?: (err: Error) => void): Promise | void; /** * Get a set of deltas and conflicts since the given checkpoint @@ -1118,7 +1119,7 @@ declare namespace l { * @param {Error} err Error object; see [Error object](docs.strongloop.com/display/LB/Error+object). * @param {any} result any with `deltas` and `conflicts` properties; see [Change.diff()](#change-diff) for details */ - static diff(since: number, remoteChanges: any[], callback: (err: Error, result: any) => void): void; + static diff(since: number, remoteChanges: any[], callback?: (err: Error, result: any) => void): Promise | void; /** * Enable the tracking of changes made to the model. Usually for replication. @@ -1132,7 +1133,7 @@ declare namespace l { * @param {Error} err Error object; see [Error object](docs.strongloop.com/display/LB/Error+object). * @param {boolean} exists True if the instance with the specified ID exists; false otherwise */ - static exists(id: any, callback: (err: Error, exists: boolean) => void): void; + static exists(id: any, callback?: (err: Error, exists: boolean) => void): Promise | void; /** * Find all model instances that match `filter` specification. @@ -1158,9 +1159,9 @@ declare namespace l { * @param {Error} err Error object; see [Error object](docs.strongloop.com/display/LB/Error+object). * @param {Array} models Model instances matching the filter, or null if none found */ - static find( + static find( filter?: {fields?: string|any|any[]; include?: string|any|any[]; limit?: number; order?: string; skip?: number; where?: any; }, - callback?: (err: Error, models: any[]) => void): void; + callback?: (err: Error, models: any[]) => void): Promise | void; /** * Find object by ID with an optional filter for include/fields @@ -1174,7 +1175,7 @@ declare namespace l { * @param {Error} err Error object; see [Error object](docs.strongloop.com/display/LB/Error+object). * @param {any} instance Model instance matching the specified ID or null if no instance matches */ - static findById(id: any, filter?: {fields?: string|any|any[]; include?: string|any|any[]; }, callback?: (err: Error, instance: any) => void): void; + static findById(id: any, filter?: {fields?: string|any|any[]; include?: string|any|any[]; }, callback?: (err: Error, instance: T) => void): Promise | void; /** * Find one model instance that matches `filter` specification. @@ -1199,7 +1200,15 @@ declare namespace l { * @param {Error} err Error object; see [Error object](docs.strongloop.com/display/LB/Error+object). * @param {Array} model First model instance that matches the filter or null if none found */ - static findOne(filter?: {fields?: string|any|any[]; include?: string|any|any[]; order?: string; skip?: number; where?: any; }, callback?: (err: Error, model: any) => void): void; + static findOne( + filter?: { + fields?: string|any|any[]; + include?: string|any|any[]; + order?: string; + skip?: number; + where?: any; + }, + callback?: (err: Error, instance: T) => void): Promise | void; /** * Finds one record matching the optional filter object. If not found, creates @@ -1231,7 +1240,7 @@ declare namespace l { * @param {any} instance Model instance matching the `where` filter, if found. * @param {boolean} created True if the instance matching the `where` filter was created */ - static findOrCreate( + static findOrCreate( data: any, filter?: { fields?: string | any | any[]; @@ -1241,7 +1250,7 @@ declare namespace l { skip?: number; where?: any; }, - callback?: (err: Error, instance: any, created: boolean) => void): void; + callback?: (err: Error, instance: any, created: boolean) => void): Promise<{instance: T, created: boolean}> | void; /** * Get the `Change` model. @@ -1261,7 +1270,7 @@ declare namespace l { * @param {Error} err Error object; see [Error object](docs.strongloop.com/display/LB/Error+object). * @param {string} sourceId Source identifier for the model or dataSource */ - static getSourceId(callback: (err: Error, sourceId: string) => void): void; + static getSourceId(callback?: (err: Error, sourceId: string) => void): Promise | void; /** * Handle a change error. Override this method in a subclassing model to customize @@ -1276,7 +1285,7 @@ declare namespace l { * @callback {() => void} callback * @param {Error} er */ - static rectifyChange(id: any, callback: (err: Error) => void): void; + static rectifyChange(id: any, callback?: (err: Error) => void): Promise | void; /** * Replace attributes for a model instance whose id is the first input @@ -1290,7 +1299,7 @@ declare namespace l { * @param {Error} err Error object; see [Error object](docs.strongloop.com/display/LB/Error+object). * @param {any} instance Replaced instance */ - static replaceById(id: any, data: any, options?: {validate: boolean; }, callback?: (err: Error, instance: any) => void): void; + static replaceById(id: any, data: any, options?: {validate: boolean; }, callback?: (err: Error, instance: T) => void): Promise | void; /** * Replace or insert a model instance; replace existing record if one is found, @@ -1303,7 +1312,7 @@ declare namespace l { * @param {Error} err Error object; see [Error object](docs.strongloop.com/display/LB/Error+object). * @param {any} model Replaced model instance. */ - static replaceOrCreate(data: any, options?: {validate: boolean; }, callback?: (err: Error, model: any) => void): void; + static replaceOrCreate(data: any, options?: {validate: boolean; }, callback?: (err: Error, instance: T) => void): Promise | void; /** * Replicate changes since the given checkpoint to the given target model @@ -1317,7 +1326,13 @@ declare namespace l { * @param {any] checkpoints The new checkpoints to use as the "since" * argument for the next replication */ - static replicate(since?: number, targetModel?: Model, options?: any, optionsFilter?: any, callback?: (err: Error, conflicts: Conflict[], param: any) => void): void; + static replicate( + since?: number, + targetModel?: Model, + options?: any, + optionsFilter?: any, + callback?: (err: Error, conflicts: Conflict[], param: any) => void + ): Promise<{conflicts: Conflict[], params: any}> | void; /** * Update multiple instances that match the where clause. @@ -1344,7 +1359,7 @@ declare namespace l { * @param {number} info.count number of instances (rows, documents) updated. * */ - static updateAll(where?: any, data?: any, callback?: (err: Error, info: any, infoCount: number) => void): void; + static updateAll(where?: any, data?: any, callback?: (err: Error, info: any, infoCount: number) => void): Promise | void; /** * Update or insert a model instance @@ -1353,7 +1368,7 @@ declare namespace l { * @param {Error} err Error object; see [Error object](docs.strongloop.com/display/LB/Error+object). * @param {any} model Updated model instance */ - static upsert(data: any, callback: (err: Error, model: any) => void): void; + static upsert(data: any, callback?: (err: Error, instance: T) => void): Promise | void; /** * Update or insert a model instance based on the search criteria. @@ -1371,14 +1386,14 @@ declare namespace l { * @param {Error} err Error object; see [Error object](docs.strongloop.com/display/LB/Error+object). * @param {any} model Updated model instance */ - static upsertWithWhere(data: any, callback: (err: Error, model: any) => void): void; + static upsertWithWhere(data: any, callback?: (err: Error, instance: T) => void): Promise | void; /** * Deletes the model from persistence. * Triggers `destroy` hook (async) before and after destroying object. * @param {() => void} callback Callback function */ - destroy(callback: () => void): void; + destroy(callback?: () => void): Promise | void; /** * Get the `id` value for the `PersistedModel` @@ -1404,7 +1419,7 @@ declare namespace l { * @param {Error} err Error object; see [Error object](docs.strongloop.com/display/LB/Error+object). * @param {any} instance Model instance */ - reload(callback: (err: Error, instance: any) => void): void; + reload(callback: (err: Error, instance: T) => void): Promise | void; /** * Replace attributes for a model instance and persist it into the datasource. @@ -1416,7 +1431,7 @@ declare namespace l { * @param {Error} err Error object; see [Error object](docs.strongloop.com/display/LB/Error+object). * @param {any} instance Replaced instance */ - replaceAttributes(data: any, options?: {validate: boolean}, callback?: (err: Error, instance: any) => void): void; + replaceAttributes(data: any, options?: {validate: boolean}, callback?: (err: Error, instance: T) => void): Promise | void; /** * Save model instance. If the instance doesn't have an ID, then calls [create](#persistedmodelcreatedata-cb) instead. @@ -1429,7 +1444,7 @@ declare namespace l { * @param {Error} err Error object; see [Error object](docs.strongloop.com/display/LB/Error+object). * @param {any} instance Model instance saved or created */ - save(options?: {validate: boolean; throws: boolean}, callback?: (err: Error, instance: any) => void): void; + save(options?: {validate: boolean; throws: boolean}, callback?: (err: Error, instance: T) => void): Promise | void; /** * Set the correct `id` property for the `PersistedModel`. Uses the `setId` method if the model is attached to @@ -1448,7 +1463,7 @@ declare namespace l { * @param {Error} err Error object; see [Error object](docs.strongloop.com/display/LB/Error+object). * @param {any} instance Updated instance */ - updateAttribute(name: string, value: any, callback: (err: Error, instance: any) => void): void; + updateAttribute(name: string, value: any, callback?: (err: Error, instance: T) => void): Promise | void; /** * Update set of attributes. Performs validation before updating @@ -1458,7 +1473,7 @@ declare namespace l { * @param {Error} err Error object; see [Error object](docs.strongloop.com/display/LB/Error+object). * @param {any} instance Updated instance */ - updateAttributes(data: any, callback: (err: Error, instance: any) => void): void; + updateAttributes(data: any, callback?: (err: Error, instance: T) => void): Promise | void; // **NOTE** Deprecate for v3.x // /** @@ -2642,7 +2657,7 @@ declare namespace l { * @callback {() => void} callback * @param {Error} er */ - static confirm(userId: any, token: string, redirect: string, callback: (err: Error) => void): void; + static confirm(userId: any, token: string, redirect: string, callback?: (err: Error) => void): Promise | void; /** * A default verification token generator which accepts the user the token is @@ -2653,7 +2668,7 @@ declare namespace l { * @param {any} user The User this token is being generated for. * @param {() => void} cb The generator must pass back the new token with this function cal */ - static generateVerificationToken(user: any, cb: () => void): void; + static generateVerificationToken(user: any, callback?: () => void): Promise | void; /** * Login a user by with the given `credentials` @@ -2671,7 +2686,7 @@ declare namespace l { * @param {Error} err Error object * @param {AccessToken} token Access token if login is successfu */ - static login(credentials: any, include?: string[]|string, callback?: (err: Error, token: AccessToken) => void): void; + static login(credentials: any, include?: string[]|string, callback?: (err: Error, token: AccessToken) => void): Promise | void; /** * Logout a user with the given accessToken id @@ -2686,7 +2701,7 @@ declare namespace l { * @callback {() => void} callback * @param {Error} er */ - static logout(accessTokenID: string, callback: (err: Error) => void): void; + static logout(accessTokenID: string, callback?: (err: Error) => void): Promise | void; /** * Normalize the credentials @@ -2705,7 +2720,7 @@ declare namespace l { * @callback {() => void} callback * @param {Error} er */ - static resetPassword(options: {}, callback: (err: Error) => void): void; + static resetPassword(options: {}, callback?: (err: Error) => void): Promise | void; /** * Create access token for the logged in user. This method can be overridden to @@ -2716,7 +2731,7 @@ declare namespace l { * @param {string|Error} err The error string or object * @param {AccessToken} token The generated access token object */ - createAccessToken(ttl: number, options?: any, cb?: (err: string|Error, token: AccessToken) => void): void; + createAccessToken(ttl: number, options?: any, callback?: (err: string|Error, token: AccessToken) => void): Promise | void; /** * Compare the given `password` with the users hashed password @@ -2725,7 +2740,7 @@ declare namespace l { * @param {Error} err Error object * @param {boolean} isMatch Returns true if the given `password` matches recor */ - hasPassword(password: string, callback: (err: Error, isMatch: boolean) => void): void; + hasPassword(password: string, callback?: (err: Error, isMatch: boolean) => void): Promise | void; /** * Verify a user's identity by sending them a confirmation email diff --git a/types/loopback/loopback-tests.ts b/types/loopback/loopback-tests.ts index 938891912a..d9a83b56a7 100644 --- a/types/loopback/loopback-tests.ts +++ b/types/loopback/loopback-tests.ts @@ -1,19 +1,39 @@ import * as loopback from 'loopback'; import * as cookieParser from 'cookie-parser'; +class TestModel { + id: number; + name: string; +} + class Server { app: loopback.LoopBackApplication; static boostrap(): Server { - return new Server(); + return new Server(); } constructor() { this.app = loopback(); this.app.use(cookieParser()); - this.app.start = () => { - // start the web server + this.app.start = async () => { + // start the web server + const models = this.app.models(); + const model = models[0] as (typeof loopback.PersistedModel); + + const data = await model.findOne(); + + if (data) { + console.dir(data.name); + } + + model.findOne({}, (err, instance) => { + if (err) { + console.dir(err); + } + console.dir(instance.name); + }); }; } } From bcec761b1bb25b62c2b585305ded7cfe50010001 Mon Sep 17 00:00:00 2001 From: ikatyang Date: Thu, 24 Aug 2017 11:49:33 +0800 Subject: [PATCH 02/10] fix(globby): fix version and add some docs --- types/globby/index.d.ts | 30 +++++++++++++++++++++++++----- types/globby/tsconfig.json | 1 + 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/types/globby/index.d.ts b/types/globby/index.d.ts index d06091551c..531888f803 100644 --- a/types/globby/index.d.ts +++ b/types/globby/index.d.ts @@ -1,17 +1,37 @@ -// Type definitions for globby 0.6 +// Type definitions for globby 6.1 // Project: https://github.com/sindresorhus/globby#readme // Definitions by: Douglas Duteil +// Ika // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 import { IOptions } from 'glob'; +/** + * Returns a `Promise` of matching paths. + */ declare function globby(patterns: string | string[], options?: IOptions): Promise; declare namespace globby { - function sync(patterns: string | string[], options?: IOptions): string[]; - function generateGlobTasks(patterns: string | string[], options?: IOptions): Array<{pattern: string, options: IOptions}>; - function hasMagic(patterns: string | string[], options?: IOptions): boolean; + /** + * Returns an `Array` of matching paths. + */ + function sync(patterns: string | string[], options?: IOptions): string[]; + /** + * Returns an `Array` in the format `{ pattern: string, opts: Object }`, + * which can be passed as arguments to [node-glob](https://github.com/isaacs/node-glob). + * This is useful for other globbing-related packages. + * + * Note that you should avoid running the same tasks multiple times as they contain a file system cache. + * Instead, run this method each time to ensure file system changes are taken into consideration. + */ + function generateGlobTasks(patterns: string | string[], options?: IOptions): Array<{pattern: string, options: IOptions}>; + /** + * Returns a `boolean` of whether there are any special glob characters in the patterns. + * + * Note that the options affect the results. If `noext: true` is set, then `+(a|b)` will not be considered a magic pattern. + * If the pattern has a brace expansion, like `a/{b/c,x/y}`, then that is considered magical, unless `nobrace: true` is set. + */ + function hasMagic(patterns: string | string[], options?: IOptions): boolean; } export = globby; diff --git a/types/globby/tsconfig.json b/types/globby/tsconfig.json index fd75c832f1..23fd250a6a 100644 --- a/types/globby/tsconfig.json +++ b/types/globby/tsconfig.json @@ -1,6 +1,7 @@ { "compilerOptions": { "module": "commonjs", + "target": "es6", "lib": [ "es6" ], From d662c2f06a7c2c8a4fa9b5910dd0bdb677a42aa8 Mon Sep 17 00:00:00 2001 From: Chris Rohlfs Date: Fri, 25 Aug 2017 13:24:18 +1200 Subject: [PATCH 03/10] [react-aria-menubutton] add typings --- types/react-aria-menubutton/index.d.ts | 151 ++++++++++++++++++ .../react-aria-menubutton-tests.tsx | 126 +++++++++++++++ types/react-aria-menubutton/tsconfig.json | 19 +++ types/react-aria-menubutton/tslint.json | 1 + 4 files changed, 297 insertions(+) create mode 100644 types/react-aria-menubutton/index.d.ts create mode 100644 types/react-aria-menubutton/react-aria-menubutton-tests.tsx create mode 100644 types/react-aria-menubutton/tsconfig.json create mode 100644 types/react-aria-menubutton/tslint.json diff --git a/types/react-aria-menubutton/index.d.ts b/types/react-aria-menubutton/index.d.ts new file mode 100644 index 0000000000..7a6ed925b2 --- /dev/null +++ b/types/react-aria-menubutton/index.d.ts @@ -0,0 +1,151 @@ +// Type definitions for react-aria-menubutton 5.0 +// Project: https://github.com/davidtheclark/react-aria-menubutton +// Definitions by: Muhammad Fawwaz Orabi +// Chris Rohlfs +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +import * as React from "react"; + +export interface WrapperState { + isOpen: boolean; +} + +export type WrapperProps = React.HTMLAttributes & { + /** + * A callback to run when the user makes a selection + * (i.e. clicks or presses Enter or Space on a `MenuItem`). + * It will be passed the value of the selected `MenuItem` and + * the React `SyntheticEvent`. + */ + onSelection(value: any, event: React.SyntheticEvent): any; + + /** + * A callback to run when the menu is opened or closed. + */ + onMenuToggle?(obj: WrapperState): any; + + /** + * By default, it does automatically close. + * If false, the menu will not automatically close when a + * selection is made. Default: `true`. + */ + closeOnSelection?: boolean; + + isOpen?: boolean; + + tag?: T["tagName"]; +}; + +/** + * A simple component to group a `Button`/`Menu`/`MenuItem` set, + * coordinating their interactions. It should wrap your entire menu button + * widget. + * All `Button`, `Menu`, and `MenuItem` components must be nested within a + * `Wrapper` component. + * Each wrapper can contain only one `Button`, only one `Menu`, and + * multiple `MenuItem`s. + */ +export class Wrapper extends React.Component> {} + +export type ButtonProps = React.HTMLAttributes & { + /** + * If true, the element is disabled + * (aria-disabled='true', not in tab order, clicking has no effect). + */ + disabled?: boolean; + + /** + * The HTML tag for this element. Default: 'span'. + */ + tag?: T["tagName"]; +}; + +/** + * A React component to wrap the content of your + * menu-button-pattern's button. + * The `Button` component itself acts as a UI button (with tab-index, role, etc.), + * so you probably do not want to pass an HTML ` + +
    + {menuItems} +
+
+ + ); + } +} + +ReactDOM.render(, document.body); + +const words = [ + "pectinate", + "borborygmus", + "anisodactylous", + "barbar", + "pilcrow", + "destroy" +]; + +interface DemoOneState { + selected: string; + noMenu: boolean; +} + +class DemoOne extends React.Component<{}, DemoOneState> { + constructor(props: any) { + super(props); + this.state = { selected: "", noMenu: false }; + } + + handleSelection(value: string) { + if (value === "destroy") { + this.setState({ noMenu: true }); + } else { + this.setState({ selected: value }); + } + } + + render() { + const { selected, noMenu } = this.state; + + if (noMenu) { + return ( +
+ [You decided to "destroy this menu," so the menu has been destroyed, + according to your wishes. Refresh the page to see it again.] +
+ ); + } + + const menuItemElements = words.map((word, i) => { + let itemClass = "AriaMenuButton-menuItem"; + if (selected === word) { + itemClass += " is-selected"; + } + const display = word === "destroy" ? "destroy this menu" : word; + return ( +
  • + + {display} + +
  • + ); + }); + + return ( +
    + + + +
      + {menuItemElements} +
    +
    +
    + + Your last selection was: {selected} + +
    + ); + } +} + +ReactDOM.render(, document.getElementById("demo-one")); + +closeMenu(""); +closeMenu("", { focusMenu: true }); + +openMenu(""); +openMenu("", { focusMenu: true }); diff --git a/types/react-aria-menubutton/tsconfig.json b/types/react-aria-menubutton/tsconfig.json new file mode 100644 index 0000000000..0e2508eac6 --- /dev/null +++ b/types/react-aria-menubutton/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6", "dom"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "jsx": "react", + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "react-aria-menubutton-tests.tsx" + ] +} diff --git a/types/react-aria-menubutton/tslint.json b/types/react-aria-menubutton/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/react-aria-menubutton/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 1534f657137c6822b8589c2ed3bad7a39b8acc6c Mon Sep 17 00:00:00 2001 From: nick121212 Date: Fri, 25 Aug 2017 10:24:05 +0800 Subject: [PATCH 04/10] add defined from jsonata --- types/jsonata/index.d.ts | 14 ++++++++++++++ types/jsonata/jsonata-tests.ts | 12 ++++++++++++ types/jsonata/tsconfig.json | 25 +++++++++++++++++++++++++ types/jsonata/tslint.json | 1 + 4 files changed, 52 insertions(+) create mode 100644 types/jsonata/index.d.ts create mode 100644 types/jsonata/jsonata-tests.ts create mode 100644 types/jsonata/tsconfig.json create mode 100644 types/jsonata/tslint.json diff --git a/types/jsonata/index.d.ts b/types/jsonata/index.d.ts new file mode 100644 index 0000000000..f9196d7149 --- /dev/null +++ b/types/jsonata/index.d.ts @@ -0,0 +1,14 @@ +// Type definitions for jsonata 1.3 +// Project: https://github.com/jsonata-js/jsonata +// Definitions by: Nick +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare function jsonata(str: string): jsonata.Expression; +declare namespace jsonata { + interface Expression { + evaluate(input: any, bindings?: any, callback?: () => any): any; + assign(key: string, func: (...args: any[]) => any): void; + } +} + +export = jsonata; diff --git a/types/jsonata/jsonata-tests.ts b/types/jsonata/jsonata-tests.ts new file mode 100644 index 0000000000..2125547c02 --- /dev/null +++ b/types/jsonata/jsonata-tests.ts @@ -0,0 +1,12 @@ +import jsonata = require("jsonata"); + +const data = { + example: [ + { value: 4 }, + { value: 7 }, + { value: 13 } + ] +}; + +const expression = jsonata("$sum(example.value)"); +const result = expression.evaluate(data); // returns 24 diff --git a/types/jsonata/tsconfig.json b/types/jsonata/tsconfig.json new file mode 100644 index 0000000000..f6e64f5569 --- /dev/null +++ b/types/jsonata/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es5", + "es6" + ], + "target": "es6", + "moduleResolution": "node", + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "jsonata-tests.ts" + ] +} diff --git a/types/jsonata/tslint.json b/types/jsonata/tslint.json new file mode 100644 index 0000000000..2750cc0197 --- /dev/null +++ b/types/jsonata/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } \ No newline at end of file From 5fa93bc778638c0f73c305c1b8e9db855d3b73d0 Mon Sep 17 00:00:00 2001 From: Jason Dreyzehner Date: Fri, 25 Aug 2017 01:27:30 -0400 Subject: [PATCH 05/10] [mongodb] complete CollStats interface, add WiredTigerData interface --- types/mongodb/index.d.ts | 153 +++++++++++++++++++++++++++++++-- types/mongodb/mongodb-tests.ts | 11 ++- 2 files changed, 155 insertions(+), 9 deletions(-) diff --git a/types/mongodb/index.d.ts b/types/mongodb/index.d.ts index acfbe62a00..04e38d90f6 100644 --- a/types/mongodb/index.d.ts +++ b/types/mongodb/index.d.ts @@ -3,6 +3,7 @@ // Definitions by: Federico Caselli // Alan Marcell // Gady Piazza +// Jason Dreyzehner // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -624,7 +625,6 @@ export interface Collection { } // Documentation: http://docs.mongodb.org/manual/reference/command/collStats/ -//TODO complete this export interface CollStats { // Namespace. ns: string; @@ -644,21 +644,162 @@ export interface CollStats { lastExtentSize: number; // Padding can speed up updates if documents grow. paddingFactor: number; - userFlags: number; + // A number that indicates the user-set flags on the collection. userFlags only appears when using the mmapv1 storage engine. + userFlags?: number; // Total index size in bytes. totalIndexSize: number; // Size of specific indexes in bytes. indexSizes: { _id_: number; - username: number; + [index: string]: number; }; + // `true` if the collection is capped. capped: boolean; - maxSize: boolean; - wiredTiger: any; - indexDetails: any; + // The maximum number of documents that may be present in a capped collection. + max: number; + // The maximum size of a capped collection. + maxSize: number; + wiredTiger?: WiredTigerData; + indexDetails?: any; ok: number; } +export interface WiredTigerData { + LSM: { + 'bloom filter false positives': number, + 'bloom filter hits': number; + 'bloom filter misses': number; + 'bloom filter pages evicted from cache': number; + 'bloom filter pages read into cache': number; + 'bloom filters in the LSM tree': number; + 'chunks in the LSM tree': number; + 'highest merge generation in the LSM tree': number; + 'queries that could have benefited from a Bloom filter that did not exist': number; + 'sleep for LSM checkpoint throttle': number; + 'sleep for LSM merge throttle': number; + 'total size of bloom filters': number; + }; + 'block-manager': { + 'allocations requiring file extension': number; + 'blocks allocated': number; + 'blocks freed': number; + 'checkpoint size': number; + 'file allocation unit size': number; + 'file bytes available for reuse': number; + 'file magic number': number; + 'file major version number': number; + 'file size in bytes': number; + 'minor version number': number; + }; + btree: { + 'btree checkpoint generation': number; + 'column-store fixed-size leaf pages': number; + 'column-store internal pages': number; + 'column-store variable-size RLE encoded values': number; + 'column-store variable-size deleted values': number; + 'column-store variable-size leaf pages': number; + 'fixed-record size': number; + 'maximum internal page key size': number; + 'maximum internal page size': number; + 'maximum leaf page key size': number; + 'maximum leaf page size': number; + 'maximum leaf page value size': number; + 'maximum tree depth': number; + 'number of key/value pairs': number; + 'overflow pages': number; + 'pages rewritten by compaction': number; + 'row-store internal pages': number; + 'row-store leaf pages': number; + }; + cache: { + 'bytes currently in the cache': number; + 'bytes read into cache': number; + 'bytes written from cache': number; + 'checkpoint blocked page eviction': number; + 'data source pages selected for eviction unable to be evicted': number; + 'hazard pointer blocked page eviction': number; + 'in-memory page passed criteria to be split': number; + 'in-memory page splits': number; + 'internal pages evicted': number; + 'internal pages split during eviction': number; + 'leaf pages split during eviction': number; + 'modified pages evicted': number; + 'overflow pages read into cache': number; + 'overflow values cached in memory': number; + 'page split during eviction deepened the tree': number; + 'page written requiring lookaside records': number; + 'pages read into cache': number; + 'pages read into cache requiring lookaside entries': number; + 'pages requested from the cache': number; + 'pages written from cache': number; + 'pages written requiring in-memory restoration': number; + 'tracked dirty bytes in the cache': number; + 'unmodified pages evicted': number; + }; + cache_walk: { + 'Average difference between current eviction generation when the page was last considered': number; + 'Average on-disk page image size seen': number; + 'Clean pages currently in cache': number; + 'Current eviction generation': number; + 'Dirty pages currently in cache': number; + 'Entries in the root page': number; + 'Internal pages currently in cache': number; + 'Leaf pages currently in cache': number; + 'Maximum difference between current eviction generation when the page was last considered': number; + 'Maximum page size seen': number; + 'Minimum on-disk page image size seen': number; + 'On-disk page image sizes smaller than a single allocation unit': number; + 'Pages created in memory and never written': number; + 'Pages currently queued for eviction': number; + 'Pages that could not be queued for eviction': number; + 'Refs skipped during cache traversal': number; + 'Size of the root page': number; + 'Total number of pages currently in cache': number; + }; + compression: { + 'compressed pages read': number; + 'compressed pages written': number; + 'page written failed to compress': number; + 'page written was too small to compress': number; + 'raw compression call failed, additional data available': number; + 'raw compression call failed, no additional data available': number; + 'raw compression call succeeded': number; + }; + cursor: { + 'bulk-loaded cursor-insert calls': number; + 'create calls': number; + 'cursor-insert key and value bytes inserted': number; + 'cursor-remove key bytes removed': number; + 'cursor-update value bytes updated': number; + 'insert calls': number; + 'next calls': number; + 'prev calls': number; + 'remove calls': number; + 'reset calls': number; + 'restarted searches': number; + 'search calls': number; + 'search near calls': number; + 'truncate calls': number; + 'update calls': number; + }; + reconciliation: { + 'dictionary matches': number; + 'fast-path pages deleted': number; + 'internal page key bytes discarded using suffix compression': number; + 'internal page multi-block writes': number; + 'internal-page overflow keys': number; + 'leaf page key bytes discarded using prefix compression': number; + 'leaf page multi-block writes': number; + 'leaf-page overflow keys': number; + 'maximum blocks required for a page': number; + 'overflow values written': number; + 'page checksum matches': number; + 'page reconciliation calls': number; + 'page reconciliation calls for eviction': number; + 'pages deleted': number; + }; +} + //http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#aggregate export interface CollectionAggregationOptions { readPreference?: ReadPreference | string; diff --git a/types/mongodb/mongodb-tests.ts b/types/mongodb/mongodb-tests.ts index 549537812d..2b8c49d186 100644 --- a/types/mongodb/mongodb-tests.ts +++ b/types/mongodb/mongodb-tests.ts @@ -13,12 +13,12 @@ let options = { promoteValues : {}, pkFactory : {}, poolSize : 1, - + socketOptions : {}, - + reconnectTries : 123456, reconnectInterval : 123456, - + ssl : true, sslValidate : {}, checkServerIdentity : function (){ }, @@ -49,6 +49,11 @@ let options = { console.log(stats.count + " documents"); }); + // + collection.stats().then(function(stats){ + console.log(stats.wiredTiger.cache['bytes currently in the cache']); + }) + collection.createIndex({}, {partialFilterExpression: {rating: {$exists: 1}}}) }); From 5e3b672930f2293d9a5c74def0ec52c691099c5e Mon Sep 17 00:00:00 2001 From: jan paul Date: Fri, 25 Aug 2017 15:03:42 +0200 Subject: [PATCH 06/10] Add FieldTemplate defintion to FormProps --- types/react-jsonschema-form/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/react-jsonschema-form/index.d.ts b/types/react-jsonschema-form/index.d.ts index 059c83714a..e4120ecf59 100644 --- a/types/react-jsonschema-form/index.d.ts +++ b/types/react-jsonschema-form/index.d.ts @@ -22,6 +22,7 @@ declare module "react-jsonschema-form" { onSubmit?: (e: any) => any; liveValidate?: boolean; safeRenderCompletion?: boolean; + FieldTemplate?: any; } export interface IChangeEvent { From 78789a43d66c141e91d5c9f50cb81913b3b5d9a2 Mon Sep 17 00:00:00 2001 From: Dmytro Borysov Date: Fri, 25 Aug 2017 18:26:51 +0200 Subject: [PATCH 07/10] Added jsdocs Added HTMLElement attributes --- types/hedron/index.d.ts | 121 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 113 insertions(+), 8 deletions(-) diff --git a/types/hedron/index.d.ts b/types/hedron/index.d.ts index 7386e1ed9e..142b9cf47a 100644 --- a/types/hedron/index.d.ts +++ b/types/hedron/index.d.ts @@ -7,43 +7,146 @@ import * as React from 'react'; export interface ColumnProps { - tagName?: string; + /** + * You can specify component to use specific tag + * @default 'div' + */ + tagName?: keyof ElementTagNameMap; + /** + * Draws all child columns with "bounding boxes" for easy + * visualization of the grid. This enables debug mode for all the + * children of this component + * @default false + */ debug?: boolean; + /** + * The amount of horizontal columns this row creates. + * @default 12 + */ divisions?: number; + /** + * If true, disable padding. + */ fluid?: boolean; + /** + * Width during xs breakpoint. + */ xs?: number; + /** + * Width during sm breakpoint. + */ sm?: number; + /** + * Width during md breakpoint. + */ md?: number; + /** + * Width during lg breakpoint. + */ lg?: number; + /** + * Width of left margin during xs breakpoint. + */ xsShift?: number; + /** + * Width of left margin during sm breakpoint. + */ smShift?: number; + /** + * Width of left margin during md breakpoint. + */ mdShift?: number; + /** + * Width of left margin during lg breakpoint. + */ lgShift?: number; } export interface PageProps { - tagName?: string; + /** + * You can specify component to use specific tag + * @default 'div' + */ + tagName?: keyof ElementTagNameMap; + /** + * Draws all child columns with "bounding boxes" for easy + * visualization of the grid. This enables debug mode for all the + * children of this component + * @default false + */ debug?: boolean; + /** + * Enabling fluid mode disables the fixed width of the Page + */ fluid?: boolean; + /** + * If not using fluid, set a custom width for the page. + */ width?: string; } export interface RowProps { + /** + * Draws all child columns with "bounding boxes" for easy + * visualization of the grid. + * @default false + */ debug?: boolean; - tagName?: string; + /** + * You can specify component to use specific tag + * @default 'section' + */ + tagName?: keyof ElementTagNameMap; + /** + * The amount of horizontal columns this row creates. + * @default 12 + */ divisions?: number; + /** + * Sets the value of the CSS align-content property + */ alignContent?: string; + /** + * Sets the value of the CSS align-items property + */ alignItems?: string; + /** + * Sets the value of the CSS align-self property + */ alignSelf?: string; + /** + * Sets the value of the CSS justify-content property + */ justifyContent?: string; + /** + * Sets the value of the CSS order property + */ order?: string; } export interface HiddenProps { + /** + * Draws all child columns with "bounding boxes" for easy + * visualization of the grid. This enables debug mode for all the + * children of this component + * @default false + */ debug?: boolean; + /** + * Width during xs breakpoint. + */ xs?: boolean; + /** + * Width during sm breakpoint. + */ sm?: boolean; + /** + * Width during md breakpoint. + */ md?: boolean; + /** + * Width during lg breakpoint. + */ lg?: boolean; } @@ -51,11 +154,13 @@ export interface BreakpointProviderProps { breakpoints: { sm?: number; md?: number; lg?: number }; } -export class Column extends React.Component {} -export class Page extends React.Component {} -export class Row extends React.Component {} -export class Hidden extends React.Component {} -export class BreakpointProvider extends React.Component {} +export class Column extends React.Component> {} +export class Page extends React.Component> {} +export class Row extends React.Component> {} +export class Hidden extends React.Component> {} +export class BreakpointProvider extends React.Component< + BreakpointProviderProps & React.HTMLProps +> {} export function withBreakpoints( wrappedComponent: React.ComponentClass ): React.ComponentClass; From b3d6ba948dccdf26d17e5955501f67c5636aed0a Mon Sep 17 00:00:00 2001 From: Chris Watts Date: Fri, 25 Aug 2017 12:33:28 -0700 Subject: [PATCH 08/10] Update index.d.ts Add `dropTimestamps` function on `TableBuilder` Add `alter` on `AlterTableBuilder` http://knexjs.org/#Schema-alter http://knexjs.org/#Schema-dropTimestamps --- types/knex/index.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/types/knex/index.d.ts b/types/knex/index.d.ts index b684ccde74..5ea34bfaeb 100644 --- a/types/knex/index.d.ts +++ b/types/knex/index.d.ts @@ -416,6 +416,7 @@ declare namespace Knex { dropUnique(columnNames: (string | Raw)[], indexName?: string): TableBuilder; dropPrimary(constraintName?: string): TableBuilder; dropIndex(columnNames: (string | Raw)[], indexName?: string): TableBuilder; + dropTimestamps(): ColumnBuilder; } interface CreateTableBuilder extends TableBuilder { @@ -428,6 +429,7 @@ declare namespace Knex { } interface AlterTableBuilder extends TableBuilder { + alter(): ColumnBuilder; } interface MySqlAlterTableBuilder extends AlterTableBuilder { From eb1b9dd426cd8db69f678c191e2787d516338c4e Mon Sep 17 00:00:00 2001 From: Matt Perry Date: Fri, 25 Aug 2017 23:24:05 -0400 Subject: [PATCH 09/10] Add typings for chai-jest-snapshot --- .../chai-jest-snapshot-tests.ts | 23 +++++++ types/chai-jest-snapshot/index.d.ts | 63 +++++++++++++++++++ types/chai-jest-snapshot/tsconfig.json | 22 +++++++ types/chai-jest-snapshot/tslint.json | 1 + 4 files changed, 109 insertions(+) create mode 100644 types/chai-jest-snapshot/chai-jest-snapshot-tests.ts create mode 100644 types/chai-jest-snapshot/index.d.ts create mode 100644 types/chai-jest-snapshot/tsconfig.json create mode 100644 types/chai-jest-snapshot/tslint.json diff --git a/types/chai-jest-snapshot/chai-jest-snapshot-tests.ts b/types/chai-jest-snapshot/chai-jest-snapshot-tests.ts new file mode 100644 index 0000000000..05cf190765 --- /dev/null +++ b/types/chai-jest-snapshot/chai-jest-snapshot-tests.ts @@ -0,0 +1,23 @@ +import chaiJestSnapshot from 'chai-jest-snapshot'; +import { expect } from 'chai'; + +chai.use(chaiJestSnapshot); + +expect({}).to.matchSnapshot(); +expect({}).to.matchSnapshot(true); +expect({}).to.matchSnapshot("filename"); +expect({}).to.matchSnapshot("filename", "snapshotname"); +expect({}).to.matchSnapshot("filename", "snapshotname", false); + +const mockContext: Mocha.IBeforeAndAfterContext = { + currentTest: { + file: 'testfile', + fullTitle: () => 'fullTitle' + } +}; + +chaiJestSnapshot.setFileName("filename"); +chaiJestSnapshot.setTestName("testname"); +chaiJestSnapshot.configureUsingMochaContext(mockContext); +chaiJestSnapshot.resetSnapshotRegistry(); +chaiJestSnapshot.addSerializer({}); diff --git a/types/chai-jest-snapshot/index.d.ts b/types/chai-jest-snapshot/index.d.ts new file mode 100644 index 0000000000..f19158e282 --- /dev/null +++ b/types/chai-jest-snapshot/index.d.ts @@ -0,0 +1,63 @@ +// Type definitions for chai-jest-snapshot 1.3 +// Project: https://github.com/suchipi/chai-jest-snapshot#readme +// Definitions by: Matt Perry +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// +/// + +declare global { + namespace Chai { + interface Assertion { + /** + * Assert that the object matches the snapshot + * @param snapshotFilename + * @param snapshotName + * @param update + */ + matchSnapshot(snapshotFilename?: string, snapshotName?: string, update?: boolean): Assertion; + matchSnapshot(update: boolean): Assertion; + } + } +} + +interface ChaiJestSnapshot { + /** + * Chai bootstrapper + * @param chai + * @param utils + */ + (chai: any, utils: any): void; + + /** + * Set snapshot file name + * @param filename + */ + setFileName(filename: string): void; + + /** + * Set snapshot test name + * @param testname + */ + setTestName(testname: string): void; + + /** + * Configure snapshot name using mocha context + * @param context + */ + configureUsingMochaContext(context: Mocha.IBeforeAndAfterContext): void; + + /** + * Reset snapshot registry + */ + resetSnapshotRegistry(): void; + + /** + * Add a serializer plugin + * @param serializer + */ + addSerializer(serializer: any): void; +} + +declare var ChaiJestSnapshot: ChaiJestSnapshot; +export default ChaiJestSnapshot; diff --git a/types/chai-jest-snapshot/tsconfig.json b/types/chai-jest-snapshot/tsconfig.json new file mode 100644 index 0000000000..32dea54632 --- /dev/null +++ b/types/chai-jest-snapshot/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "chai-jest-snapshot-tests.ts" + ] +} diff --git a/types/chai-jest-snapshot/tslint.json b/types/chai-jest-snapshot/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/chai-jest-snapshot/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 9b0bb63c3ec1baff0013acb560a15e5c6b84a6ae Mon Sep 17 00:00:00 2001 From: Chris Rohlfs Date: Sun, 27 Aug 2017 17:38:56 +1200 Subject: [PATCH 10/10] Change types to interfaces --- types/react-aria-menubutton/index.d.ts | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/types/react-aria-menubutton/index.d.ts b/types/react-aria-menubutton/index.d.ts index 7a6ed925b2..cba4c81540 100644 --- a/types/react-aria-menubutton/index.d.ts +++ b/types/react-aria-menubutton/index.d.ts @@ -11,7 +11,8 @@ export interface WrapperState { isOpen: boolean; } -export type WrapperProps = React.HTMLAttributes & { +export interface WrapperProps + extends React.HTMLAttributes { /** * A callback to run when the user makes a selection * (i.e. clicks or presses Enter or Space on a `MenuItem`). @@ -35,7 +36,7 @@ export type WrapperProps = React.HTMLAttributes & { isOpen?: boolean; tag?: T["tagName"]; -}; +} /** * A simple component to group a `Button`/`Menu`/`MenuItem` set, @@ -48,7 +49,8 @@ export type WrapperProps = React.HTMLAttributes & { */ export class Wrapper extends React.Component> {} -export type ButtonProps = React.HTMLAttributes & { +export interface ButtonProps + extends React.HTMLAttributes { /** * If true, the element is disabled * (aria-disabled='true', not in tab order, clicking has no effect). @@ -59,7 +61,7 @@ export type ButtonProps = React.HTMLAttributes & { * The HTML tag for this element. Default: 'span'. */ tag?: T["tagName"]; -}; +} /** * A React component to wrap the content of your @@ -71,19 +73,21 @@ export type ButtonProps = React.HTMLAttributes & { */ export class Button extends React.Component> {} -export type MenuProps = React.HTMLAttributes & { +export interface MenuProps + extends React.HTMLAttributes { /** * The HTML tag for this element. Default: 'span'. */ tag?: T["tagName"]; -}; +} /** * A React component to wrap the content of your menu-button-pattern's menu. */ export class Menu extends React.Component> {} -export type MenuItemProps = React.HTMLAttributes & { +export interface MenuItemProps + extends React.HTMLAttributes { /** * If value has a value, it will be passed to the onSelection handler * when the `MenuItem` is selected @@ -100,7 +104,7 @@ export type MenuItemProps = React.HTMLAttributes & { * The HTML tag for this element. Default: 'span'. */ tag?: T["tagName"]; -}; +} /** * A React component to wrap the content of one of your