Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Convert two arrays to readonly#17685

Merged
1 commit merged into
mastermicrosoft/TypeScript:masterfrom
emptyArray_readonlymicrosoft/TypeScript:emptyArray_readonlyCopy head branch name to clipboard
Aug 8, 2017
Merged

Convert two arrays to readonly#17685
1 commit merged into
mastermicrosoft/TypeScript:masterfrom
emptyArray_readonlymicrosoft/TypeScript:emptyArray_readonlyCopy head branch name to clipboard

Conversation

@ghost

@ghost ghost commented Aug 8, 2017

Copy link
Copy Markdown

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.