Skip to content

Const enum indexed access #5167

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

Merged
merged 3 commits into from
Oct 8, 2015
Merged

Conversation

jbondc
Copy link
Contributor

@jbondc jbondc commented Oct 8, 2015

Fix for #3411

const enum numbers {
    one = 1
}
interface OptimizedData {
    0: number;
    1: any[];
    2: number;
}
let data:OptimizedData 

// works
data[1] // any[]
data[numbers.one] // any[]

let n1 = test[numbers.one];

/*
TODO: revisit with const propagation
Copy link
Contributor

Choose a reason for hiding this comment

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

i would appreciate it if you remove this commented section.

@mhegazy
Copy link
Contributor

mhegazy commented Oct 8, 2015

2 small comments. other than that 👍

thanks!

Accept baselines.
mhegazy added a commit that referenced this pull request Oct 8, 2015
@mhegazy mhegazy merged commit 350bb1f into microsoft:master Oct 8, 2015
@mhegazy
Copy link
Contributor

mhegazy commented Oct 8, 2015

Thanks!

@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
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.

4 participants