Skip to content
This repository has been archived by the owner on Jun 1, 2024. It is now read-only.

Fix/ts3.1.1 compatibility #264

Merged
merged 32 commits into from
Oct 6, 2020
Merged
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
18e799f
fixing action to send requests
Tiagoperes Jun 19, 2020
bc51ccb
Merge branch 'master' of github.com:ZupIT/beagle-web-core
Tiagoperes Jun 19, 2020
03d837d
Merge branch 'master' of github.com:ZupIT/beagle-web-core
Tiagoperes Jun 22, 2020
7fd8685
Merge branch 'master' of github.com:ZupIT/beagle-web-core
Tiagoperes Jun 23, 2020
b09ec79
Merge branch 'master' of github.com:ZupIT/beagle-web-core
Tiagoperes Jun 23, 2020
a3fc8b1
Merge branch 'master' of github.com:ZupIT/beagle-web-core
Tiagoperes Jun 24, 2020
3e290da
Merge branch 'master' of github.com:ZupIT/beagle-web-core
Tiagoperes Jun 25, 2020
140486d
Merge branch 'master' of github.com:ZupIT/beagle-web-core
Tiagoperes Jun 26, 2020
272072a
Merge branch 'master' of github.com:ZupIT/beagle-web-core
Tiagoperes Jul 1, 2020
b478a43
Merge branch 'master' of github.com:ZupIT/beagle-web-core
Tiagoperes Jul 12, 2020
6b74e49
Merge branch 'master' of github.com:ZupIT/beagle-web-core
Tiagoperes Jul 21, 2020
8b05520
Merge branch 'master' of github.com:ZupIT/beagle-web-core
Tiagoperes Jul 23, 2020
2b13987
Merge branch 'master' of github.com:ZupIT/beagle-web-core
Tiagoperes Jul 29, 2020
e1ad95c
Merge branch 'master' of github.com:ZupIT/beagle-web-core
Tiagoperes Aug 11, 2020
cb1a53a
Merge branch 'master' of github.com:ZupIT/beagle-web-core
Tiagoperes Aug 13, 2020
dc88ad8
Merge branch 'master' of github.com:ZupIT/beagle-web-core
Tiagoperes Aug 17, 2020
a29c04f
Merge branch 'master' of github.com:ZupIT/beagle-web-core
Tiagoperes Aug 20, 2020
8ad4233
Merge branch 'master' of github.com:ZupIT/beagle-web-core
Tiagoperes Aug 25, 2020
07b5a8e
Merge branch 'master' of github.com:ZupIT/beagle-web-core
Tiagoperes Aug 28, 2020
30725e9
Merge branch 'master' of github.com:ZupIT/beagle-web-core
Tiagoperes Sep 2, 2020
7ccad2f
Merge branch 'master' of github.com:ZupIT/beagle-web-core
Tiagoperes Sep 3, 2020
1dd8705
Merge branch 'master' of github.com:ZupIT/beagle-web-core
Tiagoperes Sep 4, 2020
cf83b15
Merge branch 'master' of github.com:ZupIT/beagle-web-core
Tiagoperes Sep 4, 2020
4f4cc00
Merge branch 'master' of github.com:ZupIT/beagle-web-core
Tiagoperes Sep 4, 2020
064dfd6
Merge branch 'master' of github.com:ZupIT/beagle-web-core
Tiagoperes Sep 4, 2020
299dc07
Merge branch 'master' of github.com:ZupIT/beagle-web-core
Tiagoperes Sep 9, 2020
7985c98
Merge branch 'master' of github.com:ZupIT/beagle-web-core
Tiagoperes Sep 9, 2020
b11995f
Merge branch 'master' of github.com:ZupIT/beagle-web-core
Tiagoperes Sep 21, 2020
49be457
Merge branch 'master' of github.com:ZupIT/beagle-web-core
Tiagoperes Sep 24, 2020
6cecf6d
Merge branch 'master' of github.com:ZupIT/beagle-web-core
Tiagoperes Oct 2, 2020
5f57589
Adds compatibility to the older Typescript 3.1.1
Tiagoperes Oct 5, 2020
84b607c
Merge branch 'master' into fix/ts3.1.1-compatibility
carolinegoncalveszup Oct 6, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/beagle-tree/iteration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* limitations under the License.
*/

import { Iterator } from 'types'
import { BeagleUIElement } from './types'

type Iteratee<ItemType, ReturnType> = (item: ItemType, index: number) => ReturnType
Expand Down
1 change: 1 addition & 0 deletions src/legacy/beagle-context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import { IdentifiableBeagleUIElement } from 'beagle-tree/types'
import { LoadParams, BeagleView, UpdateWithTreeParams } from 'beagle-view/types'
import { ViewContentManager } from 'service/view-content-manager/types'
import { Omit } from 'types'

/**
* @deprecated since v1.2. Will de deleted in v2.0. Use `ViewContentManager` instead.
Expand Down
24 changes: 24 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,32 @@
* limitations under the License.
*/

/* compatibility mode: older versions of Typescript that must be supported by Beagle (>= 3.1.1)
don't have "Omit" natively */
export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>

/* The following 4 types have been copied from the original ES6 module definition and slightly
altered. This must be done because we must target ES5 in our build, which doesn't have support to
iterators. It's true that iterators won't work in ES5 environments, but we don't want to limit
Beagle for people using ES6 or later. */
export interface IteratorYieldResult<TYield> {
done?: false,
value: TYield,
}

export interface IteratorReturnResult {
done: true,
value: any,
}

export type IteratorResult<T> = IteratorYieldResult<T> | IteratorReturnResult

export interface Iterator<T> {
next(...args: []): IteratorResult<T>,
return?(value?: any): IteratorResult<T>,
throw?(e?: any): IteratorResult<T>,
}

// todo: legacy code, remove with v2.0
import { ClickEvent as CE, ScreenEvent as SE } from 'service/beagle-service/types'
import { IdentifiableBeagleUIElement as IBE, BeagleUIElement as BE } from 'beagle-tree/types'
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"metadata/*": ["metadata/*"],
"operation/*": ["operation/*"],
"service/*": ["service/*"],
"utils/*": ["utils/*"]
"utils/*": ["utils/*"],
"types/*": ["types/*"]
}
},
"include": [
Expand Down