type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
FunctionDeclaration |
export function keys(v: object): string[] {
if (Object.keys) {
return Object.keys(v);
}
return _keys(v);
} | cloudflare/authr | ts/src/util.ts | TypeScript |
FunctionDeclaration |
export function values(v: object): any[] {
if (Object.values) {
return Object.values(v);
}
return _values(v);
} | cloudflare/authr | ts/src/util.ts | TypeScript |
FunctionDeclaration |
export function isPlainObject(v?: any): v is object {
return _isPlainObject(v);
} | cloudflare/authr | ts/src/util.ts | TypeScript |
FunctionDeclaration |
export function isString(v?: any): v is string {
return _isString(v);
} | cloudflare/authr | ts/src/util.ts | TypeScript |
FunctionDeclaration |
export function isObject(v?: any): v is object {
return _isObject(v);
} | cloudflare/authr | ts/src/util.ts | TypeScript |
FunctionDeclaration |
export function isArray(v?: any): v is any[] {
return _isArray(v);
} | cloudflare/authr | ts/src/util.ts | TypeScript |
FunctionDeclaration |
export function empty(v?: any): boolean {
if (v === null) {
return true;
}
if (v === undefined) {
return true;
}
if (isArray(v) || isString(v)) {
return !v.length;
}
if (isPlainObject(v)) {
return !keys(v).length;
}
return !v;
} | cloudflare/authr | ts/src/util.ts | TypeScript |
FunctionDeclaration |
export function runtimeAssertIsSubject(v?: ISubject): void {
if (!isSubject(v)) {
throw new AuthrError(
'"subject" argument does not implement mandatory subject methods'
);
}
} | cloudflare/authr | ts/src/util.ts | TypeScript |
FunctionDeclaration |
export function runtimeAssertIsResource(v?: IResource): void {
if (!isResource(v)) {
throw new AuthrError(
'"resource" argument does not implement mandatory resource methods'
);
}
} | cloudflare/authr | ts/src/util.ts | TypeScript |
InterfaceDeclaration |
export interface IEvaluator {
evaluate(resource: IResource): boolean;
} | cloudflare/authr | ts/src/util.ts | TypeScript |
InterfaceDeclaration |
export interface IJSONSerializable {
toJSON(): any;
} | cloudflare/authr | ts/src/util.ts | TypeScript |
FunctionDeclaration |
function createSnippetTests(snippetsFile: string): void {
suite(snippetsFile, () => {
const snippetsPath = path.join(testFolder, '..', 'assets', snippetsFile);
const snippets = <{ [name: string]: ISnippet }>fse.readJsonSync(snippetsPath);
// tslint:disable-next-line:no-for-i... | alexandair/vscode-azurearmtools | test/functional/snippets.test.ts | TypeScript |
FunctionDeclaration |
async function testSnippet(testCallbackContext: ITestCallbackContext, snippetsPath: string, snippetName: string, snippet: ISnippet): Promise<void> {
if (overrideSkipTests[snippetName]) {
testCallbackContext.skip();
return;
}
validateSnippet();
const template = ... | alexandair/vscode-azurearmtools | test/functional/snippets.test.ts | TypeScript |
FunctionDeclaration | // Look for common errors in the snippet
function validateSnippet(): void {
const snippetText = JSON.stringify(snippet, null, 4);
errorIfTextMatches(snippetText, /\$\$/, `Instead of $$ in snippet, use \\$`);
errorIfTextMatches(snippetText, /\${[^0-9]/, "Snippet placeholder is missin... | alexandair/vscode-azurearmtools | test/functional/snippets.test.ts | TypeScript |
FunctionDeclaration |
function validateDocumentWithSnippet(): void {
assert(initialDocText !== docTextAfterInsertion, "No insertion happened? Document didn't change.");
} | alexandair/vscode-azurearmtools | test/functional/snippets.test.ts | TypeScript |
FunctionDeclaration |
function errorIfTextMatches(text: string, regex: RegExp, errorMessage: string): void {
const match = text.match(regex);
if (match) {
assert(false, `${errorMessage}. At "${text.slice(match.index!, match.index! + 20)}..."`);
}
} | alexandair/vscode-azurearmtools | test/functional/snippets.test.ts | TypeScript |
ArrowFunction |
() => {
suite("all snippets", () => {
createSnippetTests("armsnippets.jsonc");
});
function createSnippetTests(snippetsFile: string): void {
suite(snippetsFile, () => {
const snippetsPath = path.join(testFolder, '..', 'assets', snippetsFile);
const snippets = <{ [na... | alexandair/vscode-azurearmtools | test/functional/snippets.test.ts | TypeScript |
ArrowFunction |
() => {
createSnippetTests("armsnippets.jsonc");
} | alexandair/vscode-azurearmtools | test/functional/snippets.test.ts | TypeScript |
ArrowFunction |
() => {
const snippetsPath = path.join(testFolder, '..', 'assets', snippetsFile);
const snippets = <{ [name: string]: ISnippet }>fse.readJsonSync(snippetsPath);
// tslint:disable-next-line:no-for-in forin
for (let snippetName in snippets) {
testWithLangua... | alexandair/vscode-azurearmtools | test/functional/snippets.test.ts | TypeScript |
ArrowFunction |
d => d.message | alexandair/vscode-azurearmtools | test/functional/snippets.test.ts | TypeScript |
InterfaceDeclaration |
interface ISnippet {
prefix: string;
body: string[];
description?: string;
} | alexandair/vscode-azurearmtools | test/functional/snippets.test.ts | TypeScript |
ArrowFunction |
() => {
const [waifus, setWaifus] = useState<Waifu[]>([]);
const history = useHistory();
const [t] = useTranslation();
const getDungeonPreview = async () => {
const globals = await getGlobals();
const _waifus: Waifu[] = [];
const contractHelper = new ContractHelper();
await contractHelper.ini... | andriishupta/waifusion-site | src/components/Preview.tsx | TypeScript |
ArrowFunction |
async () => {
const globals = await getGlobals();
const _waifus: Waifu[] = [];
const contractHelper = new ContractHelper();
await contractHelper.init();
const count = await contractHelper.waifuBalanceOfAddress(
globals.dungeonAddress
);
const promises = Array.from(Array(WAIU_COUNT)... | andriishupta/waifusion-site | src/components/Preview.tsx | TypeScript |
ArrowFunction |
async () => {
const index = Math.floor(Math.random() * count);
const id = await contractHelper.tokenOfAddressByIndex(
index,
globals.dungeonAddress
);
_waifus.push({ id });
} | andriishupta/waifusion-site | src/components/Preview.tsx | TypeScript |
ArrowFunction |
() => {
getDungeonPreview();
} | andriishupta/waifusion-site | src/components/Preview.tsx | TypeScript |
ArrowFunction |
(waifu: Waifu) => (
<WaifuCard key={waifu.id} | andriishupta/waifusion-site | src/components/Preview.tsx | TypeScript |
MethodDeclaration |
t("headers.available") | andriishupta/waifusion-site | src/components/Preview.tsx | TypeScript |
MethodDeclaration |
t("buttons.free") | andriishupta/waifusion-site | src/components/Preview.tsx | TypeScript |
ClassDeclaration |
export class IRecipientRegistry__factory {
static readonly abi = _abi;
static createInterface(): IRecipientRegistryInterface {
return new utils.Interface(_abi) as IRecipientRegistryInterface;
}
static connect(
address: string,
signerOrProvider: Signer | Provider
): IRecipientRegistry {
return... | chnejohnson/clrfund-contracts | typechain/factories/IRecipientRegistry__factory.ts | TypeScript |
MethodDeclaration |
static createInterface(): IRecipientRegistryInterface {
return new utils.Interface(_abi) as IRecipientRegistryInterface;
} | chnejohnson/clrfund-contracts | typechain/factories/IRecipientRegistry__factory.ts | TypeScript |
MethodDeclaration |
static connect(
address: string,
signerOrProvider: Signer | Provider
): IRecipientRegistry {
return new Contract(address, _abi, signerOrProvider) as IRecipientRegistry;
} | chnejohnson/clrfund-contracts | typechain/factories/IRecipientRegistry__factory.ts | TypeScript |
FunctionDeclaration |
export function createDetailsPage(scan: model.Scan, callback?: () => void) {
return { createView };
function createView() {
const page = new Page();
const layout = new StackLayout();
page.content = layout;
const label = new Label();
label.text = scan.content;
label.className = "details-content";
layou... | BennetAni/TypeScript-Modern-JavaScript-Development | Module 3/Chapter 5/src/view/details.ts | TypeScript |
FunctionDeclaration |
function createView() {
const page = new Page();
const layout = new StackLayout();
page.content = layout;
const label = new Label();
label.text = scan.content;
label.className = "details-content";
layout.addChild(label);
const date = new Label();
date.text = scan.date.toLocaleString('en');
layout... | BennetAni/TypeScript-Modern-JavaScript-Development | Module 3/Chapter 5/src/view/details.ts | TypeScript |
ClassDeclaration |
@Module({
imports: [ConfigModule.forRoot(),
TypeOrmModule.forRoot(), VehiclesModule]
})
export class AppModule { } | MaxFullStack/canoa-digital-backend | src/app.module.ts | TypeScript |
ArrowFunction |
() => {
it('renders without crashing', () => {
const { container } = render(
<User.Provider value={userMockConnected}>
<Router>
<Routes />
</Router>
</User.Provider>
)
expect(container.firstChild).toBeInTheDocument(... | ArvindVivek/The-Auger-Network | client/src/Routes.test.tsx | TypeScript |
ArrowFunction |
() => {
const { container } = render(
<User.Provider value={userMockConnected}>
<Router>
<Routes />
</Router>
</User.Provider>
)
expect(container.firstChild).toBeInTheDocument()
} | ArvindVivek/The-Auger-Network | client/src/Routes.test.tsx | TypeScript |
ArrowFunction |
() => {
let component: AccinfBalanceGetComponent;
let fixture: ComponentFixture<AccinfBalanceGetComponent>;
@Component({
selector: 'app-play-wth-data',
template: '',
})
class MockPlayWithDataComponent {
@Input() headers: object;
@Input() accountIdFlag: boolean;
@Input() variablePathEnd: ... | kloose/XS2A-Sandbox | developer-portal-ui/src/app/components/test-cases/components/api-endpoints/accinf-balance-get/accinf-balance-get.component.spec.ts | TypeScript |
ArrowFunction |
() => {
TestBed.configureTestingModule({
declarations: [AccinfBalanceGetComponent, LineCommandComponent, TranslatePipe, MockPlayWithDataComponent],
}).compileComponents();
} | kloose/XS2A-Sandbox | developer-portal-ui/src/app/components/test-cases/components/api-endpoints/accinf-balance-get/accinf-balance-get.component.spec.ts | TypeScript |
ArrowFunction |
() => {
fixture = TestBed.createComponent(AccinfBalanceGetComponent);
component = fixture.componentInstance;
fixture.detectChanges();
} | kloose/XS2A-Sandbox | developer-portal-ui/src/app/components/test-cases/components/api-endpoints/accinf-balance-get/accinf-balance-get.component.spec.ts | TypeScript |
ArrowFunction |
() => {
const headers: object = {
'X-Request-ID': '2f77a125-aa7a-45c0-b414-cea25a116035',
'Consent-ID': 'CONSENT_ID',
'PSU-IP-Address': '1.1.1.1',
};
expect(typeof component.headers).toBe('object');
for (const key in component.headers) {
if (component.headers.hasOwnProperty(key)... | kloose/XS2A-Sandbox | developer-portal-ui/src/app/components/test-cases/components/api-endpoints/accinf-balance-get/accinf-balance-get.component.spec.ts | TypeScript |
ArrowFunction |
() => {
expect(component.activeSegment).toBe('documentation');
component.changeSegment('play-data');
expect(component.activeSegment).toBe('play-data');
component.changeSegment('documentation');
expect(component.activeSegment).toBe('documentation');
component.changeSegment('wrong-segment');
... | kloose/XS2A-Sandbox | developer-portal-ui/src/app/components/test-cases/components/api-endpoints/accinf-balance-get/accinf-balance-get.component.spec.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'app-play-wth-data',
template: '',
})
class MockPlayWithDataComponent {
@Input() headers: object;
@Input() accountIdFlag: boolean;
@Input() variablePathEnd: string;
} | kloose/XS2A-Sandbox | developer-portal-ui/src/app/components/test-cases/components/api-endpoints/accinf-balance-get/accinf-balance-get.component.spec.ts | TypeScript |
ClassDeclaration |
@Pipe({ name: 'translate' })
class TranslatePipe implements PipeTransform {
transform(value) {
const tmp = value.split('.');
return tmp[1];
}
} | kloose/XS2A-Sandbox | developer-portal-ui/src/app/components/test-cases/components/api-endpoints/accinf-balance-get/accinf-balance-get.component.spec.ts | TypeScript |
MethodDeclaration |
transform(value) {
const tmp = value.split('.');
return tmp[1];
} | kloose/XS2A-Sandbox | developer-portal-ui/src/app/components/test-cases/components/api-endpoints/accinf-balance-get/accinf-balance-get.component.spec.ts | TypeScript |
MethodDeclaration | /**
* Gets configuration of perun apps brandings and apps\' domains
* Returns object of type PerunAppsConfig
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response prog... | Kuliak/perun-web-apps | libs/perun/openapi/src/lib/api/utils.service.ts | TypeScript |
MethodDeclaration |
public getAppsConfig(
observe?: 'response',
reportProgress?: boolean
): Observable<HttpResponse<PerunAppsConfig>>; | Kuliak/perun-web-apps | libs/perun/openapi/src/lib/api/utils.service.ts | TypeScript |
MethodDeclaration |
public getAppsConfig(
observe?: 'events',
reportProgress?: boolean
): Observable<HttpEvent<PerunAppsConfig>>; | Kuliak/perun-web-apps | libs/perun/openapi/src/lib/api/utils.service.ts | TypeScript |
MethodDeclaration |
public getAppsConfig(observe: any = 'body', reportProgress: boolean = false): Observable<any> {
let headers = this.defaultHeaders;
// authentication (ApiKeyAuth) required
if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) {
headers = headers.set('Authorization', this.conf... | Kuliak/perun-web-apps | libs/perun/openapi/src/lib/api/utils.service.ts | TypeScript |
MethodDeclaration | /**
* Gets perun-web-gui.properties as Map<String,String>
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public getGuiConfiguration(
observe?... | Kuliak/perun-web-apps | libs/perun/openapi/src/lib/api/utils.service.ts | TypeScript |
MethodDeclaration |
public getGuiConfiguration(
observe?: 'response',
reportProgress?: boolean
): Observable<HttpResponse<{ [key: string]: string }>>; | Kuliak/perun-web-apps | libs/perun/openapi/src/lib/api/utils.service.ts | TypeScript |
MethodDeclaration |
public getGuiConfiguration(
observe?: 'events',
reportProgress?: boolean
): Observable<HttpEvent<{ [key: string]: string }>>; | Kuliak/perun-web-apps | libs/perun/openapi/src/lib/api/utils.service.ts | TypeScript |
MethodDeclaration |
public getGuiConfiguration(
observe: any = 'body',
reportProgress: boolean = false
): Observable<any> {
let headers = this.defaultHeaders;
// authentication (ApiKeyAuth) required
if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) {
headers = headers.set('Authori... | Kuliak/perun-web-apps | libs/perun/openapi/src/lib/api/utils.service.ts | TypeScript |
MethodDeclaration | /**
* Gets Perun runtime status
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public getPerunRPCVersion(observe?: 'body', reportProgress?: boolean): O... | Kuliak/perun-web-apps | libs/perun/openapi/src/lib/api/utils.service.ts | TypeScript |
MethodDeclaration |
public getPerunRPCVersion(
observe?: 'response',
reportProgress?: boolean
): Observable<HttpResponse<string>>; | Kuliak/perun-web-apps | libs/perun/openapi/src/lib/api/utils.service.ts | TypeScript |
MethodDeclaration |
public getPerunRPCVersion(
observe?: 'events',
reportProgress?: boolean
): Observable<HttpEvent<string>>; | Kuliak/perun-web-apps | libs/perun/openapi/src/lib/api/utils.service.ts | TypeScript |
MethodDeclaration |
public getPerunRPCVersion(
observe: any = 'body',
reportProgress: boolean = false
): Observable<any> {
let headers = this.defaultHeaders;
// authentication (ApiKeyAuth) required
if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) {
headers = headers.set('Authoriz... | Kuliak/perun-web-apps | libs/perun/openapi/src/lib/api/utils.service.ts | TypeScript |
MethodDeclaration | /**
* Gets Perun runtime statistics
* Returns list of strings which looks like this \"Timestamp: \'2019-11-14 10:46:39.613\'\", \"USERS: \'39927\'\", \"FACILITIES: \'552\'\", \"DESTINATIONS: \'2568\'\", \"VOS: \'341\'\", \&q... | Kuliak/perun-web-apps | libs/perun/openapi/src/lib/api/utils.service.ts | TypeScript |
MethodDeclaration |
public getPerunStatistics(
observe?: 'response',
reportProgress?: boolean
): Observable<HttpResponse<Array<string>>>; | Kuliak/perun-web-apps | libs/perun/openapi/src/lib/api/utils.service.ts | TypeScript |
MethodDeclaration |
public getPerunStatistics(
observe?: 'events',
reportProgress?: boolean
): Observable<HttpEvent<Array<string>>>; | Kuliak/perun-web-apps | libs/perun/openapi/src/lib/api/utils.service.ts | TypeScript |
MethodDeclaration |
public getPerunStatistics(
observe: any = 'body',
reportProgress: boolean = false
): Observable<any> {
let headers = this.defaultHeaders;
// authentication (ApiKeyAuth) required
if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) {
headers = headers.set('Authoriz... | Kuliak/perun-web-apps | libs/perun/openapi/src/lib/api/utils.service.ts | TypeScript |
MethodDeclaration | /**
* Gets Perun runtime status
* Returns list of strings which looks like this \"Version of Perun: 3.8.6\", \"Version of PerunDB: 3.1.55\", \"Version of Servlet: Apache Tomcat/9.0.16 (Debian)\", \"Version of DB-driver: PostgreSQL JDBC Driver-42.2.8\", \"Version of DB:... | Kuliak/perun-web-apps | libs/perun/openapi/src/lib/api/utils.service.ts | TypeScript |
MethodDeclaration |
public getPerunStatus(
observe?: 'response',
reportProgress?: boolean
): Observable<HttpResponse<Array<string>>>; | Kuliak/perun-web-apps | libs/perun/openapi/src/lib/api/utils.service.ts | TypeScript |
MethodDeclaration |
public getPerunStatus(
observe?: 'events',
reportProgress?: boolean
): Observable<HttpEvent<Array<string>>>; | Kuliak/perun-web-apps | libs/perun/openapi/src/lib/api/utils.service.ts | TypeScript |
MethodDeclaration |
public getPerunStatus(observe: any = 'body', reportProgress: boolean = false): Observable<any> {
let headers = this.defaultHeaders;
// authentication (ApiKeyAuth) required
if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) {
headers = headers.set('Authorization', this.con... | Kuliak/perun-web-apps | libs/perun/openapi/src/lib/api/utils.service.ts | TypeScript |
MethodDeclaration | /**
* Gets Perun system time in milliseconds since the epoch
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public getPerunSystemTimeInMillis(observe?:... | Kuliak/perun-web-apps | libs/perun/openapi/src/lib/api/utils.service.ts | TypeScript |
MethodDeclaration |
public getPerunSystemTimeInMillis(
observe?: 'response',
reportProgress?: boolean
): Observable<HttpResponse<number>>; | Kuliak/perun-web-apps | libs/perun/openapi/src/lib/api/utils.service.ts | TypeScript |
MethodDeclaration |
public getPerunSystemTimeInMillis(
observe?: 'events',
reportProgress?: boolean
): Observable<HttpEvent<number>>; | Kuliak/perun-web-apps | libs/perun/openapi/src/lib/api/utils.service.ts | TypeScript |
MethodDeclaration |
public getPerunSystemTimeInMillis(
observe: any = 'body',
reportProgress: boolean = false
): Observable<any> {
let headers = this.defaultHeaders;
// authentication (ApiKeyAuth) required
if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) {
headers = headers.set('... | Kuliak/perun-web-apps | libs/perun/openapi/src/lib/api/utils.service.ts | TypeScript |
ClassDeclaration | /** @public */
export abstract class IModelTileRpcInterface extends RpcInterface {
public static getClient(): IModelTileRpcInterface { return RpcManager.getClientForInterface(IModelTileRpcInterface); }
/** The immutable name of the interface. */
public static readonly interfaceName = "IModelTileRpcInterface";
... | rssahai/imodeljs | core/common/src/rpc/IModelTileRpcInterface.ts | TypeScript |
MethodDeclaration |
public static getClient(): IModelTileRpcInterface { return RpcManager.getClientForInterface(IModelTileRpcInterface); } | rssahai/imodeljs | core/common/src/rpc/IModelTileRpcInterface.ts | TypeScript |
MethodDeclaration | /*===========================================================================================
NOTE: Any add/remove/change to the methods below requires an update of the interface version.
NOTE: Please consult the README in this folder for the semantic versioning rules.
========================================... | rssahai/imodeljs | core/common/src/rpc/IModelTileRpcInterface.ts | TypeScript |
MethodDeclaration | /** @internal */
public async requestTileTreeProps(_tokenProps: IModelRpcProps, _id: string): Promise<TileTreeProps> { return this.forward(arguments); } | rssahai/imodeljs | core/common/src/rpc/IModelTileRpcInterface.ts | TypeScript |
MethodDeclaration | /** @internal */
public async requestTileContent(iModelToken: IModelRpcProps, treeId: string, contentId: string, isCanceled?: () => boolean, guid?: string): Promise<Uint8Array> {
const cached = await IModelTileRpcInterface.checkCache(iModelToken, treeId, contentId, guid);
if (undefined === cached && undefined !... | rssahai/imodeljs | core/common/src/rpc/IModelTileRpcInterface.ts | TypeScript |
MethodDeclaration | /** This is a temporary workaround for folks developing authoring applications, to be removed when proper support for such applications is introduced.
* Given a set of model Ids, it purges any associated tile tree state on the back-end so that the next request for the tile tree or content will recreate that state.
... | rssahai/imodeljs | core/common/src/rpc/IModelTileRpcInterface.ts | TypeScript |
MethodDeclaration |
private static async checkCache(tokenProps: IModelRpcProps, treeId: string, contentId: string, guid: string | undefined): Promise<Uint8Array | undefined> {
return CloudStorageTileCache.getCache().retrieve({ tokenProps, treeId, contentId, guid });
} | rssahai/imodeljs | core/common/src/rpc/IModelTileRpcInterface.ts | TypeScript |
ClassDeclaration |
@Injectable({
providedIn: "root"
})
export class MiembroService {
public miembroDocRef: DocumentReference;
public miembro: Miembro = {
id: '',
nombre: '',
correo: '',
passGenerada: '',
facultad: '',
institucion: '',
puesto: '',
rol: '',
sni: '',
};
privat... | Manolomon/arpa-desktop | src/app/servicios/miembro.service.ts | TypeScript |
MethodDeclaration |
obtenerMiembros() {
return this.db.collection("miembros").ref.orderBy("nombre").get();
} | Manolomon/arpa-desktop | src/app/servicios/miembro.service.ts | TypeScript |
MethodDeclaration |
obtenerMiembroId(idMiembro: string) {
return this.db.collection("miembros").doc(idMiembro).ref;
} | Manolomon/arpa-desktop | src/app/servicios/miembro.service.ts | TypeScript |
MethodDeclaration |
obtenerMiembro(correo: string) {
return this.db.collection("miembros").ref.where("correo", "==", correo).limit(1).get();
} | Manolomon/arpa-desktop | src/app/servicios/miembro.service.ts | TypeScript |
MethodDeclaration |
registrarMiembro(nombre: string, correo: string, rol: string) {
var dbTemp = this.db;
var config = {
apiKey: "AIzaSyB8U1sGZ0nv84GoFy68BUYg9qxIjOc7dwM",
authDomain: "arpa-desktop.firebaseapp.com",
databaseURL: "https://arpa-desktop.firebaseio.com"
};
var segundaConexion = fireba... | Manolomon/arpa-desktop | src/app/servicios/miembro.service.ts | TypeScript |
MethodDeclaration |
degradarMiembro(idMiembro: string) {
var docRef = this.db.collection("miembros").doc(idMiembro).ref;
docRef.get().then(function (doc) {
docRef.update({
rol: "Colaborador"
});
});
} | Manolomon/arpa-desktop | src/app/servicios/miembro.service.ts | TypeScript |
MethodDeclaration |
ascenderColaborador(idMiembro: string) {
var docRef = this.db.doc("miembros/" + idMiembro).ref.get();
docRef.then(function (doc) {
doc.ref.update({
rol: "Miembro"
});
});
return docRef;
} | Manolomon/arpa-desktop | src/app/servicios/miembro.service.ts | TypeScript |
MethodDeclaration |
setMiembroActivo(idMiembro: string) {
this.miembroDocRef = this.db.collection("miembros").doc(idMiembro).ref;
} | Manolomon/arpa-desktop | src/app/servicios/miembro.service.ts | TypeScript |
MethodDeclaration |
getMiembroActivo() {
return this.miembroDocRef;
} | Manolomon/arpa-desktop | src/app/servicios/miembro.service.ts | TypeScript |
MethodDeclaration |
obtenerEstudios(idMiembro) {
return this.db.collection("miembros").doc(idMiembro).collection("estudios").ref.orderBy("titulo").get();
} | Manolomon/arpa-desktop | src/app/servicios/miembro.service.ts | TypeScript |
MethodDeclaration |
agregarEstudio(idMiembro, estudio) {
return this.db.collection("miembros").doc(idMiembro).collection("estudios").add(estudio);
} | Manolomon/arpa-desktop | src/app/servicios/miembro.service.ts | TypeScript |
MethodDeclaration |
modificarEstudio(idMiembro, estudio) {
return this.db.collection("miembros").doc(idMiembro).collection("estudios").doc(estudio.id).set(estudio)
} | Manolomon/arpa-desktop | src/app/servicios/miembro.service.ts | TypeScript |
MethodDeclaration |
eliminarEstudio(idMiembro, idEstudio) {
return this.db.collection("miembros").doc(idMiembro).collection("estudios").doc(idEstudio).delete();
} | Manolomon/arpa-desktop | src/app/servicios/miembro.service.ts | TypeScript |
MethodDeclaration |
actualizarDatos(miembro) {
this.afsAuth.auth.currentUser.updatePassword(miembro.passGenerada);
return this.db.collection("miembros").doc(miembro.id).set({
nombre: miembro.nombre,
correo: miembro.correo,
passGenerada: miembro.passGenerada,
facultad: miembro.facultad,
institu... | Manolomon/arpa-desktop | src/app/servicios/miembro.service.ts | TypeScript |
MethodDeclaration |
agregarOActualizarColaboradorExterno(idMiembro, colaborador) {
console.log(colaborador);
if(isUndefined(colaborador.id)) {
console.log(idMiembro);
return this.db.collection("miembros").doc(idMiembro).collection("colaboradores").add(colaborador);
} else {
return this.db.collection("m... | Manolomon/arpa-desktop | src/app/servicios/miembro.service.ts | TypeScript |
MethodDeclaration |
eliminarColaboradorExterno(idMiembro, idColaborador) {
return this.db.collection("miembros").doc(idMiembro).collection("colaboradores").doc(idColaborador).delete();
} | Manolomon/arpa-desktop | src/app/servicios/miembro.service.ts | TypeScript |
MethodDeclaration |
obtenerColaboradoresExternos(idMiembro) {
return this.db.collection("miembros").doc(idMiembro).collection("colaboradores").ref.orderBy("nombre").get();
} | Manolomon/arpa-desktop | src/app/servicios/miembro.service.ts | TypeScript |
FunctionDeclaration |
function _fillFunc(context) {
context.fillText(this.partialText, 0, 0);
} | phucdo1711/konva | src/shapes/TextPath.ts | TypeScript |
FunctionDeclaration |
function _strokeFunc(context) {
context.strokeText(this.partialText, 0, 0);
} | phucdo1711/konva | src/shapes/TextPath.ts | TypeScript |
InterfaceDeclaration |
export interface TextPathConfig extends ShapeConfig {
text?: string;
data?: string;
fontFamily?: string;
fontSize?: number;
fontStyle?: string;
letterSpacing?: number;
startOffset?: number;
textAnchor?: string;
} | phucdo1711/konva | src/shapes/TextPath.ts | TypeScript |
MethodDeclaration |
_sceneFunc(context) {
context.setAttr('font', this._getContextFont());
context.setAttr('textBaseline', this.textBaseline());
context.setAttr('textAlign', 'left');
context.save();
var textDecoration = this.textDecoration();
var fill = this.fill();
var fontSize = this.fontSize();
var gl... | phucdo1711/konva | src/shapes/TextPath.ts | TypeScript |
MethodDeclaration |
_hitFunc(context) {
context.beginPath();
var glyphInfo = this.glyphInfo;
if (glyphInfo.length >= 1) {
var p0 = glyphInfo[0].p0;
context.moveTo(p0.x, p0.y);
}
for (var i = 0; i < glyphInfo.length; i++) {
var p1 = glyphInfo[i].p1;
context.lineTo(p1.x, p1.y);
}
context... | phucdo1711/konva | src/shapes/TextPath.ts | TypeScript |
MethodDeclaration | /**
* get text width in pixels
* @method
* @name Konva.TextPath#getTextWidth
*/
getTextWidth() {
return this.textWidth;
} | phucdo1711/konva | src/shapes/TextPath.ts | TypeScript |
MethodDeclaration |
getTextHeight() {
Util.warn(
'text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height.'
);
return this.textHeight;
} | phucdo1711/konva | src/shapes/TextPath.ts | TypeScript |
MethodDeclaration |
setText(text) {
return Text.prototype.setText.call(this, text);
} | phucdo1711/konva | src/shapes/TextPath.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.