Skip to content

Convert two arrays to readonly #17685

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
1 commit merged into from
Aug 8, 2017
Merged

Convert two arrays to readonly #17685

1 commit merged into from
Aug 8, 2017

Conversation

ghost
Copy link

@ghost ghost commented Aug 8, 2017

The cast is currently causing errors when running gulp local on the master branch. Turns out it's pretty easy to fix just this without any big API changes.

return emptyArray as string[]; // TODO: https://github.com/Microsoft/TypeScript/issues/16312

                       ~~~~~~~~~~~~~~~~~~~~~~

src/server/server.ts(772,20): error TS2352: Type 'SortedReadonlyArray<never>' cannot be converted to type 'string[]'.

@ghost ghost requested a review from weswigham August 8, 2017 17:27
@ghost ghost force-pushed the emptyArray_readonly branch from 5a936b2 to 0296eef Compare August 8, 2017 17:33
@ghost ghost merged commit f69ce5c into master Aug 8, 2017
@ghost ghost deleted the emptyArray_readonly branch August 8, 2017 17:54
@ghost ghost mentioned this pull request Aug 8, 2017
@microsoft microsoft locked and limited conversation to collaborators Jun 14, 2018
This pull request was closed.
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.

2 participants