type
stringclasses
7 values
content
stringlengths
4
9.55k
repo
stringlengths
7
96
path
stringlengths
4
178
language
stringclasses
1 value
InterfaceDeclaration
/** * The set of arguments for constructing a TeamMembershipTeam resource. */ export interface TeamMembershipTeamArgs { readonly role?: pulumi.Input<string>; readonly teamId: pulumi.Input<string>; readonly username: pulumi.Input<string>; }
RichardWLaub/pulumi-github
sdk/nodejs/teamMembershipTeam.ts
TypeScript
MethodDeclaration
/** * Get an existing TeamMembershipTeam resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any ext...
RichardWLaub/pulumi-github
sdk/nodejs/teamMembershipTeam.ts
TypeScript
FunctionDeclaration
function AppRouter() { return ( <Router> <Route path="/" exact component={Inference} /> <Route path="/home" component={Home} /> </Router> ); }
kennysama/react-hooks-boilerplate
front/src/app/AppRouter.tsx
TypeScript
ArrowFunction
(callback) => { storedCallback = callback }
AlphaWong/html5-media-converter
src/Html5MediaConverter.ts
TypeScript
ArrowFunction
(err, mimeType, stream) => { presets.convertersFor(mimeType.type).forEach((converter) => { stream.converter = converter; stream.pipe(converter.toStream(size)); storedCallback.call(stream, stream); }) }
AlphaWong/html5-media-converter
src/Html5MediaConverter.ts
TypeScript
ArrowFunction
(converter) => { stream.converter = converter; stream.pipe(converter.toStream(size)); storedCallback.call(stream, stream); }
AlphaWong/html5-media-converter
src/Html5MediaConverter.ts
TypeScript
ClassDeclaration
export default class MediaConverter { private videoConverter = new VideoConverter() constructor(options = _options) { this.videoConverter.setFfmpegPath(options.programs.ffmpeg) } public thumbs(size) { let input = new Stream.PassThrough(), storedCallback input.forEac...
AlphaWong/html5-media-converter
src/Html5MediaConverter.ts
TypeScript
MethodDeclaration
public thumbs(size) { let input = new Stream.PassThrough(), storedCallback input.forEach = (callback) => { storedCallback = callback } magic(input, (err, mimeType, stream) => { presets.convertersFor(mimeType.type).forEach((converter) => { ...
AlphaWong/html5-media-converter
src/Html5MediaConverter.ts
TypeScript
MethodDeclaration
public mp4Copy(){ return presets.converters.mp4_copy.toStream() }
AlphaWong/html5-media-converter
src/Html5MediaConverter.ts
TypeScript
FunctionDeclaration
function d(name: string, use: string, doc: string): vscode.CompletionItem { const i = new vscode.CompletionItem(name, vscode.CompletionItemKind.Variable); i.detail = use; i.documentation = doc; return i; }
Azure/vscode-kubernetes-tools
src/helm.resources.ts
TypeScript
FunctionDeclaration
function val(name: string, use: string, doc: string): vscode.CompletionItem { const i = new vscode.CompletionItem(name, vscode.CompletionItemKind.Value); i.detail = use; i.documentation = doc; return i; }
Azure/vscode-kubernetes-tools
src/helm.resources.ts
TypeScript
ArrowFunction
(item) => { const itemPath = filepath.join(path, item); const stat = fs.statSync(itemPath); if (stat.isDirectory()) { return; } const schema = JSON.parse(shell.cat(itemPath)); if (!schema.models) { return; ...
Azure/vscode-kubernetes-tools
src/helm.resources.ts
TypeScript
ArrowFunction
(v, k) => { const i = k.lastIndexOf("."); const kind = k.substr(i+1); res.push(val(kind, `kind: ${ kind }`, v.description)); _.each(v.properties, (spec, label) => { let type = "undefined"; switch (spec.type) { case unde...
Azure/vscode-kubernetes-tools
src/helm.resources.ts
TypeScript
ArrowFunction
(spec, label) => { let type = "undefined"; switch (spec.type) { case undefined: // This usually means there's a $ref instead of a type if (spec["$ref"]) { type = spec["$ref"]; ...
Azure/vscode-kubernetes-tools
src/helm.resources.ts
TypeScript
ClassDeclaration
// Resources describes Kubernetes resource keywords. export class Resources { public all(): vscode.CompletionItem[] { const home = shell.home(); const schemaDir = filepath.join(home, ".kube/schema"); if (!fs.existsSync(schemaDir)) { // Return the default set. return t...
Azure/vscode-kubernetes-tools
src/helm.resources.ts
TypeScript
MethodDeclaration
public all(): vscode.CompletionItem[] { const home = shell.home(); const schemaDir = filepath.join(home, ".kube/schema"); if (!fs.existsSync(schemaDir)) { // Return the default set. return this.v1(); } const stat = fs.statSync(schemaDir); if (!sta...
Azure/vscode-kubernetes-tools
src/helm.resources.ts
TypeScript
MethodDeclaration
v1(): vscode.CompletionItem[] { return this.fromSchema(v1.default.models); }
Azure/vscode-kubernetes-tools
src/helm.resources.ts
TypeScript
MethodDeclaration
// Extract hover documentation from a Swagger model. fromSchema(schema: any): vscode.CompletionItem[] { const res = Array.of<vscode.CompletionItem>(); _.each(schema, (v, k) => { const i = k.lastIndexOf("."); const kind = k.substr(i+1); res.push(val(kind, `kind: ${ kin...
Azure/vscode-kubernetes-tools
src/helm.resources.ts
TypeScript
ArrowFunction
() => { const mockClient = { clearStaleState: jest.fn(), }; return { OidcClient: jest.fn().mockImplementation(() => { return mockClient; }), WebStorageStateStore: jest.fn(), }; }
CopChristophe/solid-client-authn-js
packages/oidc/src/cleanup/cleanup.spec.ts
TypeScript
ArrowFunction
() => { return mockClient; }
CopChristophe/solid-client-authn-js
packages/oidc/src/cleanup/cleanup.spec.ts
TypeScript
ArrowFunction
() => { it("removes the 'code' query string if present", () => { expect(removeOidcQueryParam("https://some.url/?code=aCode")).toEqual( "https://some.url/" ); }); it("removes the 'state' query string if present", () => { expect(removeOidcQueryParam("https://some.url/?state=arkansas")).toEqual( ...
CopChristophe/solid-client-authn-js
packages/oidc/src/cleanup/cleanup.spec.ts
TypeScript
ArrowFunction
() => { expect(removeOidcQueryParam("https://some.url/?code=aCode")).toEqual( "https://some.url/" ); }
CopChristophe/solid-client-authn-js
packages/oidc/src/cleanup/cleanup.spec.ts
TypeScript
ArrowFunction
() => { expect(removeOidcQueryParam("https://some.url/?state=arkansas")).toEqual( "https://some.url/" ); }
CopChristophe/solid-client-authn-js
packages/oidc/src/cleanup/cleanup.spec.ts
TypeScript
ArrowFunction
() => { expect(removeOidcQueryParam("https://some.url/#some-anchor")).toEqual( "https://some.url/" ); }
CopChristophe/solid-client-authn-js
packages/oidc/src/cleanup/cleanup.spec.ts
TypeScript
ArrowFunction
() => { expect(removeOidcQueryParam("https://some.url/")).toEqual( "https://some.url/" ); }
CopChristophe/solid-client-authn-js
packages/oidc/src/cleanup/cleanup.spec.ts
TypeScript
ArrowFunction
() => { expect( removeOidcQueryParam( "https://some.url/?code=someCode&state=someState&otherQuery=aValue" ) ).toEqual("https://some.url/?otherQuery=aValue"); }
CopChristophe/solid-client-authn-js
packages/oidc/src/cleanup/cleanup.spec.ts
TypeScript
ArrowFunction
() => { it("clears oidc-client storage", async () => { // This is a bad test, but we can only test for internal behaviour of oidc-client, // or test that the 'clearStaleState' function is called, which is done here. const clearSpy = jest.spyOn(new OidcClient({}), "clearStaleState"); await clearOidcPe...
CopChristophe/solid-client-authn-js
packages/oidc/src/cleanup/cleanup.spec.ts
TypeScript
ArrowFunction
async () => { // This is a bad test, but we can only test for internal behaviour of oidc-client, // or test that the 'clearStaleState' function is called, which is done here. const clearSpy = jest.spyOn(new OidcClient({}), "clearStaleState"); await clearOidcPersistentStorage(); expect(clearSpy).toH...
CopChristophe/solid-client-authn-js
packages/oidc/src/cleanup/cleanup.spec.ts
TypeScript
ArrowFunction
async () => { window.localStorage.setItem("oidc.someOidcState", "a value"); window.localStorage.setItem( "solidClientAuthenticationUser:someSessionId", "a value" ); window.localStorage.setItem("anArbitraryKey", "a value"); await clearOidcPersistentStorage(); expect(window.localStora...
CopChristophe/solid-client-authn-js
packages/oidc/src/cleanup/cleanup.spec.ts
TypeScript
ArrowFunction
async () => { window.localStorage.clear(); await clearOidcPersistentStorage(); expect(window.localStorage).toHaveLength(0); }
CopChristophe/solid-client-authn-js
packages/oidc/src/cleanup/cleanup.spec.ts
TypeScript
ClassDeclaration
@Component({ selector: 'ab-checkbox', host: { class: 'ab-checkbox' }, templateUrl: './checkbox.component.html' }) export class CheckboxComponent { @Input() public checked: boolean = false; }
Brockhurst/connect
src/app/shared/components/checkbox/checkbox.component.ts
TypeScript
InterfaceDeclaration
/** * Test the generic Filter using collection.find<T>() method */ // a collection model for all possible MongoDB BSON types and TypeScript types interface PetModel { _id: ObjectId; // ObjectId field name?: string; // optional field family: string; // string field age: number; // number field type: 'dog' | ...
LaudateCorpus1/node-mongodb-native
test/types/community/collection/filterQuery.test-d.ts
TypeScript
ArrowFunction
() => { /* Check day popup disclaimer */ let showPopupDisclaimer = false; if (localStorage.getItem('lastShownPopupDisclaimer')) { if (moment().format('YYYY-MM-DD') !== moment(localStorage.getItem('lastShownPopupDisclaimer'), 'YYYY-MM-DD hh:mm:ss').format('YYYY-MM-DD')) { showPopupDisc...
Akarimichi/genshin-impact-utility
src/ui/root.tsx
TypeScript
ArrowFunction
({ store, history }: Props) => { return ( <Provider store={store}> <ConnectedRouter history={history}> <App/> </ConnectedRouter> </Provider>
Akarimichi/genshin-impact-utility
src/ui/root.tsx
TypeScript
TypeAliasDeclaration
type Props = { store: Store; history: History; };
Akarimichi/genshin-impact-utility
src/ui/root.tsx
TypeScript
MethodDeclaration
_i18n(locale, 'disclaimer_popup_title')
Akarimichi/genshin-impact-utility
src/ui/root.tsx
TypeScript
MethodDeclaration
_i18n(locale, 'disclaimer_popup_msg', true)
Akarimichi/genshin-impact-utility
src/ui/root.tsx
TypeScript
FunctionDeclaration
function getHostLabel(labelService: ILabelService, item: ITrustedUriItem): string { return item.uri.authority ? labelService.getHostLabel(item.uri.scheme, item.uri.authority) : localize('localAuthority', "Local"); }
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
ArrowFunction
(item: ITrustedUriItem) => { const hostLabel = getHostLabel(this.labelService, item); if (hostLabel === undefined || hostLabel.length === 0) { return localize('trustedFolderAriaLabel', "{0}, trusted", this.labelService.getUriLabel(item.uri)); } return localize('trustedFolderWithHostAria...
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
ArrowFunction
() => localize('trustedFoldersAndWorkspaces', "Trusted Folders & Workspaces")
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
ArrowFunction
item => { // default prevented when input box is double clicked #125052 if (item && item.element && !item.browserEvent?.defaultPrevented) { this.edit(item.element, true); } }
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
ArrowFunction
async () => { const uri = await this.fileDialogService.showOpenDialog({ canSelectFiles: false, canSelectFolders: true, canSelectMany: false, defaultUri: this.currentWorkspaceUri, openLabel: localize('trustUri', "Trust Folder"), title: localize('selectTrustedUri', "Select Folder To Trust") ...
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
ArrowFunction
() => { this.updateTable(); }
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
ArrowFunction
folder => folder.uri
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
ArrowFunction
uri => { let relatedToCurrentWorkspace = false; for (const workspaceUri of currentWorkspaceUris) { relatedToCurrentWorkspace = relatedToCurrentWorkspace || this.uriService.extUri.isEqualOrParent(workspaceUri, uri); } return { uri, parentOfWorkspaceItem: relatedToCurrentWorkspace }; }
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
ArrowFunction
(a, b) => { if (a.uri.scheme !== b.uri.scheme) { if (a.uri.scheme === Schemas.file) { return -1; } if (b.uri.scheme === Schemas.file) { return 1; } } const aIsWorkspace = a.uri.path.endsWith('.code-workspace'); const bIsWorkspace = b.uri.path.endsWith('.code-workspace'); if ...
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
ArrowFunction
s => s.length
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
ArrowFunction
u => this.uriService.extUri.isEqual(u, item.uri)
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
ArrowFunction
() => { this.table.edit(item, false); }
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
ArrowFunction
() => { this.table.edit(item, true); }
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
ArrowFunction
async () => { await this.table.delete(item); }
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
ArrowFunction
value => this.table.validateUri(value, this.currentItem)
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
ArrowFunction
async (e) => { if (item === e) { templateData.element.classList.add('input-mode'); templateData.pathInput.focus(); templateData.pathInput.select(); templateData.element.parentElement!.style.paddingLeft = '0px'; } }
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
ArrowFunction
e => { EventHelper.stop(e); }
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
ArrowFunction
() => { templateData.element.classList.remove('input-mode'); templateData.element.parentElement!.style.paddingLeft = '5px'; }
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
ArrowFunction
() => { hideInputBox(); const uri = item.uri.with({ path: templateData.pathInput.value }); templateData.pathLabel.innerText = templateData.pathInput.value; if (uri) { this.table.acceptEdit(item, uri); } }
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
ArrowFunction
() => { hideInputBox(); templateData.pathInput.value = stringValue; this.table.rejectEdit(item); }
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
ArrowFunction
e => { let handled = false; if (e.equals(KeyCode.Enter)) { accept(); handled = true; } else if (e.equals(KeyCode.Escape)) { reject(); handled = true; } if (handled) { e.preventDefault(); e.stopPropagation(); } }
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
ArrowFunction
() => { reject(); }
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
ArrowFunction
() => { clearNode(templateData.buttonBarContainer); }
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
ArrowFunction
colors => { this.rootElement.style.setProperty('--workspace-trust-selected-color', colors.buttonBackground?.toString() || ''); this.rootElement.style.setProperty('--workspace-trust-unselected-color', colors.buttonSecondaryBackground?.toString() || ''); this.rootElement.style.setProperty('--workspace-trust-che...
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
ArrowFunction
e => { const event = new StandardKeyboardEvent(e); if (event.equals(KeyCode.UpArrow) || event.equals(KeyCode.DownArrow)) { const navOrder = [this.headerContainer, this.trustedContainer, this.untrustedContainer, this.configurationContainer]; const currentIndex = navOrder.findIndex(element => { retur...
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
ArrowFunction
element => { return isAncestor(document.activeElement, element); }
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
ArrowFunction
() => this.render()
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
ArrowFunction
key => { const property = configurationRegistry.getConfigurationProperties()[key]; // cannot be configured in workspace if (property.scope === ConfigurationScope.APPLICATION || property.scope === ConfigurationScope.MACHINE) { return false; } // If deprecated include only those configured in the wo...
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
ArrowFunction
ext => ext.local
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
ArrowFunction
ext => ext.local!
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
ArrowFunction
ext => this.extensionManifestPropertiesService.getExtensionUntrustedWorkspaceSupportType(ext.manifest) === false
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
ArrowFunction
e => { if (e) { EventHelper.stop(e, true); } action.run(); }
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
ArrowFunction
async () => { await this.workspaceTrustManagementService.setWorkspaceTrust(true); }
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
ArrowFunction
async () => { await this.workspaceTrustManagementService.setParentFolderTrust(true); }
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
ArrowFunction
async () => { await this.workspaceTrustManagementService.setWorkspaceTrust(false); }
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
ArrowFunction
participant => { participant.layout(); }
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
ClassDeclaration
class TrustedUriTableVirtualDelegate implements ITableVirtualDelegate<ITrustedUriItem> { static readonly HEADER_ROW_HEIGHT = 30; static readonly ROW_HEIGHT = 24; readonly headerRowHeight = TrustedUriTableVirtualDelegate.HEADER_ROW_HEIGHT; getHeight(item: ITrustedUriItem) { return TrustedUriTableVirtualDelegate.R...
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
ClassDeclaration
class TrustedUriActionsColumnRenderer implements ITableRenderer<ITrustedUriItem, IActionsColumnTemplateData> { static readonly TEMPLATE_ID = 'actions'; readonly templateId: string = TrustedUriActionsColumnRenderer.TEMPLATE_ID; constructor( private readonly table: WorkspaceTrustedUrisTable, private readonly c...
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
ClassDeclaration
class TrustedUriPathColumnRenderer implements ITableRenderer<ITrustedUriItem, ITrustedUriPathColumnTemplateData> { static readonly TEMPLATE_ID = 'path'; readonly templateId: string = TrustedUriPathColumnRenderer.TEMPLATE_ID; private currentItem?: ITrustedUriItem; constructor( private readonly table: WorkspaceT...
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
ClassDeclaration
class TrustedUriHostColumnRenderer implements ITableRenderer<ITrustedUriItem, ITrustedUriHostColumnTemplateData> { static readonly TEMPLATE_ID = 'host'; readonly templateId: string = TrustedUriHostColumnRenderer.TEMPLATE_ID; constructor( @ILabelService private readonly labelService: ILabelService, ) { } rend...
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
InterfaceDeclaration
interface ITrustedUriItem { parentOfWorkspaceItem: boolean; uri: URI; }
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
InterfaceDeclaration
interface IActionsColumnTemplateData { readonly actionBar: ActionBar; }
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
InterfaceDeclaration
interface ITrustedUriPathColumnTemplateData { element: HTMLElement; pathLabel: HTMLElement; pathInput: InputBox; renderDisposables: DisposableStore; disposables: DisposableStore; }
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
InterfaceDeclaration
interface ITrustedUriHostColumnTemplateData { element: HTMLElement; hostContainer: HTMLElement; buttonBarContainer: HTMLElement; disposables: DisposableStore; renderDisposables: DisposableStore; }
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
MethodDeclaration
project(row: ITrustedUriItem): ITrustedUriItem { return row; }
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
MethodDeclaration
private getIndexOfTrustedUriEntry(item: ITrustedUriItem): number { const index = this.trustedUriEntries.indexOf(item); if (index === -1) { for (let i = 0; i < this.trustedUriEntries.length; i++) { if (this.trustedUriEntries[i].uri === item.uri) { return i; } } } return index; }
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
MethodDeclaration
private selectTrustedUriEntry(item: ITrustedUriItem, focus: boolean = true): void { const index = this.getIndexOfTrustedUriEntry(item); if (index !== -1) { if (focus) { this.table.domFocus(); this.table.setFocus([index]); } this.table.setSelection([index]); } }
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
MethodDeclaration
layout(): void { this.table.layout((this.trustedUriEntries.length * TrustedUriTableVirtualDelegate.ROW_HEIGHT) + TrustedUriTableVirtualDelegate.HEADER_ROW_HEIGHT, undefined); }
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
MethodDeclaration
updateTable(): void { const entries = this.trustedUriEntries; this.container.classList.toggle('empty', entries.length === 0); this.descriptionElement.innerText = entries.length ? localize('trustedFoldersDescription', "You trust the following folders, their subfolders, and workspace files.") : localize('no...
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
MethodDeclaration
validateUri(path: string, item?: ITrustedUriItem): IMessage | null { if (!item) { return null; } if (item.uri.scheme === 'vscode-vfs') { const segments = path.split(posix.sep).filter(s => s.length); if (segments.length === 0 && path.startsWith(posix.sep)) { return { type: MessageType.WARNING, ...
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
MethodDeclaration
acceptEdit(item: ITrustedUriItem, uri: URI) { const trustedFolders = this.workspaceTrustManagementService.getTrustedUris(); const index = trustedFolders.findIndex(u => this.uriService.extUri.isEqual(u, item.uri)); if (index >= trustedFolders.length || index === -1) { trustedFolders.push(uri); } else { t...
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
MethodDeclaration
rejectEdit(item: ITrustedUriItem) { this._onDidRejectEdit.fire(item); }
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
MethodDeclaration
async delete(item: ITrustedUriItem) { await this.workspaceTrustManagementService.setUrisTrust([item.uri], false); this._onDelete.fire(item); }
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
MethodDeclaration
async edit(item: ITrustedUriItem, usePickerIfPossible?: boolean) { const canUseOpenDialog = item.uri.scheme === Schemas.file || ( item.uri.scheme === this.currentWorkspaceUri.scheme && this.uriService.extUri.isEqualAuthority(this.currentWorkspaceUri.authority, item.uri.authority) && !isVirtualResource...
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
MethodDeclaration
getHeight(item: ITrustedUriItem) { return TrustedUriTableVirtualDelegate.ROW_HEIGHT; }
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
MethodDeclaration
renderTemplate(container: HTMLElement): IActionsColumnTemplateData { const element = container.appendChild($('.actions')); const actionBar = new ActionBar(element, { animated: false }); return { actionBar }; }
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
MethodDeclaration
renderElement(item: ITrustedUriItem, index: number, templateData: IActionsColumnTemplateData, height: number | undefined): void { templateData.actionBar.clear(); const canUseOpenDialog = item.uri.scheme === Schemas.file || ( item.uri.scheme === this.currentWorkspaceUri.scheme && this.uriService.extUri....
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
MethodDeclaration
private createEditAction(item: ITrustedUriItem): IAction { return <IAction>{ class: ThemeIcon.asClassName(settingsEditIcon), enabled: true, id: 'editTrustedUri', tooltip: localize('editTrustedUri', "Edit Path"), run: () => { this.table.edit(item, false); } }; }
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
MethodDeclaration
private createPickerAction(item: ITrustedUriItem): IAction { return <IAction>{ class: ThemeIcon.asClassName(folderPickerIcon), enabled: true, id: 'pickerTrustedUri', tooltip: localize('pickerTrustedUri', "Open File Picker"), run: () => { this.table.edit(item, true); } }; }
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
MethodDeclaration
private createDeleteAction(item: ITrustedUriItem): IAction { return <IAction>{ class: ThemeIcon.asClassName(settingsRemoveIcon), enabled: true, id: 'deleteTrustedUri', tooltip: localize('deleteTrustedUri', "Delete Path"), run: async () => { await this.table.delete(item); } }; }
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
MethodDeclaration
disposeTemplate(templateData: IActionsColumnTemplateData): void { templateData.actionBar.dispose(); }
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
MethodDeclaration
renderTemplate(container: HTMLElement): ITrustedUriPathColumnTemplateData { const element = container.appendChild($('.path')); const pathLabel = element.appendChild($('div.path-label')); const pathInput = new InputBox(element, this.contextViewService, { validationOptions: { validation: value => this.tabl...
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript
MethodDeclaration
renderElement(item: ITrustedUriItem, index: number, templateData: ITrustedUriPathColumnTemplateData, height: number | undefined): void { templateData.renderDisposables.clear(); this.currentItem = item; templateData.renderDisposables.add(this.table.onEdit(async (e) => { if (item === e) { templateData.elem...
AE1020/vscode
src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
TypeScript