Skip to content

Commit

Permalink
Simplify use of array helpers (microsoft#17301)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy authored Jul 19, 2017
1 parent d918b8a commit d996946
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/server/editorServices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,7 @@ namespace ts.server {
const fileNamePropertyReader: FilePropertyReader<string> = {
getFileName: x => x,
getScriptKind: _ => undefined,
hasMixedContent: (fileName, extraFileExtensions) => {
const mixedContentExtensions = map(filter(extraFileExtensions, item => item.isMixedContent), item => item.extension);
return forEach(mixedContentExtensions, extension => fileExtensionIs(fileName, extension));
}
hasMixedContent: (fileName, extraFileExtensions) => some(extraFileExtensions, ext => ext.isMixedContent && fileExtensionIs(fileName, ext.extension)),
};

const externalFilePropertyReader: FilePropertyReader<protocol.ExternalFile> = {
Expand Down

0 comments on commit d996946

Please sign in to comment.