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 (err) {
// ignore errors from completing ' .'
}
if (null == prefix) return [];
const colLine = merlin.Position.fromCode(event.position);
const request = merlin.Query.complete
.prefix(prefix)
.at(colLine)
.with.doc();
const response = await session.merlin.query(request, token, event.textDocument, Infinity);
if ("return" !== response.class) return [];
const entries = response.value.entries || [];
return entries.map(merlin.Completion.intoCode);
});
} | 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 = merlin.Query.complete
.prefix(prefix)
.at(colLine)
.with.doc();
const response = await session.merlin.query(request, token, event.textDocument, Infinity);
if ("return" !== response.class) return [];
const entries = response.value.entries || [];
return entries.map(merlin.Completion.intoCode);
} | 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) {
return { error: error.message, shouldLogout: error.shouldLogout };
}
}
} | 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: string): any {
const config = SdkConfig.get() || {};
if (this.featureNames.includes(settingName)) {
const labsConfig = config["features"] || {};
const val = labsConfig[settingName];
if (isNullOrUndefined(val)) return null; // no definition at this level
if (val === true || val === false) return val; // new style: mapped as a boolean
if (val === "enable") return true; // backwards compat
if (val === "disable") return false; // backwards compat
if (val === "labs") return null; // backwards compat, no override
return null; // fallback in the case of invalid input
}
// Special case themes
if (settingName === "theme") {
return config["default_theme"];
}
const settingsConfig = config["settingDefaults"];
if (!settingsConfig || isNullOrUndefined(settingsConfig[settingName])) return null;
return settingsConfig[settingName];
}
public async setValue(settingName: string, roomId: string, newValue: any): Promise<void> {
throw new Error("Cannot change settings at the config level");
}
public canSetValue(settingName: string, roomId: string): boolean {
return false;
}
public isSupported(): boolean {
return true; // SdkConfig is always there
}
} | 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; // no definition at this level
if (val === true || val === false) return val; // new style: mapped as a boolean
if (val === "enable") return true; // backwards compat
if (val === "disable") return false; // backwards compat
if (val === "labs") return null; // backwards compat, no override
return null; // fallback in the case of invalid input
}
// Special case themes
if (settingName === "theme") {
return config["default_theme"];
}
const settingsConfig = config["settingDefaults"];
if (!settingsConfig || isNullOrUndefined(settingsConfig[settingName])) return null;
return settingsConfig[settingName];
} | 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>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { WorkSpacesClient, ModifySelfservicePermissionsCommand } from "../../client-workspaces/mod.ts";
* // const { WorkSpacesClient, ModifySelfservicePermissionsCommand } = require("@aws-sdk/client-workspaces"); // CommonJS import
* const client = new WorkSpacesClient(config);
* const command = new ModifySelfservicePermissionsCommand(input);
* const response = await client.send(command);
* ```
*
* @see {@link ModifySelfservicePermissionsCommandInput} for command's `input` shape.
* @see {@link ModifySelfservicePermissionsCommandOutput} for command's `response` shape.
* @see {@link WorkSpacesClientResolvedConfig | config} for command's `input` shape.
*
*/
export class ModifySelfservicePermissionsCommand extends $Command<
ModifySelfservicePermissionsCommandInput,
ModifySelfservicePermissionsCommandOutput,
WorkSpacesClientResolvedConfig
> {
// Start section: command_properties
// End section: command_properties
constructor(readonly input: ModifySelfservicePermissionsCommandInput) {
// Start section: command_constructor
super();
// End section: command_constructor
}
/**
* @internal
*/
resolveMiddleware(
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
configuration: WorkSpacesClientResolvedConfig,
options?: __HttpHandlerOptions
): Handler<ModifySelfservicePermissionsCommandInput, ModifySelfservicePermissionsCommandOutput> {
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "WorkSpacesClient";
const commandName = "ModifySelfservicePermissionsCommand";
const handlerExecutionContext: HandlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: ModifySelfservicePermissionsRequest.filterSensitiveLog,
outputFilterSensitiveLog: ModifySelfservicePermissionsResult.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve(
(request: FinalizeHandlerArguments<any>) =>
requestHandler.handle(request.request as __HttpRequest, options || {}),
handlerExecutionContext
);
}
private serialize(input: ModifySelfservicePermissionsCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
return serializeAws_json1_1ModifySelfservicePermissionsCommand(input, context);
}
private deserialize(
output: __HttpResponse,
context: __SerdeContext
): Promise<ModifySelfservicePermissionsCommandOutput> {
return deserializeAws_json1_1ModifySelfservicePermissionsCommand(output, context);
}
// Start section: command_body_extra
// End section: command_body_extra
} | 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.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "WorkSpacesClient";
const commandName = "ModifySelfservicePermissionsCommand";
const handlerExecutionContext: HandlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: ModifySelfservicePermissionsRequest.filterSensitiveLog,
outputFilterSensitiveLog: ModifySelfservicePermissionsResult.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve(
(request: FinalizeHandlerArguments<any>) =>
requestHandler.handle(request.request as __HttpRequest, options || {}),
handlerExecutionContext
);
} | 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.usernumber=this.user[i].vendor_uuid;
this.userVehicleNumber=this.user[i].vehicle_number;
this.userWorkPreference=this.user[i].work_preference;
// console.log("Finalnumber",this.usernumber);
csv += [[this.usernumber] ,[this.userphone] ,[this.userVehicleNumber] ,[this.bodytype] ,[this.category] ,[this.active] ,[this.userWorkPreference] ,[this.willaccept] ].join(',');
csv += '\r\n';
}
// console.log("DriverData",data);
var blob = new Blob([csv], { type: "text/csv;charset=utf-8;" });
var link = document.createElement("a");
if (link.download !== undefined) {
var url = URL.createObjectURL(blob);
link.setAttribute("href", url);
link.setAttribute("download", fileName);
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
}
} | 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 : number;
page: number = 1;
public popoverTitle: string = 'Deleting Record...';
public popoverMessage: string = 'Are you sure to Delete ?';
public confirmClicked: boolean = false;
public cancelClicked: boolean = false;
driverusers: any;
active: any;
category: any;
bodytype: any;
willaccept: any;
constructor(private httpClient:HttpClient,public matDialog: MatDialog,private serv: EmployeeService, private http:HttpClient,) {
this.user = new Array<any>();
}
ngOnInit() {
let resp = this.httpClient.get("https://apis.zeigerapp.in/api/driverfour-owner");
resp.subscribe((data:any)=>{this.user=data})
this.loadEmployee();
}
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(resp.json()));
});
}
refresh() {
window.location.reload();
}
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 === phone) {
this.user.splice(i,1);
}
}
}
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_preference)
dialogConfig.disableClose = true;
dialogConfig.id = "modal-component";
dialogConfig.height = "1000px";
dialogConfig.width = "1100px";
dialogConfig.data = phone,vehicle_number,work_preference,cancelled_cheque_image;
// https://material.angular.io/components/dialog/overview
const modalDialog = this.matDialog.open(DialogDataExampleDialogComponent, dialogConfig);
}
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.http.get("https://apis.zeigerapp.in/api/driverfour-owner")
.subscribe((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.usernumber=this.user[i].vendor_uuid;
this.userVehicleNumber=this.user[i].vehicle_number;
this.userWorkPreference=this.user[i].work_preference;
// console.log("Finalnumber",this.usernumber);
csv += [[this.usernumber] ,[this.userphone] ,[this.userVehicleNumber] ,[this.bodytype] ,[this.category] ,[this.active] ,[this.userWorkPreference] ,[this.willaccept] ].join(',');
csv += '\r\n';
}
// console.log("DriverData",data);
var blob = new Blob([csv], { type: "text/csv;charset=utf-8;" });
var link = document.createElement("a");
if (link.download !== undefined) {
var url = URL.createObjectURL(blob);
link.setAttribute("href", url);
link.setAttribute("download", fileName);
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
}
})
}
} | 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(resp.json()));
});
} | 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 === phone) {
this.user.splice(i,1);
}
}
} | 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_preference)
dialogConfig.disableClose = true;
dialogConfig.id = "modal-component";
dialogConfig.height = "1000px";
dialogConfig.width = "1100px";
dialogConfig.data = phone,vehicle_number,work_preference,cancelled_cheque_image;
// https://material.angular.io/components/dialog/overview
const modalDialog = this.matDialog.open(DialogDataExampleDialogComponent, dialogConfig);
} | 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.http.get("https://apis.zeigerapp.in/api/driverfour-owner")
.subscribe((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.usernumber=this.user[i].vendor_uuid;
this.userVehicleNumber=this.user[i].vehicle_number;
this.userWorkPreference=this.user[i].work_preference;
// console.log("Finalnumber",this.usernumber);
csv += [[this.usernumber] ,[this.userphone] ,[this.userVehicleNumber] ,[this.bodytype] ,[this.category] ,[this.active] ,[this.userWorkPreference] ,[this.willaccept] ].join(',');
csv += '\r\n';
}
// console.log("DriverData",data);
var blob = new Blob([csv], { type: "text/csv;charset=utf-8;" });
var link = document.createElement("a");
if (link.download !== undefined) {
var url = URL.createObjectURL(blob);
link.setAttribute("href", url);
link.setAttribute("download", fileName);
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
}
})
} | 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.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, business name, address and phone number/account number)</td></tr></tbody></table><h4>API Group</h4><p>Medium</p>
*/
list(): Promise<IIvrPrompts> {
return this.getRest().call(this.getEndpoint(false), undefined, {
body: undefined,
method: 'get'
}).then<any>((res) => {
return res.json();
});
}
/**
* <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 name, address and phone number/account number)</td></tr></tbody></table><h4>API Group</h4><p>Medium</p>
*/
get(): Promise<PromptInfo> {
return this.getRest().call(this.getEndpoint(true), undefined, {
body: undefined,
method: 'get'
}).then<any>((res) => {
return res.json();
});
}
/**
* <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 name, address and phone number/account number)</td></tr></tbody></table><h4>API Group</h4><p>Heavy</p>
*/
delete(): Promise<void> {
return this.getRest().call(this.getEndpoint(true), undefined, {
body: undefined,
method: 'delete'
}).then(res => {});
}
} | 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, business name, address and phone number/account number)</td></tr></tbody></table><h4>API Group</h4><p>Medium</p>
*/
list(): Promise<IIvrPrompts> {
return this.getRest().call(this.getEndpoint(false), undefined, {
body: undefined,
method: 'get'
}).then<any>((res) => {
return res.json();
});
} | 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 name, address and phone number/account number)</td></tr></tbody></table><h4>API Group</h4><p>Medium</p>
*/
get(): Promise<PromptInfo> {
return this.getRest().call(this.getEndpoint(true), undefined, {
body: undefined,
method: 'get'
}).then<any>((res) => {
return res.json();
});
} | 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 name, address and phone number/account number)</td></tr></tbody></table><h4>API Group</h4><p>Heavy</p>
*/
delete(): Promise<void> {
return this.getRest().call(this.getEndpoint(true), undefined, {
body: undefined,
method: 'delete'
}).then(res => {});
} | 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; us?: string } = {}
doc
.querySelectorAll<HTMLSpanElement>('.speaker.exafile')
.forEach($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')
}
}
})
if (options.wordfams) {
result.wordfams = getInnerHTML(HOST, doc, '.wordfams')
}
const $dictentries = doc.querySelectorAll('.dictentry')
let currentDict: 'contemporary' | 'bussiness' | '' = ''
for (let i = 0; i < $dictentries.length; i++) {
const $entry = $dictentries[i]
const $intro = $entry.querySelector('.dictionary_intro')
if ($intro) {
const dict = $intro.textContent || ''
if (dict.includes('Contemporary')) {
currentDict = 'contemporary'
} else if (dict.includes('Business')) {
currentDict = 'bussiness'
} else {
currentDict = ''
}
}
if (!currentDict) {
continue
}
const entry: LongmanResultEntry = {
title: {
HWD: '',
HYPHENATION: '',
HOMNUM: ''
},
prons: [],
senses: []
}
const $topic = $entry.querySelector<HTMLAnchorElement>('a.topic')
if ($topic) {
entry.topic = {
title: $topic.textContent || '',
href: getFullLink(HOST, $topic, 'href')
}
}
const $head = $entry.querySelector('.Head')
if (!$head) {
continue
}
entry.title.HWD = getText($head, '.HWD')
entry.title.HYPHENATION = getText($head, '.HYPHENATION')
entry.title.HOMNUM = getText($head, '.HOMNUM')
entry.phsym = getText($head, '.PronCodes')
const $level = $head.querySelector('.LEVEL') as HTMLSpanElement
if ($level) {
const level = {
rate: 0,
title: ''
}
level.rate = (($level.textContent || '').match(/●/g) || []).length
level.title = $level.title
entry.level = level
}
entry.freq = Array.from(
$head.querySelectorAll<HTMLSpanElement>('.FREQ')
).map($el => ({
title: $el.title,
rank: $el.textContent || ''
}))
entry.pos = getText($head, '.POS')
$head.querySelectorAll<HTMLSpanElement>('.speaker').forEach($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 })
})
entry.senses = Array.from($entry.querySelectorAll('.Sense')).map($sen =>
getInnerHTML(HOST, $sen)
)
if (options.collocations) {
entry.collocations = getInnerHTML(HOST, $entry, '.ColloBox')
}
if (options.grammar) {
entry.grammar = getInnerHTML(HOST, $entry, '.GramBox')
}
if (options.thesaurus) {
entry.thesaurus = getInnerHTML(HOST, $entry, '.ThesBox')
}
if (options.examples) {
entry.examples = Array.from($entry.querySelectorAll('.exaGroup')).map(
$exa => getInnerHTML(HOST, $exa)
)
}
result[currentDict].push(entry)
}
if (result.contemporary.length <= 0 && result.bussiness.length <= 0) {
return handleNoResult()
}
return { result, audio }
} | 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 handleNoResult()
} | 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?: Array<{
title: string
rank: string
}>
pos?: string
collocations?: HTMLString
grammar?: HTMLString
thesaurus?: HTMLString
examples?: HTMLString[]
} | 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: CSSProperties = {
backgroundColor: '#FF6F61',
borderRadius: '10px',
width: 295,
height: 48,
fontSize: '14px',
lineHeight: '18px',
fontFamily: 'Boon-600',
};
const txtTotal: CSSProperties = {
fontFamily: 'Boon-500',
fontSize: '20px',
lineHeight: '26px',
color: '#484848',
marginBottom: '24px',
marginRight: '10px',
};
const cart = useSelector((state: RootState) => state.rootReducer.cart);
let sumItem = [];
let totalItem = [];
cart.forEach((e, index) => {
let aPrice = +e.price * e.quantity;
sumItem.push(aPrice);
totalItem.push(e.quantity);
});
// console.log('sumItem', sumItem);
let sumPrice: number = sumItem.reduce((a, b) => a + b, 0);
let sumQuantity: number = totalItem.reduce((a, b) => a + b, 0);
// console.log('sumPrice', sumPrice, 'sumItem', sumItem)
const { data, error } = useSWR(
`https://cc-mock-api.herokuapp.com/product`,
fetcher
);
if (error) return <div>failed to load</div>;
if (!data)
return (
<div style={{ padding: '50px 0 100px', color: '#484848' }} | 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 (isMod) {
console.log(`Mod: ${className}`);
}
return isMod;
} | 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 = {
id: Math.random(),
title: newTaskTitle,
isCOmplete: false
}
setTasks([...tasks, newTask]);
setNewTaskTitle('');
}
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)
}
function handleRemoveTask(id: number) {
// Remova uma task da listagem pelo ID
const taskFilter = tasks.filter(task => task.id !== id);
setTasks(taskFilter)
}
return (
<section className="task-list container">
<header>
<h2>Minhas tasks</h2>
<div className="input-group">
<input
type="text"
placeholder="Adicionar novo todo"
onChange={(e) => setNewTaskTitle(e.target.value)} | 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.Requireable<string>;
useFixedHeader: PropTypes.Requireable<boolean>;
rowSelection: PropTypes.Requireable<object>;
className: PropTypes.Requireable<string>;
size: PropTypes.Requireable<"small" | "default" | "middle">;
loading: PropTypes.Requireable<boolean | object>;
bordered: PropTypes.Requireable<boolean>;
onChange: PropTypes.Requireable<(...args: any[]) => any>;
locale: PropTypes.Requireable<object>;
dropdownPrefixCls: PropTypes.Requireable<string>;
sortDirections: PropTypes.Requireable<any[]>;
getPopupContainer: PropTypes.Requireable<(...args: any[]) => any>;
};
static defaultProps: {
dataSource: never[];
useFixedHeader: boolean;
className: string;
size: "small" | "default" | "middle";
loading: boolean;
bordered: boolean;
indentSize: number;
locale: {};
rowKey: string;
showHeader: boolean;
sortDirections: string[];
childrenColumnName: string;
};
CheckboxPropsCache: {
[key: string]: any;
};
store: Store;
columns: ColumnProps<T>[];
components: TableComponents;
row: React.ComponentType<any>;
constructor(props: TableProps<T>);
componentWillReceiveProps(nextProps: TableProps<T>): void;
getCheckboxPropsByItem: (item: T, index: number) => any;
getDefaultSelection(): any[];
getDefaultPagination(props: TableProps<T>): {};
getSortOrderColumns(columns?: ColumnProps<T>[]): any;
getFilteredValueColumns(columns?: ColumnProps<T>[]): any;
getFiltersFromColumns(columns?: ColumnProps<T>[]): any;
getDefaultSortOrder(columns?: ColumnProps<T>[]): {
sortColumn: any;
sortOrder: any;
};
getSortStateFromColumns(columns?: ColumnProps<T>[]): {
sortColumn: any;
sortOrder: any;
};
getMaxCurrent(total: number): number | undefined;
getRecordKey: (record: T, index: number) => any;
getSorterFn(state: TableState<T>): ((a: T, b: T) => number) | undefined;
getCurrentPageData(): T[];
getFlatData(): any[];
getFlatCurrentPageData(): any[];
getLocalData(state?: TableState<T> | null, filter?: boolean): Array<T>;
onRow: (prefixCls: string, record: T, index: number) => {
prefixCls: string;
store: Store;
rowKey: any;
onClick?: ((arg: React.MouseEvent<Element, MouseEvent>) => void) | undefined;
onDoubleClick?: ((arg: React.MouseEvent<Element, MouseEvent>) => void) | undefined;
onContextMenu?: ((arg: React.MouseEvent<Element, MouseEvent>) => void) | undefined;
onMouseEnter?: ((arg: React.MouseEvent<Element, MouseEvent>) => void) | undefined;
onMouseLeave?: ((arg: React.MouseEvent<Element, MouseEvent>) => void) | undefined;
};
setSelectedRowKeys(selectedRowKeys: string[], selectionInfo: SelectionInfo<T>): void;
generatePopupContainerFunc: (getPopupContainer: ((triggerNode: HTMLElement) => HTMLElement) | undefined) => ((triggerNode: HTMLElement) => HTMLElement) | undefined;
handleFilter: (column: ColumnProps<T>, nextFilters: string[]) => void;
handleSelect: (record: T, rowIndex: number, e: CheckboxChangeEvent) => void;
handleRadioSelect: (record: T, rowIndex: number, e: RadioChangeEvent) => void;
handleSelectRow: (selectionKey: string, index: number, onSelectFunc: SelectionItemSelectFn) => void;
handlePageChange: (current: number, ...otherArguments: any[]) => void;
handleShowSizeChange: (current: number, pageSize: number) => void;
toggleSortOrder(column: ColumnProps<T>): void;
hasPagination(props?: any): boolean;
isFiltersChanged(filters: TableStateFilters): boolean;
isSortColumn(column: ColumnProps<T>): boolean;
prepareParamsArguments(state: any): PrepareParamsArgumentsReturn<T>;
findColumn(myKey: string | number): undefined;
createComponents(components?: TableComponents, prevComponents?: TableComponents): void;
recursiveSort(data: T[], sorterFn: (a: any, b: any) => number): T[];
renderExpandIcon: (prefixCls: string) => ({ expandable, expanded, needIndentSpaced, record, onExpand, }: ExpandIconProps<T>) => JSX.Element | null;
renderPagination(prefixCls: string, paginationPosition: string): JSX.Element | null;
renderSelectionBox: (type: "checkbox" | "radio" | undefined) => (_: any, record: T, index: number) => JSX.Element;
renderRowSelection({ prefixCls, locale, getPopupContainer, }: {
prefixCls: string;
locale: TableLocale;
getPopupContainer: TableProps<T>['getPopupContainer'];
}): ColumnProps<T>[];
renderColumnsDropdown({ prefixCls, dropdownPrefixCls, columns, locale, getPopupContainer, }: {
prefixCls: string;
dropdownPrefixCls: string;
columns: ColumnProps<T>[];
locale: TableLocale;
getPopupContainer: TableProps<T>['getPopupContainer'];
}): any[];
renderColumnTitle(title: ColumnProps<T>['title']): React.ReactNode;
renderTable: ({ prefixCls, renderEmpty, dropdownPrefixCls, contextLocale, getPopupContainer: contextGetPopupContainer, }: {
prefixCls: string;
renderEmpty: (componentName?: string | undefined) => React.ReactNode;
dropdownPrefixCls: string;
contextLocale: TableLocale;
getPopupContainer: ((triggerNode: HTMLElement) => HTMLElement) | undefined;
}) => JSX.Element;
renderComponent: ({ getPrefixCls, renderEmpty, getPopupContainer }: ConfigConsumerProps) => JSX.Element;
render(): JSX.Element;
} | 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.