diff --git a/types/material__dom/ponyfill.d.ts b/types/material__dom/ponyfill.d.ts index bac16bd374..9725e2704d 100644 --- a/types/material__dom/ponyfill.d.ts +++ b/types/material__dom/ponyfill.d.ts @@ -1,7 +1,2 @@ -// Type definitions for Material Components Web 0.43 -// Project: https://material.io/components/ -// Definitions by: Arthur Groupp -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - export function closest(element: Element, selector: string): Element; export function matches(element: Element, selector: string): boolean; diff --git a/types/material__drawer/adapter.d.ts b/types/material__drawer/adapter.d.ts index 0f80d39967..84413fe004 100644 --- a/types/material__drawer/adapter.d.ts +++ b/types/material__drawer/adapter.d.ts @@ -1,8 +1,3 @@ -// Type definitions for Material Components Web 0.43 -// Project: https://material.io/components/ -// Definitions by: Arthur Groupp -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - /** * @license * Copyright 2018 Google Inc. diff --git a/types/material__drawer/constants.d.ts b/types/material__drawer/constants.d.ts index aa179c5a9c..d094c3240b 100644 --- a/types/material__drawer/constants.d.ts +++ b/types/material__drawer/constants.d.ts @@ -1,8 +1,3 @@ -// Type definitions for Material Components Web 0.43 -// Project: https://material.io/components/ -// Definitions by: Arthur Groupp -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - /** * Copyright 2016 Google Inc. All Rights Reserved. * @@ -23,18 +18,17 @@ import { MDCStrings } from 'material__base'; export interface cssClasses extends MDCStrings { ROOT: 'mdc-drawer'; - DISMISSIBLE: 'mdc-drawer--dismissible', - MODAL: 'mdc-drawer--modal', + DISMISSIBLE: 'mdc-drawer--dismissible'; + MODAL: 'mdc-drawer--modal'; OPEN: 'mdc-drawer--open'; ANIMATE: 'mdc-drawer--animate'; - OPENING: 'mdc-drawer--opening', - CLOSING: 'mdc-drawer--closing', + OPENING: 'mdc-drawer--opening'; + CLOSING: 'mdc-drawer--closing'; } export interface strings extends MDCStrings { - APP_CONTENT_SELECTOR: '.mdc-drawer-app-content', - SCRIM_SELECTOR: '.mdc-drawer-scrim', - CLOSE_EVENT: 'MDCDrawer:closed', - OPEN_EVENT: 'MDCDrawer:opened', + APP_CONTENT_SELECTOR: '.mdc-drawer-app-content'; + SCRIM_SELECTOR: '.mdc-drawer-scrim'; + CLOSE_EVENT: 'MDCDrawer:closed'; + OPEN_EVENT: 'MDCDrawer:opened'; } - diff --git a/types/material__drawer/dismissible/foundation.d.ts b/types/material__drawer/dismissible/foundation.d.ts index addfadfbb0..4bee751d86 100644 --- a/types/material__drawer/dismissible/foundation.d.ts +++ b/types/material__drawer/dismissible/foundation.d.ts @@ -1,8 +1,3 @@ -// Type definitions for Material Components Web 0.43 -// Project: https://material.io/components/ -// Definitions by: Arthur Groupp -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - /** * @license * Copyright 2018 Google Inc. @@ -28,7 +23,7 @@ import { MDCDrawerAdapter } from '../adapter'; import MDCFoundation from 'material__base/foundation'; -import {cssClasses, strings} from '../constants'; +import { cssClasses, strings } from '../constants'; export class MDCDismissibleDrawerFoundation extends MDCFoundation { static readonly strings: strings; diff --git a/types/material__drawer/focus-trap.d.ts b/types/material__drawer/focus-trap.d.ts index 07a35a3cb5..61ceb8fb08 100644 --- a/types/material__drawer/focus-trap.d.ts +++ b/types/material__drawer/focus-trap.d.ts @@ -55,9 +55,9 @@ export interface Options { clickOutsideDeactivates?: boolean; } -type ActivateOptions = Pick; +export type ActivateOptions = Pick; -interface DeactivateOptions extends Pick { +export interface DeactivateOptions extends Pick { returnFocus?: boolean; } @@ -79,4 +79,3 @@ export default function focusTrap( element: HTMLElement | string, userOptions?: Options ): FocusTrap; - diff --git a/types/material__drawer/index.d.ts b/types/material__drawer/index.d.ts index 2d28742f82..9980f1c304 100644 --- a/types/material__drawer/index.d.ts +++ b/types/material__drawer/index.d.ts @@ -27,16 +27,14 @@ import { MDCDrawerAdapter } from './adapter'; import { MDCList, MDCListFoundation } from 'material__list/index'; import { strings } from './constants'; import * as util from './util'; -import createFocusTrap from './focus-trap'; -import { FocusTrap } from './focus-trap'; +import createFocusTrap, { FocusTrap } from './focus-trap'; export class MDCDrawer extends MDCComponent { - constructor(...args: any); + constructor(...args: any[]); static attachTo(root: Element): MDCDrawer; /** * Returns true if drawer is in the open position. - * @return {boolean} */ open: boolean; diff --git a/types/material__drawer/modal/foundation.d.ts b/types/material__drawer/modal/foundation.d.ts index ee83dfb17f..36ffb30e08 100644 --- a/types/material__drawer/modal/foundation.d.ts +++ b/types/material__drawer/modal/foundation.d.ts @@ -1,8 +1,3 @@ -// Type definitions for Material Components Web 0.43 -// Project: https://material.io/components/ -// Definitions by: Arthur Groupp -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - /** * @license * Copyright 2018 Google Inc. diff --git a/types/material__drawer/util.d.ts b/types/material__drawer/util.d.ts index 1b3f7e3e4a..fcce26d915 100644 --- a/types/material__drawer/util.d.ts +++ b/types/material__drawer/util.d.ts @@ -16,4 +16,4 @@ import { FocusTrap } from './focus-trap'; -export function createFocusTrapInstance(surfaceEl: Element, focusTrapFactory: Function): FocusTrap +export function createFocusTrapInstance(surfaceEl: Element, focusTrapFactory: () => FocusTrap): FocusTrap; diff --git a/types/material__list/adapter.d.ts b/types/material__list/adapter.d.ts index be539dd260..3a1b5522d8 100644 --- a/types/material__list/adapter.d.ts +++ b/types/material__list/adapter.d.ts @@ -1,8 +1,3 @@ -// Type definitions for Material Components Web 0.43 -// Project: https://material.io/components/ -// Definitions by: Arthur Groupp -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - export class MDCListAdapter { getListItemCount(): number; getFocusedElementIndex(): number; @@ -30,7 +25,7 @@ export class MDCListAdapter { /** * Returns true if radio button is present at given list item index. */ - hasRadioAtIndex(index: number): boolean + hasRadioAtIndex(index: number): boolean; /** * Returns true if checkbox is present at given list item index. diff --git a/types/material__list/constants.d.ts b/types/material__list/constants.d.ts index aad43f0ccb..f8d0d67273 100644 --- a/types/material__list/constants.d.ts +++ b/types/material__list/constants.d.ts @@ -1,8 +1,3 @@ -// Type definitions for Material Components Web 0.43 -// Project: https://material.io/components/ -// Definitions by: Arthur Groupp -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - /** * @license * Copyright 2018 Google Inc. diff --git a/types/material__list/foundation.d.ts b/types/material__list/foundation.d.ts index 0c54620d46..3823d796ca 100644 --- a/types/material__list/foundation.d.ts +++ b/types/material__list/foundation.d.ts @@ -1,13 +1,8 @@ -// Type definitions for Material Components Web 0.43 -// Project: https://material.io/components/ -// Definitions by: Arthur Groupp -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - import MDCFoundation from 'material__base/foundation'; import { MDCListAdapter } from './adapter'; import { strings, cssClasses, Index } from './constants'; -declare const ELEMENTS_KEY_ALLOWED_IN: string[]; +export const ELEMENTS_KEY_ALLOWED_IN: string[]; export class MDCListFoundation extends MDCFoundation { static readonly strings: strings; @@ -75,4 +70,3 @@ export class MDCListFoundation extends MDCFoundation { focusLastElement(): number; } - diff --git a/types/material__list/index.d.ts b/types/material__list/index.d.ts index e76533a531..22adf832f3 100644 --- a/types/material__list/index.d.ts +++ b/types/material__list/index.d.ts @@ -22,7 +22,7 @@ */ import MDCComponent from 'material__base/component'; -import { MDCListFoundation } from './foundation' +import { MDCListFoundation } from './foundation'; import { MDCListAdapter } from './adapter'; import { matches } from 'material__dom/ponyfill'; import { cssClasses, strings, Index } from './constants'; // eslint-disable-line no-unused-vars @@ -33,7 +33,7 @@ export class MDCList { destroy(): void; - initialSyncWithDOM():void; + initialSyncWithDOM(): void; layout(): void;