Skip to content

Commit

Permalink
use TS 3.8 import type
Browse files Browse the repository at this point in the history
  • Loading branch information
olmobrutall committed Feb 24, 2020
1 parent 28f7ee5 commit 8cdc9ab
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 14 deletions.
3 changes: 2 additions & 1 deletion Signum.React/Scripts/Components/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export { BsColor, BsSize, KeyCodes } from './Basic'
export { KeyCodes } from './Basic'
export type { BsColor, BsSize } from './Basic'

//Components taken from react-router-bootstrap
export { LinkContainer } from './LinkContainer'
Expand Down
21 changes: 14 additions & 7 deletions Signum.React/Scripts/Lines.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
import { TypeContext, StyleContext, StyleOptions, FormGroupStyle, FormSize, IRenderButtons } from './TypeContext'
import { TypeContext, StyleContext } from './TypeContext'
import type { StyleOptions, FormGroupStyle, FormSize, IRenderButtons } from './TypeContext'
export { TypeContext, StyleContext, StyleOptions, FormGroupStyle, FormSize, IRenderButtons };

import { PropertyRoute, Binding, ReadonlyBinding } from './Reflection'
export { Binding, ReadonlyBinding, PropertyRoute };

import { tasks, ChangeEvent, LineBaseController, LineBaseProps } from './Lines/LineBase'
import { tasks, LineBaseController} from './Lines/LineBase'
import type { ChangeEvent, LineBaseProps } from './Lines/LineBase'
export { tasks, ChangeEvent, LineBaseProps }

import { FormGroup, FormGroupProps } from './Lines/FormGroup'
import { FormGroup } from './Lines/FormGroup'
import type { FormGroupProps } from './Lines/FormGroup'
export { FormGroup, FormGroupProps }

import { FormControlReadonly, FormControlReadonlyProps } from './Lines/FormControlReadonly'
import { FormControlReadonly } from './Lines/FormControlReadonly'
import type { FormControlReadonlyProps } from './Lines/FormControlReadonly'
export { FormControlReadonly, FormControlReadonlyProps }

import { ValueLine, ValueLineType, ValueLineProps, OptionItem, ValueLineController } from './Lines/ValueLine'
import { ValueLine, ValueLineController } from './Lines/ValueLine'
import type { ValueLineType, ValueLineProps, OptionItem } from './Lines/ValueLine'
export { ValueLine, ValueLineType, ValueLineProps, OptionItem }

export { RenderEntity } from './Lines/RenderEntity'

export { AutocompleteConfig, FindOptionsAutocompleteConfig, LiteAutocompleteConfig } from './Lines/AutoCompleteConfig'
export { FindOptionsAutocompleteConfig, LiteAutocompleteConfig } from './Lines/AutoCompleteConfig'
export type { AutocompleteConfig } from './Lines/AutoCompleteConfig'

import { EntityBaseController } from './Lines/EntityBase'
export { EntityBaseController }
Expand Down Expand Up @@ -46,7 +52,8 @@ export { EnumCheckboxList } from './Lines/EnumCheckboxList'
export { MultiValueLine } from './Lines/MultiValueLine'


import { EntityTable, EntityTableColumn, EntityTableRow } from './Lines/EntityTable'
import { EntityTable, EntityTableRow } from './Lines/EntityTable'
import type { EntityTableColumn } from './Lines/EntityTable'

import DynamicComponent from './Lines/DynamicComponent';
import { EntityListBaseController, EntityListBaseProps } from './Lines/EntityListBase';
Expand Down
18 changes: 12 additions & 6 deletions Signum.React/Scripts/Search.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
import { FindOptions, ColumnOption, ColumnOptionsMode, FilterOption, FilterOperation, FilterOptionParsed, FindOptionsParsed, OrderOption, OrderType, Pagination, PaginationMode, ResultTable, isFilterGroupOption, isFilterGroupOptionParsed, FilterConditionOptionParsed } from './FindOptions'
import type { FindOptions, ColumnOption, ColumnOptionsMode, FilterOption, FilterOperation, FilterOptionParsed, FindOptionsParsed, OrderOption, OrderType, Pagination, PaginationMode, ResultTable, FilterConditionOptionParsed } from './FindOptions'
import { isFilterGroupOption, isFilterGroupOptionParsed } from './FindOptions'
export { FindOptions, ColumnOption, ColumnOptionsMode, FilterOption, FilterOperation, FilterOptionParsed, FindOptionsParsed, OrderOption, OrderType, Pagination, PaginationMode, ResultTable };

import EntityLink, { EntityLinkProps } from './SearchControl/EntityLink'
import EntityLink from './SearchControl/EntityLink'
import type { EntityLinkProps } from './SearchControl/EntityLink'
export { EntityLink, EntityLinkProps };

import SearchControl, { SearchControlProps, ISimpleFilterBuilder, SearchControlHandler } from './SearchControl/SearchControl'
import SearchControl from './SearchControl/SearchControl'
import type { SearchControlProps, ISimpleFilterBuilder, SearchControlHandler } from './SearchControl/SearchControl'
export { SearchControl, SearchControlProps, ISimpleFilterBuilder, SearchControlHandler };

import SearchControlLoaded, { SearchControlLoadedProps } from './SearchControl/SearchControlLoaded'
import SearchControlLoaded from './SearchControl/SearchControlLoaded'
import type { SearchControlLoadedProps } from './SearchControl/SearchControlLoaded'
export { SearchControlLoaded, SearchControlLoadedProps };

import ValueSearchControl, { ValueSearchControlProps } from './SearchControl/ValueSearchControl'
import ValueSearchControl from './SearchControl/ValueSearchControl'
import type { ValueSearchControlProps } from './SearchControl/ValueSearchControl'
export { ValueSearchControl, ValueSearchControlProps };

import ValueSearchControlLine, { ValueSearchControlLineProps } from './SearchControl/ValueSearchControlLine'
import ValueSearchControlLine from './SearchControl/ValueSearchControlLine'
import type { ValueSearchControlLineProps } from './SearchControl/ValueSearchControlLine'
import { QueryTokenString } from './Reflection';
export { ValueSearchControlLine, ValueSearchControlLineProps };
import { AddToLite } from './Finder';
Expand Down

2 comments on commit 8cdc9ab

@olmobrutall
Copy link
Collaborator Author

@olmobrutall olmobrutall commented on 8cdc9ab Feb 25, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typescript 3.8 and other changes

Typescript 3.8 has been released.

There are no huge changes in this version, but an interesting new feature is Type-only imports. This feature allows to import interfaces that, when compiled using transpileOnly option, will get removed from the generated javascript, avoiding not found warnings in webpack. The framework has already been updated to make use of import type, so we can remove the warning filtering in webpack.config.

Additionally, this commit adds an auto-incrementing version number to Southwind.React, this fixes VersionChangedAlert not working since the jump to .Net Core : signumsoftware/southwind@7153b76

@MehdyKarimpour
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

Please sign in to comment.