diff --git a/src/helpers/index.ts b/src/helpers/index.ts index 2db6e6e8b6..56442eacf0 100644 --- a/src/helpers/index.ts +++ b/src/helpers/index.ts @@ -2,13 +2,12 @@ import * as fs from 'fs'; import * as path from 'path'; import * as vscode from 'vscode'; import { iconJsonName } from '../icons/index'; -import { AdvancedWorkspaceConfiguration } from '../models'; import { IconConfiguration } from '../models/index'; import * as reloadMessages from './../messages/reload'; /** Get configuration of vs code. */ export const getConfig = (section?: string) => { - return vscode.workspace.getConfiguration(section) as AdvancedWorkspaceConfiguration; + return vscode.workspace.getConfiguration(section); }; /** Get list of configuration entries of package.json */ @@ -78,5 +77,5 @@ export const capitalizeFirstLetter = (name: string): string => name.charAt(0).to /** TitleCase all words in a string */ export const toTitleCase = (str) => { - return str.replace(/\w\S*/g, (txt) => { return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase(); }); + return str.replace(/\w\S*/g, (txt) => txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase()); }; diff --git a/src/models/advancedWorkspaceConfiguration.ts b/src/models/advancedWorkspaceConfiguration.ts deleted file mode 100644 index 4df11c1d2f..0000000000 --- a/src/models/advancedWorkspaceConfiguration.ts +++ /dev/null @@ -1,7 +0,0 @@ -export interface AdvancedWorkspaceConfiguration { - get(section: string, defaultValue?: T): T; - has(section: string): boolean; - [key: string]: any; - inspect(section: string): { defaultValue: T; globalValue: T; key: string; workspaceValue: T } | undefined; - update(section: string, value: any, global?: boolean): Thenable; -} diff --git a/src/models/index.ts b/src/models/index.ts index f8256f4f7d..4e0a4d08b8 100644 --- a/src/models/index.ts +++ b/src/models/index.ts @@ -1,4 +1,3 @@ export * from './icons'; export * from './i18n'; export * from './iconConfiguration'; -export * from './advancedWorkspaceConfiguration'; diff --git a/src/scripts/helpers/titleCase.ts b/src/scripts/helpers/titleCase.ts deleted file mode 100644 index 66a763f5d4..0000000000 --- a/src/scripts/helpers/titleCase.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** TitleCase all words in a string */ -export const toTitleCase = (str: string): string => { - return str.replace(/\w\S*/g, (txt) => txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase()); -}; diff --git a/src/scripts/preview/preview.ts b/src/scripts/preview/preview.ts index 42e952b3e4..fc44a0ceb6 100644 --- a/src/scripts/preview/preview.ts +++ b/src/scripts/preview/preview.ts @@ -1,8 +1,8 @@ import * as fs from 'fs'; import * as path from 'path'; -import * as painter from './../helpers/painter'; -import { toTitleCase } from './../helpers/titleCase'; +import { toTitleCase } from '../../helpers'; import { createScreenshot } from '../helpers/screenshots'; +import * as painter from './../helpers/painter'; const htmlDoctype = ''; const cssFilePath = path.join('style.css');