Skip to content
This repository has been archived by the owner on Jul 24, 2023. It is now read-only.

Fixed compilation issues #42

Merged
merged 2 commits into from
Jul 28, 2017
Merged

Fixed compilation issues #42

merged 2 commits into from
Jul 28, 2017

Conversation

TMSCH
Copy link
Collaborator

@TMSCH TMSCH commented Jul 28, 2017

  1. TS 2.4 String enums compile in a format that makes it incompatible with Closure Compiler.

enum StrEnum {
value = 'value';
otherValue = 'otherValue'
}

Usage:
StrEnum.value

Will compile in:

StrEnum = {
'value': 'value',
'otherValue': 'otherValue'
}

StrEnum.value;

Notice quoted properties. This breaks obfuscation.

  1. Error subclassing does not extend the prototype, so the toExposedError method wasn't available. instanceof is broken when class extends Error type microsoft/TypeScript#13965

… didn't use the defined prototype extension.
@codecov-io
Copy link

codecov-io commented Jul 28, 2017

Codecov Report

Merging #42 into master will decrease coverage by <.01%.
The diff coverage is 96.29%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #42      +/-   ##
==========================================
- Coverage   87.27%   87.26%   -0.01%     
==========================================
  Files          34       34              
  Lines        1430     1429       -1     
  Branches      168      168              
==========================================
- Hits         1248     1247       -1     
  Misses        182      182
Impacted Files Coverage Δ
ts/protocol/data.ts 100% <100%> (ø) ⬆️
ts/protocol/preload_request.ts 100% <100%> (ø) ⬆️
ts/protocol/rpc_messages.ts 95.38% <100%> (+0.07%) ⬆️
ts/spi/provider_frame.ts 85.93% <100%> (+0.05%) ⬆️
ts/api/api.ts 69.68% <100%> (-0.17%) ⬇️
ts/protocol/errors.ts 89.02% <100%> (+0.13%) ⬆️
ts/protocol/post_messages.ts 100% <100%> (ø) ⬆️
ts/protocol/utils.ts 82.53% <88.88%> (+0.13%) ⬆️
ts/api/provider_frame_elem.ts 61.9% <0%> (-0.89%) ⬇️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a11d6cb...9bac087. Read the comment docs.

@TMSCH TMSCH requested a review from tikurahul July 28, 2017 02:20
Copy link
Collaborator

@tikurahul tikurahul left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -39,6 +39,28 @@ export enum RpcMessageType {
cancelLastOperationResult = 'cancelLastOperationResult'
}

// Hack to be able to sue the list of values of the const enum above.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think you mean use

Copy link
Collaborator

@tikurahul tikurahul left a comment

Choose a reason for hiding this comment

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

LGTM

@tikurahul tikurahul merged commit dc84170 into openid:master Jul 28, 2017
@TMSCH TMSCH deleted the fix-compilation branch August 4, 2017 22:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants