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

[Hackathon] Typescript (Only types, no refactorings) #80

Merged
merged 16 commits into from
Sep 29, 2022

Conversation

mschuwalow
Copy link
Contributor

Short description if any.

Author Todo List:

  • Add/adjust tests (if applicable)
  • Build in CI passes
  • Latest master revision is merged into the branch
  • Self-Review
  • Set Ready For Review status

@mschuwalow mschuwalow self-assigned this Sep 22, 2022
@mschuwalow mschuwalow requested a review from a team as a code owner September 22, 2022 20:03
@lgtm-com
Copy link

lgtm-com bot commented Sep 23, 2022

This pull request introduces 2 alerts when merging 498f381 into 8f9d752 - view on LGTM.com

new alerts:

  • 2 for Ineffective parameter type

@lgtm-com
Copy link

lgtm-com bot commented Sep 23, 2022

This pull request introduces 2 alerts when merging a5a52be into 8f9d752 - view on LGTM.com

new alerts:

  • 2 for Ineffective parameter type

@lgtm-com
Copy link

lgtm-com bot commented Sep 23, 2022

This pull request introduces 2 alerts when merging 367b3b2 into 8f9d752 - view on LGTM.com

new alerts:

  • 2 for Ineffective parameter type

@mschuwalow mschuwalow changed the title [Hackathon] Typescript 2 [Hackathon] Typescript (Only types, no refactorings) Sep 27, 2022
@lgtm-com
Copy link

lgtm-com bot commented Sep 27, 2022

This pull request introduces 2 alerts when merging 28e3d98 into 8f9d752 - view on LGTM.com

new alerts:

  • 2 for Ineffective parameter type

Copy link
Contributor

@wi101 wi101 left a comment

Choose a reason for hiding this comment

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

Some comments otherwise it looks good to me

src/utils/types.ts Outdated Show resolved Hide resolved
src/utils/types.ts Outdated Show resolved Hide resolved
mschuwalow and others added 2 commits September 28, 2022 11:07
Co-authored-by: Wiem Zine El Abidine <welabidine@liveintent.com>
Co-authored-by: Wiem Zine El Abidine <welabidine@liveintent.com>
@mschuwalow mschuwalow changed the base branch from master to integration-typescript September 28, 2022 11:32
@mschuwalow mschuwalow requested a review from a team September 28, 2022 11:32
@@ -3,6 +3,6 @@ import { trim } from '../utils/types'

export const MASK = '*********'

export function replacer (key, value) {
export function replacer (key, value: string): string {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this syntax for key: string, value: string? Or is there a reason why key doesn't have a type (even any)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Default type without any annotation is any. Added it explicitly for clarity

* @return {string|undefined}
*/
export function getReferrer (win = window) {
export function getReferrer (win = window): string | undefined {
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe missing a type annotation for win? Same below

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated 👍

asQuery (): IQuery,
}

export interface IPixelSender {
Copy link
Contributor

Choose a reason for hiding this comment

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

Just curiosity: what's the meaning of the I prefixing a lot of the types?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

different than scala, typescript seems to use the same namespace for values and types. As we already have functions with name PixelSender I wanted a type that does not conflict with it.

We should clean this up / refactor this in later prs, but I wanted to keep this one simple

@lgtm-com
Copy link

lgtm-com bot commented Sep 29, 2022

This pull request introduces 1 alert when merging b5587a7 into 8f9d752 - view on LGTM.com

new alerts:

  • 1 for Polynomial regular expression used on uncontrolled data

@mschuwalow mschuwalow merged commit caf83e4 into integration-typescript Sep 29, 2022
@mschuwalow mschuwalow deleted the typescript-2 branch September 29, 2022 20:15
@mschuwalow mschuwalow mentioned this pull request Sep 29, 2022
5 tasks
mschuwalow added a commit that referenced this pull request Jan 12, 2023
* [Hackathon] Typescript (Only types, no refactorings) (#80)

* migrate build

* try wdio

* fix rollup

* use terser instead of uglify

* update wdio config

* update wdio to transpile

* update preambled.ts

* type everything

* fix build

* fixed types.ts eslint issues

* nycrc

* Update src/utils/types.ts

Co-authored-by: Wiem Zine El Abidine <welabidine@liveintent.com>

* Update src/utils/types.ts

Co-authored-by: Wiem Zine El Abidine <welabidine@liveintent.com>

* comments

* wip

* publish javascript lib and types

Co-authored-by: Vinod M <vinodmuralidharan@yahoo.com>
Co-authored-by: Wiem Zine El Abidine <welabidine@liveintent.com>

* [No ticket] Update publishing setup (#84)

* finish merge master

* fix tests

* Update .eslintrc.js

Co-authored-by: Wiem Zine El Abidine <welabidine@liveintent.com>

* Update .eslintrc.js

Co-authored-by: Wiem Zine El Abidine <welabidine@liveintent.com>

* Update src/events/event-bus.ts

Co-authored-by: Wiem Zine El Abidine <welabidine@liveintent.com>

* comments

* comments

* update files in package.json

* expose consts

Co-authored-by: Vinod M <vinodmuralidharan@yahoo.com>
Co-authored-by: Wiem Zine El Abidine <welabidine@liveintent.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants