Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve typings of some components #172

Closed
MariuszKogut opened this issue Oct 31, 2017 · 1 comment
Closed

Improve typings of some components #172

MariuszKogut opened this issue Oct 31, 2017 · 1 comment
Assignees
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@MariuszKogut
Copy link
Contributor

Hi there,
thanks for adding TypeScript d.ts files to your great component lib. I have updated to version 1.1.0 and have following issues:

1. Growl

  1. Missing prop value for setting the message.

  2. You should also define a new type called GrowlMessage:

  export interface GrowlMessage {
    severity: 'success' | 'info' | 'warn' | 'error',
    summary: string;
    detail: string;
  }

2. AutoComplete

Got an error, when using this typing:

interface AutoCompleteProps extends React.HTMLProps<HTMLAutoCompleteElement> {

Error:(3, 11) TS2430: Interface 'AutoCompleteProps' incorrectly extends interface 'HTMLProps<any>'.
  Types of property 'onChange' are incompatible.
    Type '((originalEvent: Event, value: any) => void) | undefined' is not assignable to type '((event: FormEvent<any>) => void) | undefined'.
      Type '(originalEvent: Event, value: any) => void' is not assignable to type '((event: FormEvent<any>) => void) | undefined'.
        Type '(originalEvent: Event, value: any) => void' is not assignable to type '(event: FormEvent<any>) => void'.

Error:(3, 53) TS2304: Cannot find name 'HTMLAutoCompleteElement'.

Missing item param in itemTemplate

3. DataTable

Missing event param for onRowClick and other events.

  Types of property 'onRowClick' are incompatible.
    Type '(e: any) => void' is not assignable to type '(() => void) | undefined'.
      Type '(e: any) => void' is not assignable to type '() => void'.

4. Inputmask

Missing value prop

5. Spinner

Missing value prop

6. InputSwitch

Missing disabled prop

7. ToggleButton

Missing value prop

8. Checkbox

Missing name prop

I'm using TypeScript V 2.4.2

@cagataycivici cagataycivici self-assigned this Nov 1, 2017
@cagataycivici cagataycivici added the Type: Bug Issue contains a defect related to a specific component. label Nov 1, 2017
@cagataycivici cagataycivici changed the title Typings Improve typings of some components Nov 1, 2017
@cagataycivici cagataycivici added Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add and removed Type: Bug Issue contains a defect related to a specific component. labels Nov 1, 2017
@cagataycivici cagataycivici added this to the 1.1.1 milestone Nov 1, 2017
@ghost
Copy link

ghost commented Nov 1, 2017

Another one...

9. Messages

Missing value prop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

No branches or pull requests

2 participants