Skip to content

Commit

Permalink
Migrating storybook jsx to typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
jayakrishnankarolilnlsn committed Jan 24, 2022
1 parent 2027a22 commit e5b8ffa
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export function getTimeFormatterForGranularity(granularity?: TimeGranularity) {

export function formatTime(
formatId: string | undefined,
value: Date | null | undefined,
value: Date | number | null | undefined,
granularity?: TimeGranularity,
) {
return getTimeFormatter(formatId, granularity)(value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import React from 'react';
import { formatNumber } from '@superset-ui/core';

class NumberFormatValidator extends React.PureComponent {
state: { formatString: string; testValues: any[] } = {
state: { formatString: string; testValues: (number | null | undefined)[] } = {
formatString: '.3~s',
testValues: [
987654321,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ import React from 'react';
import { formatTime } from '@superset-ui/core';

class TimeFormatValidator extends React.PureComponent {
state: { formatString: string; testValues: any[] } = {
state: {
formatString: string;
testValues: (Date | number | null | undefined)[];
} = {
formatString: '%Y-%m-%d %H:%M:%S',
testValues: [
new Date(Date.UTC(1986, 5, 14, 8, 30, 53)),
Expand Down

0 comments on commit e5b8ffa

Please sign in to comment.