extensions/typescript-language-features/src/typescriptServiceClient.ts/TypeScriptServiceClient/getWorkspaceRootForResource
class TypeScriptServiceClient:	public getWorkspaceRootForResource(resource: vscode.Uri): string | undefined {
		const roots = vscode.workspace.workspaceFolders ? Array.from(vscode.workspace.workspaceFolders) : undefined;
		if (!roots || !roots.length) {
			return undefined;
		}

		switch (resource.scheme) {
			case fileSchemes.file:
			case fileSchemes.untitled:
			case fileSchemes.vscodeNotebookCell:
				for (const root of roots.sort((a, b) => a.uri.fsPath.length - b.uri.fsPath.length)) {
					if (resource.fsPath.startsWith(root.uri.fsPath + path.sep)) {
						return root.uri.fsPath;
					}
				}
				return roots[0].uri.fsPath;

			default:
				return undefined;
		}
	}