type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
ArrowFunction |
({ term, relayEnvironment, updateFollowCount }) => {
return (
<QueryRenderer<GeneSearchResultsQuery>
environment={relayEnvironment}
query={graphql`
query GeneSearchResultsQuery($term: String!) {
viewer {
...GeneSearchResults_viewer
}
}
`} | fossabot/reaction-1 | src/Components/Onboarding/Steps/Genes/GeneSearchResults.tsx | TypeScript |
ClassDeclaration |
@track({}, { dispatch: data => Events.postEvent(data) })
class GeneSearchResultsContent extends React.Component<Props, null> {
private excludedGeneIds: Set<string>
followCount: number = 0
constructor(props: Props, context: any) {
super(props, context)
this.excludedGeneIds = new Set(
this.props.vie... | fossabot/reaction-1 | src/Components/Onboarding/Steps/Genes/GeneSearchResults.tsx | TypeScript |
InterfaceDeclaration |
interface ContainerProps extends FollowProps {
term: string
} | fossabot/reaction-1 | src/Components/Onboarding/Steps/Genes/GeneSearchResults.tsx | TypeScript |
InterfaceDeclaration |
interface Props extends React.HTMLProps<HTMLAnchorElement>, ContainerProps {
tracking?: TrackingProp
relay?: RelayProp
viewer: GeneSearchResults_viewer
} | fossabot/reaction-1 | src/Components/Onboarding/Steps/Genes/GeneSearchResults.tsx | TypeScript |
TypeAliasDeclaration |
type Gene = GeneSearchResults_viewer["match_gene"][0] | fossabot/reaction-1 | src/Components/Onboarding/Steps/Genes/GeneSearchResults.tsx | TypeScript |
MethodDeclaration |
onGeneFollowed(
gene: Gene,
store: RecordSourceSelectorProxy,
data: GeneSearchResultsFollowGeneMutationResponse
): void {
const suggestedGene = store.get(
data.followGene.gene.similar.edges[0].node.__id
)
this.excludedGeneIds.add(suggestedGene.getValue("_id"))
const suggestedGenesR... | fossabot/reaction-1 | src/Components/Onboarding/Steps/Genes/GeneSearchResults.tsx | TypeScript |
MethodDeclaration |
followedGene(gene: Gene) {
this.excludedGeneIds.add(gene._id)
commitMutation<GeneSearchResultsFollowGeneMutation>(
this.props.relay.environment,
{
mutation: graphql`
mutation GeneSearchResultsFollowGeneMutation(
$input: FollowGeneInput!
$excludedGeneIds: [... | fossabot/reaction-1 | src/Components/Onboarding/Steps/Genes/GeneSearchResults.tsx | TypeScript |
MethodDeclaration |
render() {
const items = this.props.viewer.match_gene.map((item, index) => {
const imageUrl = get(item, i => i.image.cropped.url)
return (
<LinkContainer key={`gene-search-results-${index}`}>
<ReplaceTransition
transitionEnterTimeout={1000}
transitionLeaveTimeo... | fossabot/reaction-1 | src/Components/Onboarding/Steps/Genes/GeneSearchResults.tsx | TypeScript |
ArrowFunction |
config => {
const solarTheme: any = config.variables.solar;
this.option = Object.assign({}, {
tooltip: {
trigger: 'item',
formatter: '{a} <br/>{b} : {c} ({d}%)',
},
series: [
{
... | misupopo/band-admin | src/app/pages/dashboard/solar/solar.component.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'ngx-solar',
styleUrls: ['./solar.component.scss'],
template: `
<nb-card size="xsmall" class="solar-card">
<nb-card-header>Solar Energy Consumption</nb-card-header>
<nb-card-body>
<div echarts [options]="option" class="echart">
</div>
<div clas... | misupopo/band-admin | src/app/pages/dashboard/solar/solar.component.ts | TypeScript |
MethodDeclaration |
ngAfterViewInit() {
this.themeSubscription = this.theme.getJsTheme().delay(1).subscribe(config => {
const solarTheme: any = config.variables.solar;
this.option = Object.assign({}, {
tooltip: {
trigger: 'item',
formatter: '{a} <br... | misupopo/band-admin | src/app/pages/dashboard/solar/solar.component.ts | TypeScript |
MethodDeclaration |
ngOnDestroy() {
this.themeSubscription.unsubscribe();
} | misupopo/band-admin | src/app/pages/dashboard/solar/solar.component.ts | TypeScript |
ArrowFunction |
(e: React.MouseEvent<HTMLElement>, href: string) => {
e.preventDefault();
this.props.history.replace(href);
} | timcowebapps/react.toolkit-guides | src/views/components/button/index.tsx | TypeScript |
ArrowFunction |
(e: React.MouseEvent<HTMLElement>, href: string) => {
e.preventDefault();
this.props.history.replace(href);
} | timcowebapps/react.toolkit-guides | src/views/components/button/index.tsx | TypeScript |
ClassDeclaration |
export class ButtonComp extends React.Component<ButtonCompProps.IProps, ButtonCompState.IState> {
//#region Статические переменные
public static displayName: string = "ButtonComp";
public static propTypes: PropTypes.ValidationMap<ButtonCompProps.IProps> = ButtonCompProps.types;
public static defaultProps: ButtonC... | timcowebapps/react.toolkit-guides | src/views/components/button/index.tsx | TypeScript |
MethodDeclaration | //#endregion
//#region Приватные переменные
//#endregion
//#region Приватные методы
/**
* Начальное состояние свойств по умолчанию.
*
* @class ButtonComp
* @private
*/
private _getInitialState(): ButtonCompState.IState {
return {
// Empty
}
} | timcowebapps/react.toolkit-guides | src/views/components/button/index.tsx | TypeScript |
MethodDeclaration |
private _handleClick(event: any) {
// Empty
} | timcowebapps/react.toolkit-guides | src/views/components/button/index.tsx | TypeScript |
MethodDeclaration | /**
* Отрисовывает компонент.
*
* @class ButtonComp
* @public
*/
public render(): JSX.Element {
return (
<Layout>
<div className={styles["container-fluid"]}>
<div className={CN.many(
styles["row"],
Methodology.Bem.Entities.block(styles, "spacing-above").element().modifiers(["sm"]),
... | timcowebapps/react.toolkit-guides | src/views/components/button/index.tsx | TypeScript |
ArrowFunction |
(plant: PlantsEdge) => {
/* eslint-disable no-case-declarations */
switch (plant.node.parentVegetable.contentfulid.substring(0, 1).toLowerCase()) {
case 'v':
let vegetablesInFamilies: { [id: string]: PlantsEdge[] } | undefined = vegetablesByParent[0].subplants.find(
parentVeg... | buffaloproject1/prepper | src/pages/plants.tsx | TypeScript |
ArrowFunction |
parentVege => {
return parentVege[plant.node.parentVegetable.name]
} | buffaloproject1/prepper | src/pages/plants.tsx | TypeScript |
ArrowFunction |
(vegetableParent, vegParentIndex) => {
return (
<div key={vegParentIndex}>
{vegetableParent.type.toLowerCase() === 'vegetables' && (
<ArticleImageParent key={vegParentIndex}>
<ArticleInside
sty... | buffaloproject1/prepper | src/pages/plants.tsx | TypeScript |
ArrowFunction |
(vegPlant, index) => {
return (
<div className="container" key={index}>
{Object.keys(vegPlant).map((key, index) => {
return (
<div key={index}>
<VegetableGro... | buffaloproject1/prepper | src/pages/plants.tsx | TypeScript |
ArrowFunction |
(key, index) => {
return (
<div key={index}>
<VegetableGroup>
<VegetableGroupTitle>{key}</VegetableGroupTitle>
<div className="row">
... | buffaloproject1/prepper | src/pages/plants.tsx | TypeScript |
ArrowFunction |
(plant: PlantsEdge, index: number) => {
return (
<div className="col4" key={index}>
<LazyLoad
style={{ width: '100%', backgroundColor: '#fefefe' }}
... | buffaloproject1/prepper | src/pages/plants.tsx | TypeScript |
ClassDeclaration |
class PlantsIndex extends React.Component<PlantsProps> {
render() {
/* eslint-disable @typescript-eslint/no-var-requires */
/* eslint-disable no-undef */
const contentful = require('contentful')
const contentfulConfig = require('../../.contentful.json')
/* eslint-enable @typescript-eslint/no-v... | buffaloproject1/prepper | src/pages/plants.tsx | TypeScript |
MethodDeclaration |
render() {
/* eslint-disable @typescript-eslint/no-var-requires */
/* eslint-disable no-undef */
const contentful = require('contentful')
const contentfulConfig = require('../../.contentful.json')
/* eslint-enable @typescript-eslint/no-var-requires */
/* eslint-enable no-undef */
const... | buffaloproject1/prepper | src/pages/plants.tsx | TypeScript |
ArrowFunction |
async (req: Request, res: Response) =>{
try {
const getVideosDetaisUC = new VideoDetailsUC(new VideosDetailsDB())
const result = await getVideosDetaisUC.execute({videoId: req.params.videoId})
res.status(200).send(result)
} catch (error) {
res.status(400).send(error.message)
... | edu-mendes/FutureTube | functions/src/endpoints/getVideosDetailsEP.ts | TypeScript |
ArrowFunction |
(props: Props) => {
return (
<>
<Point>
<div data-guide='1'>1번</div>
<div data-guide='2'>2번</div>
<div data-guide='3'>3번</div>
<div data-guide='4'>4번</div>
<div data-guide='5'>5번</div>
<div data-guide='6'>6번</div>
<div data-guide='7'>7번</div>
... | HorongD/Component | src/components/pages/InstructionTest.tsx | TypeScript |
ClassDeclaration |
@Component({
selector: 'example-call-control-active',
template: `
<md-call-control
type="microphone-muted"
ariaLabel="For the Win"
[active]="true"
(click)="onClick()"
></md-call-control>
`,
})
export class ExampleCallControlActiveComponent {
constructor() {}
onClick() {
a... | AMANDUA/collab-ui | angular/src/lib/call-control/examples/active.component.ts | TypeScript |
MethodDeclaration |
onClick() {
alert('click');
} | AMANDUA/collab-ui | angular/src/lib/call-control/examples/active.component.ts | TypeScript |
ArrowFunction |
event => event instanceof NavigationEnd | sanketpathak/fabric8-ui | src/a-runtime-console/kubernetes/service/namespace.scope.ts | TypeScript |
ArrowFunction |
() => this.activatedRoute | sanketpathak/fabric8-ui | src/a-runtime-console/kubernetes/service/namespace.scope.ts | TypeScript |
ArrowFunction |
route => {
while (route.firstChild) route = route.firstChild;
return route;
} | sanketpathak/fabric8-ui | src/a-runtime-console/kubernetes/service/namespace.scope.ts | TypeScript |
ArrowFunction |
route => route.outlet === 'primary' | sanketpathak/fabric8-ui | src/a-runtime-console/kubernetes/service/namespace.scope.ts | TypeScript |
ArrowFunction |
route => route.params | sanketpathak/fabric8-ui | src/a-runtime-console/kubernetes/service/namespace.scope.ts | TypeScript |
ArrowFunction |
params => this.getNamespace(params) | sanketpathak/fabric8-ui | src/a-runtime-console/kubernetes/service/namespace.scope.ts | TypeScript |
ArrowFunction |
n => n | sanketpathak/fabric8-ui | src/a-runtime-console/kubernetes/service/namespace.scope.ts | TypeScript |
ClassDeclaration |
@Injectable()
export class NamespaceScope implements INamespaceScope {
public namespace: Observable<string>;
constructor(protected activatedRoute: ActivatedRoute, protected router: Router) {
this.namespace = this.router.events
.filter(event => event instanceof NavigationEnd)
.map(() => this.activa... | sanketpathak/fabric8-ui | src/a-runtime-console/kubernetes/service/namespace.scope.ts | TypeScript |
InterfaceDeclaration |
export interface INamespaceScope {
namespace: Observable<string>;
currentNamespace(): string;
} | sanketpathak/fabric8-ui | src/a-runtime-console/kubernetes/service/namespace.scope.ts | TypeScript |
MethodDeclaration |
protected getNamespace(params) {
return params['namespace'] || this.getRouteParams('namespace');
} | sanketpathak/fabric8-ui | src/a-runtime-console/kubernetes/service/namespace.scope.ts | TypeScript |
MethodDeclaration |
protected getRouteParams(key): any {
if (
this.router &&
this.router.routerState &&
this.router.routerState.snapshot &&
this.router.routerState.snapshot.root
) {
return this.findParamsFor(this.router.routerState.snapshot.root, key);
}
return null;
} | sanketpathak/fabric8-ui | src/a-runtime-console/kubernetes/service/namespace.scope.ts | TypeScript |
MethodDeclaration |
protected findParamsFor(route, key): any {
let children = route.children;
for (let child of children) {
let params = child.params;
if (params) {
let answer = params[key];
if (!answer) {
answer = this.findParamsFor(child, key);
}
if (answer) {
retu... | sanketpathak/fabric8-ui | src/a-runtime-console/kubernetes/service/namespace.scope.ts | TypeScript |
MethodDeclaration |
currentNamespace() {
return this.findParamsFor(this.router.routerState.snapshot.root, "namespace");
} | sanketpathak/fabric8-ui | src/a-runtime-console/kubernetes/service/namespace.scope.ts | TypeScript |
ArrowFunction |
() => {
window.blocklet = undefined;
} | ds147000/yzl-backlet | src/libs/__tests__/api.test.ts | TypeScript |
ArrowFunction |
() => {
window.blocklet = {
prefix: 'https://baidu.com',
};
const app = new Request(axios);
const axiosConfig = {
baseURL: '',
timeout: 3000,
};
const config = app.handleRequest(axiosConfig);
expect(config.baseURL).toBe('https://baidu.com');
expect(config.timeout).toBe(200000);
expect(a... | ds147000/yzl-backlet | src/libs/__tests__/api.test.ts | TypeScript |
ArrowFunction |
() => {
window.blocklet = {
prefix: '',
};
const app = new Request(axios);
const axiosConfig = {
baseURL: '',
timeout: 3000,
};
const config = app.handleRequest(axiosConfig);
expect(config.baseURL).toBe('');
expect(config.timeout).toBe(200000);
expect(app.handleResponse({ data: 100 } as... | ds147000/yzl-backlet | src/libs/__tests__/api.test.ts | TypeScript |
ArrowFunction |
() => {
const app = new Request(axios);
expect(app.handleResponse({ data: 100 } as any)).toBe(100);
} | ds147000/yzl-backlet | src/libs/__tests__/api.test.ts | TypeScript |
ArrowFunction |
async () => {
const app = new Request(axios);
expect(app.handleRequestError(null)).rejects.toBe(null);
} | ds147000/yzl-backlet | src/libs/__tests__/api.test.ts | TypeScript |
ArrowFunction |
async () => {
const app = new Request(axios);
const CancelToken = app.getCloseSoure();
expect(CancelToken.token).not.toBeNull();
} | ds147000/yzl-backlet | src/libs/__tests__/api.test.ts | TypeScript |
ArrowFunction |
async () => {
const app = new Request(axios);
app.get('http://127.0.0.1', {});
} | ds147000/yzl-backlet | src/libs/__tests__/api.test.ts | TypeScript |
ArrowFunction |
async () => {
const app = new Request(axios);
app.post('http://127.0.0.1', {});
} | ds147000/yzl-backlet | src/libs/__tests__/api.test.ts | TypeScript |
FunctionDeclaration |
async function submitFile(): Promise<void> {
const data = new FormData();
if (!uploadedFiles.length) return;
data.append('file', uploadedFiles[0].file, uploadedFiles[0].name);
try {
await api.post('/transactions/import', data);
history.push('/');
} catch (err) {
console.log(err... | robertoricci/Desafio-Fundamentos-ReactJS | src/pages/Import/index.tsx | TypeScript |
FunctionDeclaration |
function handleUpload(files: File[]): void {
const uploadFiles = files.map((file: File) => ({
file,
name: file.name,
readableSize: filesize(file.size),
}));
setUploadedFiles(uploadFiles);
} | robertoricci/Desafio-Fundamentos-ReactJS | src/pages/Import/index.tsx | TypeScript |
ArrowFunction |
() => {
const [uploadedFiles, setUploadedFiles] = useState<FileProps[]>([]);
const history = useHistory();
async function submitFile(): Promise<void> {
const data = new FormData();
if (!uploadedFiles.length) return;
data.append('file', uploadedFiles[0].file, uploadedFiles[0].name);
try {
... | robertoricci/Desafio-Fundamentos-ReactJS | src/pages/Import/index.tsx | TypeScript |
ArrowFunction |
(file: File) => ({
file,
name: file.name,
readableSize: filesize(file.size),
}) | robertoricci/Desafio-Fundamentos-ReactJS | src/pages/Import/index.tsx | TypeScript |
InterfaceDeclaration |
interface FileProps {
file: File;
name: string;
readableSize: string;
} | robertoricci/Desafio-Fundamentos-ReactJS | src/pages/Import/index.tsx | TypeScript |
ArrowFunction |
async (request, _, config) => {
const validator = new Validator(request, inputParameters)
validateRequest(request)
const jobRunID = validator.validated.id
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { raceType, date, resultsType, endpoint, ...rest } = validator.validated.data
cons... | KuphJr/external-adapters-js | packages/sources/ap-election/src/endpoint/election.ts | TypeScript |
ArrowFunction |
(request: AdapterRequest) => {
const { statePostal, officeID, raceID } = request.data
const statePostals = statePostal.split(',')
if (statePostals.length > 1) {
throw new AdapterError({
jobRunID: request.id,
statusCode: 400,
message: 'Adapter only supports finding results from a single stat... | KuphJr/external-adapters-js | packages/sources/ap-election/src/endpoint/election.ts | TypeScript |
ArrowFunction |
(response: ResponseSchema) => {
const races = response.races
if (races.length === 0) {
throw Error('We could not find any races')
}
if (races.length > 1) {
throw Error("We don't support finding the winner from multiple races")
}
} | KuphJr/external-adapters-js | packages/sources/ap-election/src/endpoint/election.ts | TypeScript |
ArrowFunction |
(reportingUnits: ReportingUnit[], statePostal: string): ReportingUnit => {
// Response should only contain a national RU if the statePostal is US but will contain both national and state for any other statePostal codes.
const level = statePostal === 'US' ? 'national' : 'state'
const reportingUnit = reportingUnit... | KuphJr/external-adapters-js | packages/sources/ap-election/src/endpoint/election.ts | TypeScript |
ArrowFunction |
(ru) => ru.level === level | KuphJr/external-adapters-js | packages/sources/ap-election/src/endpoint/election.ts | TypeScript |
ArrowFunction |
(reportingUnit: ReportingUnit): Candidate => {
for (const candidate of reportingUnit.candidates) {
if (candidate.winner === 'X') {
return candidate
}
}
throw Error('Candidate not found')
} | KuphJr/external-adapters-js | packages/sources/ap-election/src/endpoint/election.ts | TypeScript |
ArrowFunction |
(candidate: Candidate): string => `${candidate.voteCount},${candidate.last}` | KuphJr/external-adapters-js | packages/sources/ap-election/src/endpoint/election.ts | TypeScript |
ArrowFunction |
(candidates: Candidate[]): string[] => {
const encodedCandidates: string[] = []
const encodedValTypes = ['uint32', 'string', 'string', 'string', 'uint32', 'bool']
const abiCoder = utils.defaultAbiCoder
for (const { candidateID, party, first, last, voteCount, winner } of candidates) {
const encodedCandidate... | KuphJr/external-adapters-js | packages/sources/ap-election/src/endpoint/election.ts | TypeScript |
InterfaceDeclaration |
interface Candidate {
first: string
last: string
abbrv: string
party: string
candidateID: string
pollID: string
ballotOrder: number
polNum: string
voteCount: number
winner?: string
} | KuphJr/external-adapters-js | packages/sources/ap-election/src/endpoint/election.ts | TypeScript |
InterfaceDeclaration |
interface ReportingUnit {
statePostal: string
stateName: string
level: string
lastUpdated: string
precinctsReporting: number
precinctsTotal: number
precinctsReportingPct: number
candidates: Candidate[]
} | KuphJr/external-adapters-js | packages/sources/ap-election/src/endpoint/election.ts | TypeScript |
InterfaceDeclaration |
export interface ResponseSchema {
precinctsReporting: number
precinctsReportingPct: number
winnerFirstName: string
winnerLastName: string
winnerVoteCount: number
winnerCandidateId: string
winnerParty: string
candidates: string[]
electionDate: string
timestamp: string
races: {
test: boolean
... | KuphJr/external-adapters-js | packages/sources/ap-election/src/endpoint/election.ts | TypeScript |
FunctionDeclaration | /**
* Creates a check function that transforms a number into its integer part.
*
* ```js
* const check = truncate();
*
* check(3.14);
* // => {
* // isOk: true,
* // value: 3,
* // }
*
* check(-3.14);
* // => {
* // isOk: true,
* // value: -3,
* // }
* ```
*
* @returns A check function.
*/
e... | jguyon/check | src/truncate.ts | TypeScript |
ArrowFunction |
(value) =>
value < 0 ? Math.ceil(value) : Math.floor(value) | jguyon/check | src/truncate.ts | TypeScript |
FunctionDeclaration |
export async function findLicense(owner: string, repo: string): Promise<any> {
const ignored = checkIsIgnored("github", `${owner}/${repo}`);
const cached = getCachedKeyForGithubRepo(owner, repo);
if (await ignored) {
return FOUND_IGNORED_REPO
}
const cachedKey = await cached;
if (cached... | MachineDoingStuffByItself/licenseplate | src/github/licenseFinder.ts | TypeScript |
FunctionDeclaration |
async function findKey(owner: string, repo: string): Promise<string> {
const url = `https://api.github.com/repos/${owner}/${repo}`;
let repoResponse: Response = await fetch(url);
if (repoResponse.status === 404) {
return FOUND_NO_REPO // Most likely a private repo
}
if (!repoResponse.ok) {
... | MachineDoingStuffByItself/licenseplate | src/github/licenseFinder.ts | TypeScript |
ArrowFunction |
() => cacheGithubRepos({
owner: owner,
repo: repo,
lKey: key
}).then(() => console.log(`[licenseplate]: cached ${key} for ${owner}/${repo} `)) | MachineDoingStuffByItself/licenseplate | src/github/licenseFinder.ts | TypeScript |
ArrowFunction |
() => console.log(`[licenseplate]: cached ${key} for ${owner}/${repo} `) | MachineDoingStuffByItself/licenseplate | src/github/licenseFinder.ts | TypeScript |
InterfaceDeclaration | /**
* The set of arguments for constructing a VpnConnection resource.
*/
export interface VpnConnectionArgs {
/**
* Expected bandwidth in MBPS.
*/
connectionBandwidth?: pulumi.Input<number>;
/**
* The name of the connection.
*/
connectionName?: pulumi.Input<string>;
/**
* ... | polivbr/pulumi-azure-native | sdk/nodejs/network/v20200701/vpnConnection.ts | TypeScript |
MethodDeclaration | /**
* Get an existing VpnConnection 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 opts Optional sett... | polivbr/pulumi-azure-native | sdk/nodejs/network/v20200701/vpnConnection.ts | TypeScript |
MethodDeclaration | /**
* Returns true if the given object is an instance of VpnConnection. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
public static isInstance(obj: any): obj is VpnConnection {
if (obj === undefined || obj === null) {
... | polivbr/pulumi-azure-native | sdk/nodejs/network/v20200701/vpnConnection.ts | TypeScript |
InterfaceDeclaration |
export default interface IGuestVoterRepository {
getByCode(accessCode: string): Promise<IGuestVoterEntity | null>;
list(createdBy: string): Promise<IGuestVoterEntity[]>
save(guestVoter: IGuestVoterEntity): Promise<IGuestVoterEntity>;
exists(email: string): Promise<boolean>;
validate(accessCode: string): Promise<b... | lucasluizss/yourvote | backend/src/domain/guest-voter/IGuestVoterRepository.ts | TypeScript |
ArrowFunction |
choice => {
if (choice === 0) {
this._storageService.store(IS_WORKSPACE_SHELL_ALLOWED_STORAGE_KEY, true, StorageScope.WORKSPACE);
} else {
this._storageService.store(IS_WORKSPACE_SHELL_ALLOWED_STORAGE_KEY, false, StorageScope.WORKSPACE);
}
return TPromise.as(null);
} | GarfieldZHU/vscode | src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.ts | TypeScript |
ClassDeclaration | /**
* Encapsulates terminal configuration logic, the primary purpose of this file is so that platform
* specific test cases can be written.
*/
export class TerminalConfigHelper implements ITerminalConfigHelper {
public panelContainer: HTMLElement;
private _charMeasureElement: HTMLElement;
private _lastFontMeasur... | GarfieldZHU/vscode | src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.ts | TypeScript |
InterfaceDeclaration |
interface IEditorConfiguration {
editor: IEditorOptions;
} | GarfieldZHU/vscode | src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.ts | TypeScript |
InterfaceDeclaration |
interface IFullTerminalConfiguration {
terminal: {
integrated: ITerminalConfiguration;
};
} | GarfieldZHU/vscode | src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.ts | TypeScript |
MethodDeclaration |
private _measureFont(fontFamily: string, fontSize: number, lineHeight: number): ITerminalFont {
// Create charMeasureElement if it hasn't been created or if it was orphaned by its parent
if (!this._charMeasureElement || !this._charMeasureElement.parentElement) {
this._charMeasureElement = document.createElement... | GarfieldZHU/vscode | src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.ts | TypeScript |
MethodDeclaration | /**
* Gets the font information based on the terminal.integrated.fontFamily
* terminal.integrated.fontSize, terminal.integrated.lineHeight configuration properties
*/
public getFont(excludeDimensions?: boolean): ITerminalFont {
const config = this._configurationService.getValue();
const editorConfig = (<IEdit... | GarfieldZHU/vscode | src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.ts | TypeScript |
MethodDeclaration |
public setWorkspaceShellAllowed(isAllowed: boolean): void {
this._storageService.store(IS_WORKSPACE_SHELL_ALLOWED_STORAGE_KEY, isAllowed, StorageScope.WORKSPACE);
} | GarfieldZHU/vscode | src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.ts | TypeScript |
MethodDeclaration |
public mergeDefaultShellPathAndArgs(shell: IShellLaunchConfig): void {
// Check whether there is a workspace setting
const platformKey = platform.isWindows ? 'windows' : platform.isMacintosh ? 'osx' : 'linux';
const shellConfigValue = this._workspaceConfigurationService.inspect<string>(`terminal.integrated.shell... | GarfieldZHU/vscode | src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.ts | TypeScript |
InterfaceDeclaration | // Type definitions for @react-native-community/push-notification-ios 1.0.2
// Project: https://github.com/react-native-community/push-notification-ios
// Definitions by: Jules Sam. Randolph <https://github.com/jsamr>
export interface FetchResult {
NewData: 'UIBackgroundFetchResultNewData';
NoData: 'UIBackgroundFet... | sparkello/push-notification-ios | index.d.ts | TypeScript |
InterfaceDeclaration |
export interface AuthorizationStatus {
UNAuthorizationStatusNotDetermined: 0;
UNAuthorizationStatusDenied: 1;
UNAuthorizationStatusAuthorized: 2;
UNAuthorizationStatusProvisional: 3;
} | sparkello/push-notification-ios | index.d.ts | TypeScript |
InterfaceDeclaration |
export interface PushNotification {
/**
* An alias for `getAlert` to get the notification's main message string
*/
getMessage(): string | NotificationAlert;
/**
* Gets the sound string from the `aps` object
*/
getSound(): string;
/**
* Gets the category string from the `aps` object
*/
g... | sparkello/push-notification-ios | index.d.ts | TypeScript |
InterfaceDeclaration | /**
* @deprecated see `NotificationRequest`
* - This type will be removed in the next major version
*/
export interface PresentLocalNotificationDetails {
/**
* The "action" displayed beneath an actionable notification. Defaults to "view";
*/
alertAction?: string;
/**
* The message displayed in the not... | sparkello/push-notification-ios | index.d.ts | TypeScript |
InterfaceDeclaration | /**
* @deprecated see `NotificationRequest`
* - This type will be removed in the next major version
*/
export interface ScheduleLocalNotificationDetails {
/**
* The "action" displayed beneath an actionable notification. Defaults to "view";
*/
alertAction?: string;
/**
* The message displayed in the no... | sparkello/push-notification-ios | index.d.ts | TypeScript |
InterfaceDeclaration |
export interface PushNotificationPermissions {
alert?: boolean;
badge?: boolean;
sound?: boolean;
lockScreen?: boolean;
notificationCenter?: boolean;
authorizationStatus?: AuthorizationStatus[keyof AuthorizationStatus];
} | sparkello/push-notification-ios | index.d.ts | TypeScript |
InterfaceDeclaration | /**
* Handle push notifications for your app, including permission handling and icon badge number.
*/
export interface PushNotificationIOSStatic {
/**
* iOS fetch results that best describe the result of a finished remote notification handler.
* For a list of possible values, see `PushNotificationIOS.FetchRes... | sparkello/push-notification-ios | index.d.ts | TypeScript |
TypeAliasDeclaration | /**
* Alert Object that can be included in the aps `alert` object
*/
export type NotificationAlert = {
title?: string;
subtitle?: string;
body?: string;
}; | sparkello/push-notification-ios | index.d.ts | TypeScript |
TypeAliasDeclaration | /**
* Notification Category that can include specific actions
*/
export type NotificationCategory = {
id: string;
actions: NotificationAction[];
}; | sparkello/push-notification-ios | index.d.ts | TypeScript |
TypeAliasDeclaration | /**
* Notification Action that can be added to specific categories
*/
export type NotificationAction = {
/**
* Id of Action.
* This value will be returned as actionIdentifier when notification is received.
*/
id: string;
/**
* Text to be shown on notification action button.
*/
title: string;
... | sparkello/push-notification-ios | index.d.ts | TypeScript |
TypeAliasDeclaration |
export type NotificationRequest = {
/**
* identifier of the notification.
* Required in order to retrieve specific notification.
*/
id: string;
/**
* A short description of the reason for the alert.
*/
title?: string;
/**
* A secondary description of the reason for the alert.
*/
subtit... | sparkello/push-notification-ios | index.d.ts | TypeScript |
TypeAliasDeclaration |
export type DeliveredNotification = {
identifier: string;
title: string;
subtitle: string;
body: string;
category?: string;
actionIdentifier?: string;
userText?: string;
userInfo?: Record<string, any>;
'thread-id'?: string;
}; | sparkello/push-notification-ios | index.d.ts | TypeScript |
TypeAliasDeclaration |
export type PushNotificationEventName =
| 'notification'
| 'localNotification'
| 'register'
| 'registrationError'; | sparkello/push-notification-ios | index.d.ts | TypeScript |
ArrowFunction |
(nodes): RuleNode => {
if (nodes.length == 0) {
throw new parseError('cannot parse', fragment.length);
}
if (nodes.length == 1) {
return nodes[0];
}
return {
... | 74th/ls-ebnf-parser | src/ruleparser.ts | TypeScript |
ArrowFunction |
rule => {
ruleNames[rule.name] = true;
} | 74th/ls-ebnf-parser | src/ruleparser.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.