type
stringclasses
7 values
content
stringlengths
4
9.55k
repo
stringlengths
7
96
path
stringlengths
4
178
language
stringclasses
1 value
ClassDeclaration
@NgModule({ imports: [ AppModule, ServerModule, ServerTransferStateModule, ModuleMapLoaderModule ], bootstrap: [AppComponent], }) export class AppServerModule { }
cstodor/Angular-Universal-Prerendering
src/app/app.server.module.ts
TypeScript
FunctionDeclaration
export default function( session: Session, ): LSP.RequestHandler<LSP.TextDocumentPositionParams, LSP.CompletionItem[], never> { return support.cancellableHandler(session, async (event, token) => { let prefix: null | string = null; try { prefix = await command.getPrefix(session, event); } catch (e...
AestheticIntegration/ocaml-language-server
src/bin/server/feature/completion.ts
TypeScript
ArrowFunction
async (event, token) => { let prefix: null | string = null; try { prefix = await command.getPrefix(session, event); } catch (err) { // ignore errors from completing ' .' } if (null == prefix) return []; const colLine = merlin.Position.fromCode(event.position); const request = me...
AestheticIntegration/ocaml-language-server
src/bin/server/feature/completion.ts
TypeScript
ClassDeclaration
export default class DeleteAchievementRequestService { constructor( private achievementRequestsRepository: IAchievementRequestsRepository, ) {} public async execute(id: string): Promise<IExecute> { try { await this.achievementRequestsRepository.delete(id); return {}; } catch (error) { ...
raulrozza/Gametask_Web
src/modules/managePlayers/services/DeleteAchievementRequestService.ts
TypeScript
InterfaceDeclaration
interface IExecute { error?: string; shouldLogout?: boolean; }
raulrozza/Gametask_Web
src/modules/managePlayers/services/DeleteAchievementRequestService.ts
TypeScript
MethodDeclaration
public async execute(id: string): Promise<IExecute> { try { await this.achievementRequestsRepository.delete(id); return {}; } catch (error) { return { error: error.message, shouldLogout: error.shouldLogout }; } }
raulrozza/Gametask_Web
src/modules/managePlayers/services/DeleteAchievementRequestService.ts
TypeScript
ClassDeclaration
/** * Gets and sets settings at the "config" level. This handler does not make use of the * roomId parameter. */ export default class ConfigSettingsHandler extends SettingsHandler { public constructor(private featureNames: string[]) { super(); } public getValue(settingName: string, roomId: strin...
2580ayush2580/matrix-react-sdk
src/settings/handlers/ConfigSettingsHandler.ts
TypeScript
MethodDeclaration
public getValue(settingName: string, roomId: string): any { const config = SdkConfig.get() || {}; if (this.featureNames.includes(settingName)) { const labsConfig = config["features"] || {}; const val = labsConfig[settingName]; if (isNullOrUndefined(val)) return null...
2580ayush2580/matrix-react-sdk
src/settings/handlers/ConfigSettingsHandler.ts
TypeScript
MethodDeclaration
public async setValue(settingName: string, roomId: string, newValue: any): Promise<void> { throw new Error("Cannot change settings at the config level"); }
2580ayush2580/matrix-react-sdk
src/settings/handlers/ConfigSettingsHandler.ts
TypeScript
MethodDeclaration
public canSetValue(settingName: string, roomId: string): boolean { return false; }
2580ayush2580/matrix-react-sdk
src/settings/handlers/ConfigSettingsHandler.ts
TypeScript
MethodDeclaration
public isSupported(): boolean { return true; // SdkConfig is always there }
2580ayush2580/matrix-react-sdk
src/settings/handlers/ConfigSettingsHandler.ts
TypeScript
ClassDeclaration
/** * <p>Modifies the self-service WorkSpace management capabilities for your users. For more * information, see <a href="https://docs.aws.amazon.com/workspaces/latest/adminguide/enable-user-self-service-workspace-management.html">Enable Self-Service WorkSpace Management Capabilities for Your Users</a>.</p> ...
Autoskaler/aws-sdk-js-v3
deno/client-workspaces/commands/ModifySelfservicePermissionsCommand.ts
TypeScript
InterfaceDeclaration
export interface ModifySelfservicePermissionsCommandInput extends ModifySelfservicePermissionsRequest {}
Autoskaler/aws-sdk-js-v3
deno/client-workspaces/commands/ModifySelfservicePermissionsCommand.ts
TypeScript
InterfaceDeclaration
export interface ModifySelfservicePermissionsCommandOutput extends ModifySelfservicePermissionsResult, __MetadataBearer {}
Autoskaler/aws-sdk-js-v3
deno/client-workspaces/commands/ModifySelfservicePermissionsCommand.ts
TypeScript
MethodDeclaration
/** * @internal */ resolveMiddleware( clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: WorkSpacesClientResolvedConfig, options?: __HttpHandlerOptions ): Handler<ModifySelfservicePermissionsCommandInput, ModifySelfservicePermissionsCommandOutput> { this.middlewa...
Autoskaler/aws-sdk-js-v3
deno/client-workspaces/commands/ModifySelfservicePermissionsCommand.ts
TypeScript
MethodDeclaration
private serialize(input: ModifySelfservicePermissionsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { return serializeAws_json1_1ModifySelfservicePermissionsCommand(input, context); }
Autoskaler/aws-sdk-js-v3
deno/client-workspaces/commands/ModifySelfservicePermissionsCommand.ts
TypeScript
MethodDeclaration
private deserialize( output: __HttpResponse, context: __SerdeContext ): Promise<ModifySelfservicePermissionsCommandOutput> { return deserializeAws_json1_1ModifySelfservicePermissionsCommand(output, context); }
Autoskaler/aws-sdk-js-v3
deno/client-workspaces/commands/ModifySelfservicePermissionsCommand.ts
TypeScript
ArrowFunction
(data:any)=>{this.user=data}
Kavya1234Shree/FourwheelerDashboard
src/app/reg-online/reg-online.component.ts
TypeScript
ArrowFunction
(resp: Response) => { this.user= resp.json(); this.totalRec = this.user.length; console.log(this.totalRec); console.log(this.page); //console.log(JSON.stringify(resp.json())); }
Kavya1234Shree/FourwheelerDashboard
src/app/reg-online/reg-online.component.ts
TypeScript
ArrowFunction
(data)=>this.user=data
Kavya1234Shree/FourwheelerDashboard
src/app/reg-online/reg-online.component.ts
TypeScript
ArrowFunction
(data:any)=>{ data=this.user for(let i=0 ;i < this.user.length; ++i){ this.userphone=this.user[i].phone; this.active=this.user[i].active; this.category=this.user[i].category; this.bodytype=this.user[i].body_type; this.willaccept=this.user[i].will_accept_to_work_for_below_category this.user...
Kavya1234Shree/FourwheelerDashboard
src/app/reg-online/reg-online.component.ts
TypeScript
ClassDeclaration
@Component({ selector: 'app-reg-online', templateUrl: './reg-online.component.html', styleUrls: ['./reg-online.component.scss'] }) export class RegOnlineComponent implements OnInit { userphone:any; usernumber:any; userVehicleNumber:any; userWorkPreference:any; public user:any; public phone:number; totalRec :...
Kavya1234Shree/FourwheelerDashboard
src/app/reg-online/reg-online.component.ts
TypeScript
MethodDeclaration
ngOnInit() { let resp = this.httpClient.get("https://apis.zeigerapp.in/api/driverfour-owner"); resp.subscribe((data:any)=>{this.user=data}) this.loadEmployee(); }
Kavya1234Shree/FourwheelerDashboard
src/app/reg-online/reg-online.component.ts
TypeScript
MethodDeclaration
private loadEmployee() { this .serv .getEmployees() .subscribe((resp: Response) => { this.user= resp.json(); this.totalRec = this.user.length; console.log(this.totalRec); console.log(this.page); //console.log(JSON.stringify(re...
Kavya1234Shree/FourwheelerDashboard
src/app/reg-online/reg-online.component.ts
TypeScript
MethodDeclaration
refresh() { window.location.reload(); }
Kavya1234Shree/FourwheelerDashboard
src/app/reg-online/reg-online.component.ts
TypeScript
MethodDeclaration
deleteRow(phone){ console.log("phone **********",phone); let resp=this.httpClient.get('https://apis.zeigerapp.in/api/driverfour-owner/delete?phone='+phone); resp.subscribe((data)=>this.user=data); // this.phone=this.user['phone'] for(let i = 0; i < this.user.length; ++i){ if (this.user[i].phone === ph...
Kavya1234Shree/FourwheelerDashboard
src/app/reg-online/reg-online.component.ts
TypeScript
MethodDeclaration
openModal(phone,vehicle_number,work_preference,cancelled_cheque_image) { const dialogConfig = new MatDialogConfig(); // The user can't close the dialog by clicking outside its body console.log("phone is ",phone) console.log("vehicle number is ",vehicle_number) console.log("wprkong is",work_prefere...
Kavya1234Shree/FourwheelerDashboard
src/app/reg-online/reg-online.component.ts
TypeScript
MethodDeclaration
download() { let fileName = 'FourWheelerOnlineRegistration.csv'; let columnNames = ["Vendor_uuid","Phone","Vehicle Number","Body Type","Category","Active","Work Preference","Will Accept to work for below category"]; let header = columnNames.join(','); let csv = header; csv += '\r\n'; this.ht...
Kavya1234Shree/FourwheelerDashboard
src/app/reg-online/reg-online.component.ts
TypeScript
ArrowFunction
(res) => { return res.json(); }
jsdelivrbot/ringcentral-ts
src/paths/IvrPrompts.ts
TypeScript
ArrowFunction
res => {}
jsdelivrbot/ringcentral-ts
src/paths/IvrPrompts.ts
TypeScript
ClassDeclaration
export default class IvrPrompts extends PathSegment { constructor(prv: PathSegment, id?: string, service?) { super('ivr-prompts', id, prv, service); } /** * Internal identifier of a message attachment */ content(id?: string) { return new Content(this, id); } /** * <p style='font-style:italic;'>Since 1...
jsdelivrbot/ringcentral-ts
src/paths/IvrPrompts.ts
TypeScript
MethodDeclaration
/** * Internal identifier of a message attachment */ content(id?: string) { return new Content(this, id); }
jsdelivrbot/ringcentral-ts
src/paths/IvrPrompts.ts
TypeScript
MethodDeclaration
/** * <p style='font-style:italic;'>Since 1.0.32 (Release 9.3)</p><p>Returns a list of IVR prompts.</p><h4>Required Permissions</h4><table class='fullwidth'><thead><tr><th>Permission</th><th>Description</th></tr></thead><tbody><tr><td class='code'>ReadAccounts</td><td>Viewing user account info (including name, busin...
jsdelivrbot/ringcentral-ts
src/paths/IvrPrompts.ts
TypeScript
MethodDeclaration
/** * <p style='font-style:italic;'>Since 1.0.32 (Release 9.3)</p><p>Returns an IVR prompt by ID</p><h4>Required Permissions</h4><table class='fullwidth'><thead><tr><th>Permission</th><th>Description</th></tr></thead><tbody><tr><td class='code'>ReadAccounts</td><td>Viewing user account info (including name, business...
jsdelivrbot/ringcentral-ts
src/paths/IvrPrompts.ts
TypeScript
MethodDeclaration
/** * <p style='font-style:italic;'>Since 1.0.32 (Release 9.3)</p><p>Deletes an IVR prompt by ID</p><h4>Required Permissions</h4><table class='fullwidth'><thead><tr><th>Permission</th><th>Description</th></tr></thead><tbody><tr><td class='code'>EditAccounts</td><td>Viewing user account info (including name, business...
jsdelivrbot/ringcentral-ts
src/paths/IvrPrompts.ts
TypeScript
FunctionDeclaration
function handleDOM( doc: Document, options: DictConfigs['longman']['options'] ): LongmanSearchResult | Promise<LongmanSearchResult> { if (doc.querySelector('.dictentry')) { return handleDOMLex(doc, options) } else if (options.related) { return handleDOMRelated(doc) } return handleNoResult() }
BlackHole1/ext-saladict
src/components/dictionaries/longman/engine.ts
TypeScript
FunctionDeclaration
function handleDOMLex( doc: Document, options: DictConfigs['longman']['options'] ): LongmanSearchResultLex | Promise<LongmanSearchResultLex> { const result: LongmanResultLex = { type: 'lex', bussinessFirst: options.bussinessFirst, contemporary: [], bussiness: [] } const audio: { uk?: string;...
BlackHole1/ext-saladict
src/components/dictionaries/longman/engine.ts
TypeScript
FunctionDeclaration
function handleDOMRelated( doc: Document ): LongmanSearchResultRelated | Promise<LongmanSearchResultRelated> { const $didyoumean = doc.querySelector('.didyoumean') if ($didyoumean) { return { result: { type: 'related', list: getInnerHTML(HOST, $didyoumean) } } } return han...
BlackHole1/ext-saladict
src/components/dictionaries/longman/engine.ts
TypeScript
ArrowFunction
text => { return `https://www.ldoceonline.com/dictionary/${text .trim() .split(/\s+/) .join('-')}` }
BlackHole1/ext-saladict
src/components/dictionaries/longman/engine.ts
TypeScript
ArrowFunction
( text, config, profile, payload ) => { const options = profile.dicts.all.longman.options return fetchDirtyDOM( 'http://www.ldoceonline.com/dictionary/' + text.toLocaleLowerCase().replace(/[^A-Za-z0-9]+/g, '-') ) .catch(handleNetWorkError) .then(doc => handleDOM(doc, options)) }
BlackHole1/ext-saladict
src/components/dictionaries/longman/engine.ts
TypeScript
ArrowFunction
doc => handleDOM(doc, options)
BlackHole1/ext-saladict
src/components/dictionaries/longman/engine.ts
TypeScript
ArrowFunction
$speaker => { const mp3 = $speaker.dataset.srcMp3 if (mp3) { const parent = $speaker.parentElement $speaker.replaceWith(getStaticSpeaker(mp3)) if (parent && parent.classList.contains('EXAMPLE')) { parent.classList.add('withSpeaker') } } }
BlackHole1/ext-saladict
src/components/dictionaries/longman/engine.ts
TypeScript
ArrowFunction
$el => ({ title: $el.title, rank: $el.textContent || '' })
BlackHole1/ext-saladict
src/components/dictionaries/longman/engine.ts
TypeScript
ArrowFunction
$pron => { let lang = 'us' const title = $pron.title if (title.includes('British')) { lang = 'uk' } const pron = $pron.getAttribute('data-src-mp3') || '' audio[lang] = pron entry.prons.push({ lang, pron }) }
BlackHole1/ext-saladict
src/components/dictionaries/longman/engine.ts
TypeScript
ArrowFunction
$sen => getInnerHTML(HOST, $sen)
BlackHole1/ext-saladict
src/components/dictionaries/longman/engine.ts
TypeScript
ArrowFunction
$exa => getInnerHTML(HOST, $exa)
BlackHole1/ext-saladict
src/components/dictionaries/longman/engine.ts
TypeScript
InterfaceDeclaration
export interface LongmanResultEntry { title: { HWD: string HYPHENATION: string HOMNUM: string } senses: HTMLString[] prons: Array<{ lang: string pron: string }> topic?: { title: string href: string } phsym?: string level?: { rate: number title: string } freq?: ...
BlackHole1/ext-saladict
src/components/dictionaries/longman/engine.ts
TypeScript
InterfaceDeclaration
export interface LongmanResultLex { type: 'lex' bussinessFirst: boolean contemporary: LongmanResultEntry[] bussiness: LongmanResultEntry[] wordfams?: HTMLString }
BlackHole1/ext-saladict
src/components/dictionaries/longman/engine.ts
TypeScript
InterfaceDeclaration
export interface LongmanResultRelated { type: 'related' list: HTMLString }
BlackHole1/ext-saladict
src/components/dictionaries/longman/engine.ts
TypeScript
TypeAliasDeclaration
export type LongmanResult = LongmanResultLex | LongmanResultRelated
BlackHole1/ext-saladict
src/components/dictionaries/longman/engine.ts
TypeScript
TypeAliasDeclaration
type LongmanSearchResult = DictSearchResult<LongmanResult>
BlackHole1/ext-saladict
src/components/dictionaries/longman/engine.ts
TypeScript
TypeAliasDeclaration
type LongmanSearchResultLex = DictSearchResult<LongmanResultLex>
BlackHole1/ext-saladict
src/components/dictionaries/longman/engine.ts
TypeScript
TypeAliasDeclaration
type LongmanSearchResultRelated = DictSearchResult<LongmanResultRelated>
BlackHole1/ext-saladict
src/components/dictionaries/longman/engine.ts
TypeScript
ArrowFunction
(url: any) => axios.get(url)
Rachchanon/testChomCHOB
src/components/product-heckout/index.tsx
TypeScript
ArrowFunction
() => { const card: CSSProperties = { backgroundColor: '#FCFCFC', borderRadius: '18px', padding: '21px 20px 27px', }; const txtPrice: CSSProperties = { color: '#FF6F61', fontSize: '28px', lineHeight: '36px', fontFamily: 'Boon-500', }; const btnCheckout: CSSProperti...
Rachchanon/testChomCHOB
src/components/product-heckout/index.tsx
TypeScript
ArrowFunction
(state: RootState) => state.rootReducer.cart
Rachchanon/testChomCHOB
src/components/product-heckout/index.tsx
TypeScript
ArrowFunction
(e, index) => { let aPrice = +e.price * e.quantity; sumItem.push(aPrice); totalItem.push(e.quantity); }
Rachchanon/testChomCHOB
src/components/product-heckout/index.tsx
TypeScript
ArrowFunction
(item) => ( <div key={item._id}
Rachchanon/testChomCHOB
src/components/product-heckout/index.tsx
TypeScript
ArrowFunction
<T extends Props>(props: T) => { // @dts-jest:pass:snap -> Pick<T, { [Key in keyof T]: T[Key] extends number ? Key : never; }[keyof T]> testType<PickByValue<T, number>>(); }
dosentmatter/utility-types
src/mapped-types.spec.snap.ts
TypeScript
ArrowFunction
<T extends Props>(props: T) => { // @dts-jest:pass:snap -> Pick<T, { [Key in keyof T]: [number] extends [T[Key]] ? [T[Key]] extends [T[Key] & number] ? Key : never : never; }[keyof T]> testType<PickByValueExact<T, number>>(); }
dosentmatter/utility-types
src/mapped-types.spec.snap.ts
TypeScript
ArrowFunction
<T extends Props>(props: T) => { // @dts-jest:pass:snap -> Pick<T, SetDifference<keyof T, "age">> testType<Omit<T, 'age'>>(); const { age, ...rest } = props; // @dts-jest:pass:snap -> any const result: Omit<T, 'age'> = rest; }
dosentmatter/utility-types
src/mapped-types.spec.snap.ts
TypeScript
ArrowFunction
<T extends Props>(props: T) => { // @dts-jest:pass:snap -> Pick<T, { [Key in keyof T]: T[Key] extends string | boolean ? never : Key; }[keyof T]> testType<OmitByValue<T, string | boolean>>(); }
dosentmatter/utility-types
src/mapped-types.spec.snap.ts
TypeScript
ArrowFunction
<T extends Props>(props: T) => { // @dts-jest:pass:snap -> Pick<T, { [Key in keyof T]: [number] extends [T[Key]] ? [T[Key]] extends [T[Key] & number] ? never : Key : Key; }[keyof T]> testType<OmitByValueExact<T, number>>(); }
dosentmatter/utility-types
src/mapped-types.spec.snap.ts
TypeScript
ArrowFunction
<T extends Props>(props: T) => { const { age, ...rest } = props; // @dts-jest:pass:snap -> any const result: Intersection<T, Omit<T, 'age'>> = rest; }
dosentmatter/utility-types
src/mapped-types.spec.snap.ts
TypeScript
ArrowFunction
<T extends Props>(props: T) => { const { age, ...rest } = props; // @dts-jest:pass:snap -> any const result: Diff<T, Pick<T, 'age'>> = rest; }
dosentmatter/utility-types
src/mapped-types.spec.snap.ts
TypeScript
ArrowFunction
<T extends Props>(props: T) => { const { age, ...rest } = props; // @dts-jest:pass:snap -> any const result: Subtract<T, Pick<T, 'age'>> = rest; }
dosentmatter/utility-types
src/mapped-types.spec.snap.ts
TypeScript
ArrowFunction
<T extends Props>(props: T) => { const { age, ...rest } = props; // @dts-jest:pass:snap -> any const result: Overwrite<Omit<T, 'age'>, T> = rest; }
dosentmatter/utility-types
src/mapped-types.spec.snap.ts
TypeScript
ArrowFunction
<T extends Props>(props: T) => { const { age, ...rest } = props; // @dts-jest:pass:snap -> any const result: Assign<{}, Omit<T, 'age'>> = rest; }
dosentmatter/utility-types
src/mapped-types.spec.snap.ts
TypeScript
TypeAliasDeclaration
/** * Fixtures */ type Props = { name: string; age: number; visible: boolean };
dosentmatter/utility-types
src/mapped-types.spec.snap.ts
TypeScript
TypeAliasDeclaration
type DefaultProps = { age: number };
dosentmatter/utility-types
src/mapped-types.spec.snap.ts
TypeScript
TypeAliasDeclaration
type NewProps = { age: string; other: string };
dosentmatter/utility-types
src/mapped-types.spec.snap.ts
TypeScript
TypeAliasDeclaration
type MixedProps = { name: string; setName: (name: string) => void; someKeys?: string; someFn?: (...args: any) => any; };
dosentmatter/utility-types
src/mapped-types.spec.snap.ts
TypeScript
TypeAliasDeclaration
type ReadWriteProps = { readonly a: number; b: string };
dosentmatter/utility-types
src/mapped-types.spec.snap.ts
TypeScript
TypeAliasDeclaration
type RequiredOptionalProps = { req: number; reqUndef: number | undefined; opt?: string; optUndef?: string | undefined; };
dosentmatter/utility-types
src/mapped-types.spec.snap.ts
TypeScript
TypeAliasDeclaration
type NestedProps = { first: { second: { name: string; }; }; };
dosentmatter/utility-types
src/mapped-types.spec.snap.ts
TypeScript
TypeAliasDeclaration
type NestedArrayProps = { first: { second: Array<{ name: string }>; }; };
dosentmatter/utility-types
src/mapped-types.spec.snap.ts
TypeScript
TypeAliasDeclaration
type NestedFunctionProps = { first: { second: (value: number) => string; }; };
dosentmatter/utility-types
src/mapped-types.spec.snap.ts
TypeScript
TypeAliasDeclaration
type NestedProps = { first?: { second?: { name?: string | null; }; }; };
dosentmatter/utility-types
src/mapped-types.spec.snap.ts
TypeScript
TypeAliasDeclaration
type NestedArrayProps = { first?: { second?: Array<{ name?: string | null } | undefined>; }; };
dosentmatter/utility-types
src/mapped-types.spec.snap.ts
TypeScript
TypeAliasDeclaration
type NestedFunctionProps = { first?: { second?: (value: number) => string; }; };
dosentmatter/utility-types
src/mapped-types.spec.snap.ts
TypeScript
TypeAliasDeclaration
type NestedProps = { first?: null | { second?: null | { name?: null | string; }; }; };
dosentmatter/utility-types
src/mapped-types.spec.snap.ts
TypeScript
TypeAliasDeclaration
type NestedArrayProps = { first?: null | { second?: Array<{ name?: string | null } | undefined | null>; }; };
dosentmatter/utility-types
src/mapped-types.spec.snap.ts
TypeScript
TypeAliasDeclaration
type NestedFunctionProps = { first?: null | { second?: (value: number) => string; }; };
dosentmatter/utility-types
src/mapped-types.spec.snap.ts
TypeScript
ClassDeclaration
@Module({ imports: [], controllers: [AppController, BookController], providers: [AppService, BookService], }) export class AppModule {}
Bumbilo/nest
src/app.module.ts
TypeScript
FunctionDeclaration
export function isModClassName(className: string) { const isMod = (className.startsWith('/Game/') && !className.startsWith('/Game/FactoryGame/')) || (!className.startsWith('/Game/') && !className.startsWith('/Script/')) || modClassNamePrefixes.some((prefix) => className.startsWith(prefix)); if (i...
bitowl/ficsit-felix
app/src/lib/core/definitions/models.ts
TypeScript
ArrowFunction
(prefix) => className.startsWith(prefix)
bitowl/ficsit-felix
app/src/lib/core/definitions/models.ts
TypeScript
InterfaceDeclaration
export interface ModelConfig { model: string; color: number; // true if this actor can be painted with the color gun paintable: Paintable; powerLineOffset?: { x: number; y: number; z: number }; }
bitowl/ficsit-felix
app/src/lib/core/definitions/models.ts
TypeScript
EnumDeclaration
export enum Paintable { FALSE, TRUE, NOT_SLOT0, // Slot 0 is not used to paint, but default color is used instead }
bitowl/ficsit-felix
app/src/lib/core/definitions/models.ts
TypeScript
FunctionDeclaration
export function TaskList() { const [tasks, setTasks] = useState<Task[]>([]); const [newTaskTitle, setNewTaskTitle] = useState(''); function handleCreateNewTask() { // Crie uma nova task com um id random, não permita criar caso o título seja vazio. if(!newTaskTitle) return; const newTask = { i...
andsonlourenco/desafio01-trilha-react
src/components/TaskList.tsx
TypeScript
FunctionDeclaration
function handleCreateNewTask() { // Crie uma nova task com um id random, não permita criar caso o título seja vazio. if(!newTaskTitle) return; const newTask = { id: Math.random(), title: newTaskTitle, isCOmplete: false } setTasks([...tasks, newTask]); setNewTaskTitle(''); ...
andsonlourenco/desafio01-trilha-react
src/components/TaskList.tsx
TypeScript
FunctionDeclaration
function handleToggleTaskCompletion(id: number) { // Altere entre `true` ou `false` o campo `isComplete` de uma task com dado ID const completedTask = tasks.map(task => task.id === id ? { ...task, isComplete: !task.isComplete } : task); setTasks(completedTask) }
andsonlourenco/desafio01-trilha-react
src/components/TaskList.tsx
TypeScript
FunctionDeclaration
function handleRemoveTask(id: number) { // Remova uma task da listagem pelo ID const taskFilter = tasks.filter(task => task.id !== id); setTasks(taskFilter) }
andsonlourenco/desafio01-trilha-react
src/components/TaskList.tsx
TypeScript
ArrowFunction
task => task.id === id ? { ...task, isComplete: !task.isComplete } : task
andsonlourenco/desafio01-trilha-react
src/components/TaskList.tsx
TypeScript
ClassDeclaration
export default class Table<T> extends React.Component<TableProps<T>, TableState<T>> { static Column: typeof Column; static ColumnGroup: typeof ColumnGroup; static propTypes: { dataSource: PropTypes.Requireable<any[]>; columns: PropTypes.Requireable<any[]>; prefixCls: PropTypes.Requi...
mperu92/OpenLab
OpenLab2019/OpenLab/node_modules/antd/es/table/Table.d.ts
TypeScript
MethodDeclaration
componentWillReceiveProps(nextProps: TableProps<T>): void;
mperu92/OpenLab
OpenLab2019/OpenLab/node_modules/antd/es/table/Table.d.ts
TypeScript
MethodDeclaration
getDefaultSelection(): any[];
mperu92/OpenLab
OpenLab2019/OpenLab/node_modules/antd/es/table/Table.d.ts
TypeScript
MethodDeclaration
getDefaultPagination(props: TableProps<T>): {};
mperu92/OpenLab
OpenLab2019/OpenLab/node_modules/antd/es/table/Table.d.ts
TypeScript
MethodDeclaration
getSortOrderColumns(columns?: ColumnProps<T>[]): any;
mperu92/OpenLab
OpenLab2019/OpenLab/node_modules/antd/es/table/Table.d.ts
TypeScript
MethodDeclaration
getFilteredValueColumns(columns?: ColumnProps<T>[]): any;
mperu92/OpenLab
OpenLab2019/OpenLab/node_modules/antd/es/table/Table.d.ts
TypeScript
MethodDeclaration
getFiltersFromColumns(columns?: ColumnProps<T>[]): any;
mperu92/OpenLab
OpenLab2019/OpenLab/node_modules/antd/es/table/Table.d.ts
TypeScript