type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
ArrowFunction |
() => deleteItem(record) | Znonymous29/jetlinks-ui-antd | src/pages/device/product/save/definition/Tags.tsx | TypeScript |
ArrowFunction |
(item: TagsMeta) => {
if (!data) {
setData([]);
}
const i = data.findIndex((j: any) => j.id === item.id);
if (i > -1) {
data[i] = item;
} else {
data.push(item);
}
setVisible(false);
setData(data);
props.save(data);
} | Znonymous29/jetlinks-ui-antd | src/pages/device/product/save/definition/Tags.tsx | TypeScript |
ArrowFunction |
(j: any) => j.id === item.id | Znonymous29/jetlinks-ui-antd | src/pages/device/product/save/definition/Tags.tsx | TypeScript |
InterfaceDeclaration |
interface Props extends FormComponentProps {
save: Function;
data: any[];
unitsData: any;
} | Znonymous29/jetlinks-ui-antd | src/pages/device/product/save/definition/Tags.tsx | TypeScript |
InterfaceDeclaration |
interface State {
data: TagsMeta[];
current: Partial<TagsMeta>;
visible: boolean;
} | Znonymous29/jetlinks-ui-antd | src/pages/device/product/save/definition/Tags.tsx | TypeScript |
ClassDeclaration |
@Crud({
model:User,
})
@Controller('users')
@ApiTags('用户')
export class UsersController {
constructor(
@InjectModel(User) private readonly model:ReturnModelType<typeof User>
) {
}
} | ZacharyIcoder/MicroAlbum | server/apps/admin/src/users/users.controller.ts | TypeScript |
ArrowFunction |
<A, B>(tx: TxLike<A, B>): ((x: A) => B | B[]) => {
const { 1: complete, 2: reduce } = ensureTransducer(tx)(push());
let done = false;
return (x: A) => {
if (!done) {
let acc = reduce([], x);
done = isReduced(acc);
if (done) {
acc = complete(acc.de... | 418sec/umbrella | packages/transducers/src/step.ts | TypeScript |
ArrowFunction |
(x: A) => {
if (!done) {
let acc = reduce([], x);
done = isReduced(acc);
if (done) {
acc = complete(acc.deref());
}
return acc.length === 1 ? acc[0] : acc.length > 0 ? acc : undefined;
}
} | 418sec/umbrella | packages/transducers/src/step.ts | TypeScript |
FunctionDeclaration |
export function doRectanglesOverlap(a: Rect, b: Rect): boolean {
return a.x < b.x2 && a.x2 > b.x && a.y < b.y2 && a.y2 > b.y;
} | cyrsis/afterlife | src/data/PlotMath.ts | TypeScript |
FunctionDeclaration |
export function doAnyOverlap(arrayOfRects: Rect[]): boolean {
for (let i = 0; i < arrayOfRects.length - 1; i++) {
if (doRectanglesOverlap(arrayOfRects[i], arrayOfRects[i + 1])) {
return true;
}
}
return false;
} | cyrsis/afterlife | src/data/PlotMath.ts | TypeScript |
FunctionDeclaration |
export function computeRectOverlap(a: Rect, b: Rect): Rect {
const result = createEmptyRect();
// Take the greater of the x and y values;
result.x = a.x > b.x ? a.x : b.x;
result.y = a.y > b.y ? a.y : b.y;
// Take the lesser of the x2 and y2 values
result.x2 = a.x2 < b.x2 ? a.x2 : b.x2;
result.y2 = a.y... | cyrsis/afterlife | src/data/PlotMath.ts | TypeScript |
FunctionDeclaration | // subtracts b from a and returns from 0 - 4 remaining rectangles after doing it
export function subtractRectangles(a: Rect, b: Rect): Rect[] {
if (!doRectanglesOverlap(a, b)) {
return [a];
}
const result = new Array<Rect>();
let leftX = a.x;
let rightX = a.x2;
// Check the left side first
if (a.x <... | cyrsis/afterlife | src/data/PlotMath.ts | TypeScript |
FunctionDeclaration | /**
* This will insert the reset styles as first in the head ( fallback to body if head is not available ).
* We need to do this because css-reset is a js file now which gives us all the reset styles in string format
* and thus we need to insert them as styles manually.
* We cannot use injectGlobal from styled comp... | HereSinceres/atlaskit-mk-2 | website/src/utils/insertStyleSheetInHead.ts | TypeScript |
ArrowFunction |
({
placeholder = "Choose a language",
onChange,
options,
...props
}) => {
const [open, setOpen] = useState(false);
const [value, setValue] = useState("");
const [label, setLabel] = useState("");
return (
<div className={styles.root}>
<button className={styles.button} onClick={() | canva-design/polyglot | src/ui/components/figma/select/index.tsx | TypeScript |
ArrowFunction |
option => (
<li
className={styles.listItem} | canva-design/polyglot | src/ui/components/figma/select/index.tsx | TypeScript |
MethodDeclaration |
classnames(styles | canva-design/polyglot | src/ui/components/figma/select/index.tsx | TypeScript |
MethodDeclaration |
onChange(option | canva-design/polyglot | src/ui/components/figma/select/index.tsx | TypeScript |
MethodDeclaration |
setOpen(false); | canva-design/polyglot | src/ui/components/figma/select/index.tsx | TypeScript |
MethodDeclaration |
setLabel(option | canva-design/polyglot | src/ui/components/figma/select/index.tsx | TypeScript |
MethodDeclaration |
setValue(option | canva-design/polyglot | src/ui/components/figma/select/index.tsx | TypeScript |
FunctionDeclaration |
export function Content(props: ContentProps) {
return (
<div className="container">
<Header title={props.selectedGenre.title} />
<main>
<div className="movies-list">
{props.movies.map((movie) => (
<MovieCard
key={movie.imdbID}
title={movie.Ti... | Marcos-Toledo/ignite-chapter-1-watchme | src/components/Content.tsx | TypeScript |
ArrowFunction |
(movie) => (
<MovieCard
key={movie.imdbID} | Marcos-Toledo/ignite-chapter-1-watchme | src/components/Content.tsx | TypeScript |
InterfaceDeclaration |
interface Movie {
imdbID: string;
Title: string;
Poster: string;
Ratings: Array<{
Source: string;
Value: string;
}>;
Runtime: string;
} | Marcos-Toledo/ignite-chapter-1-watchme | src/components/Content.tsx | TypeScript |
InterfaceDeclaration |
interface ContentProps {
selectedGenre: {
title: string;
};
movies: Array<Movie>;
} | Marcos-Toledo/ignite-chapter-1-watchme | src/components/Content.tsx | TypeScript |
ArrowFunction |
(resolve: (result: GetBarsResult) => void, reject: (reason: string) => void) => {
this._requester.sendRequest<HistoryResponse>(this._datafeedUrl, 'history', requestParams)
.then((response: HistoryResponse | UdfErrorResponse) => {
if (response.s !== 'ok' && response.s !== 'no_data') {
reject(response.... | 657797068/tradingview-nuxt-socket | static/datafeeds/udf/src/history-provider.ts | TypeScript |
ArrowFunction |
(response: HistoryResponse | UdfErrorResponse) => {
if (response.s !== 'ok' && response.s !== 'no_data') {
reject(response.errmsg);
return;
}
const bars: Bar[] = [];
const meta: HistoryMetadata = {
noData: false,
};
if (response.s === 'no_data') {
meta.noData = t... | 657797068/tradingview-nuxt-socket | static/datafeeds/udf/src/history-provider.ts | TypeScript |
ArrowFunction |
(reason?: string | Error) => {
const reasonString = getErrorMessage(reason);
console.warn(`HistoryProvider: getBars() failed, error=${reasonString}`);
reject(reasonString);
} | 657797068/tradingview-nuxt-socket | static/datafeeds/udf/src/history-provider.ts | TypeScript |
ClassDeclaration |
export class HistoryProvider {
private _datafeedUrl: string;
private readonly _requester: Requester;
public constructor(datafeedUrl: string, requester: Requester) {
this._datafeedUrl = datafeedUrl;
this._requester = requester;
}
public getBars(symbolInfo: LibrarySymbolInfo, resolution: string, rangeStartDat... | 657797068/tradingview-nuxt-socket | static/datafeeds/udf/src/history-provider.ts | TypeScript |
InterfaceDeclaration |
interface HistoryPartialDataResponse extends UdfOkResponse {
t: number[];
c: number[];
o?: never;
h?: never;
l?: never;
v?: never;
} | 657797068/tradingview-nuxt-socket | static/datafeeds/udf/src/history-provider.ts | TypeScript |
InterfaceDeclaration |
interface HistoryFullDataResponse extends UdfOkResponse {
t: number[];
c: number[];
o: number[];
h: number[];
l: number[];
v: number[];
} | 657797068/tradingview-nuxt-socket | static/datafeeds/udf/src/history-provider.ts | TypeScript |
InterfaceDeclaration |
interface HistoryNoDataResponse extends UdfResponse {
s: 'no_data';
nextTime?: number;
} | 657797068/tradingview-nuxt-socket | static/datafeeds/udf/src/history-provider.ts | TypeScript |
InterfaceDeclaration |
export interface GetBarsResult {
bars: Bar[];
meta: HistoryMetadata;
} | 657797068/tradingview-nuxt-socket | static/datafeeds/udf/src/history-provider.ts | TypeScript |
TypeAliasDeclaration |
type HistoryResponse = HistoryFullDataResponse | HistoryPartialDataResponse | HistoryNoDataResponse; | 657797068/tradingview-nuxt-socket | static/datafeeds/udf/src/history-provider.ts | TypeScript |
MethodDeclaration |
public getBars(symbolInfo: LibrarySymbolInfo, resolution: string, rangeStartDate: number, rangeEndDate: number): Promise<GetBarsResult> {
const requestParams: RequestParams = {
symbol: symbolInfo.ticker || '',
resolution: resolution,
from: rangeStartDate,
to: rangeEndDate,
};
return new Promise((res... | 657797068/tradingview-nuxt-socket | static/datafeeds/udf/src/history-provider.ts | TypeScript |
ArrowFunction |
(Standard: System Locale) | Stonks-Enterprises/StonkCoin | src/qt/locale/bitcoin_de.ts | TypeScript |
ClassDeclaration |
export class MsalCommon extends Observable {} | medirectbank/ns-workspace | packages/msal/common.ts | TypeScript |
InterfaceDeclaration |
export interface AuthenticationResult {
scope: Array<string>;
tenantId: string;
accessToken: string;
account: IAccount;
idToken: string;
expiresOn: Date;
} | medirectbank/ns-workspace | packages/msal/common.ts | TypeScript |
InterfaceDeclaration |
export interface IAccount {
id: string;
username: string;
object?: any;
} | medirectbank/ns-workspace | packages/msal/common.ts | TypeScript |
InterfaceDeclaration |
export interface MSALException {
message: string;
errorCode: string | number;
} | medirectbank/ns-workspace | packages/msal/common.ts | TypeScript |
InterfaceDeclaration |
export interface InitOptions {
useConfig?: boolean;
clientId?: string;
authority?: string;
redirectUri?: string;
multiple?: boolean;
} | medirectbank/ns-workspace | packages/msal/common.ts | TypeScript |
InterfaceDeclaration |
export interface AcquireOptions {
scopes: Array<any>;
onSuccess: (result: AuthenticationResult) => void;
onError: (error: MSALException) => void;
onCancel?: () => void;
} | medirectbank/ns-workspace | packages/msal/common.ts | TypeScript |
InterfaceDeclaration |
export interface AcquireTokenSilentAsyncOptions {
scopes: Array<any>;
account: any;
onSuccess: (result: AuthenticationResult) => void;
onError: (error: MSALException) => void;
onCancel?: () => void;
} | medirectbank/ns-workspace | packages/msal/common.ts | TypeScript |
EnumDeclaration |
export declare enum UiBehavior {
SELECT_ACCOUNT = 0,
FORCE_LOGIN = 1,
CONSENT = 2,
} | medirectbank/ns-workspace | packages/msal/common.ts | TypeScript |
FunctionDeclaration |
export function Cpf() {
return function (object: Object, propertyName: string) {
registerDecorator({
name: 'cpf',
target: object.constructor,
propertyName: propertyName,
options: {
message: 'CPF must be valid.',
},
vali... | lucasmbrute2/backend-nest-projeto-final | src/decorators/cpf.decorator.ts | TypeScript |
MethodDeclaration |
validate(value: any) {
return cpf.isValid(value);
} | lucasmbrute2/backend-nest-projeto-final | src/decorators/cpf.decorator.ts | TypeScript |
ClassDeclaration |
@Component({ template: `<ion-content></ion-content>` })
export class TabNone { } | jvitor83/ODataConsumer | src/app/layout/layout-tab.component.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'seed-layout [type="tab"]',
template:
`
<seed-header [showLeftMenuButton]="false" [showRightMenuButton]="true">
<ion-tabs [hidden]="showToolbarTab" layout-tabs tabsLayout="icon-top" tabsPlacement="top">
<ion-tab [root]="dummyTab" layout-tab *ngFor="let menuItem of menuIte... | jvitor83/ODataConsumer | src/app/layout/layout-tab.component.ts | TypeScript |
MethodDeclaration |
navigateTo(link: string) {
const routerLink = JSON.parse(link.replace(/'/g, '"'));
this.router.navigate(routerLink);
} | jvitor83/ODataConsumer | src/app/layout/layout-tab.component.ts | TypeScript |
ClassDeclaration | /**
* An Azure Cosmos DB storedProcedure.
*/
export class SqlResourceSqlStoredProcedure extends pulumi.CustomResource {
/**
* Get an existing SqlResourceSqlStoredProcedure resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The ... | pulumi-bot/pulumi-azure-native | sdk/nodejs/documentdb/v20210301preview/sqlResourceSqlStoredProcedure.ts | TypeScript |
InterfaceDeclaration | /**
* The set of arguments for constructing a SqlResourceSqlStoredProcedure resource.
*/
export interface SqlResourceSqlStoredProcedureArgs {
/**
* Cosmos DB database account name.
*/
readonly accountName: pulumi.Input<string>;
/**
* Cosmos DB container name.
*/
readonly containerN... | pulumi-bot/pulumi-azure-native | sdk/nodejs/documentdb/v20210301preview/sqlResourceSqlStoredProcedure.ts | TypeScript |
MethodDeclaration | /**
* Get an existing SqlResourceSqlStoredProcedure resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param op... | pulumi-bot/pulumi-azure-native | sdk/nodejs/documentdb/v20210301preview/sqlResourceSqlStoredProcedure.ts | TypeScript |
MethodDeclaration | /**
* Returns true if the given object is an instance of SqlResourceSqlStoredProcedure. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
public static isInstance(obj: any): obj is SqlResourceSqlStoredProcedure {
if (obj === undefin... | pulumi-bot/pulumi-azure-native | sdk/nodejs/documentdb/v20210301preview/sqlResourceSqlStoredProcedure.ts | TypeScript |
ArrowFunction |
(p) => {
this.updateChunkProgress(p.loaded, chunkInfo.index);
} | HFO4/cloudreve-frontend | src/component/Uploader/core/uploader/local.ts | TypeScript |
ClassDeclaration |
export default class Local extends Chunk {
protected async uploadChunk(chunkInfo: ChunkInfo) {
return localUploadChunk(
this.task.session?.sessionID!,
chunkInfo,
(p) => {
this.updateChunkProgress(p.loaded, chunkInfo.index);
},
this... | HFO4/cloudreve-frontend | src/component/Uploader/core/uploader/local.ts | TypeScript |
MethodDeclaration |
protected async uploadChunk(chunkInfo: ChunkInfo) {
return localUploadChunk(
this.task.session?.sessionID!,
chunkInfo,
(p) => {
this.updateChunkProgress(p.loaded, chunkInfo.index);
},
this.cancelToken.token
);
} | HFO4/cloudreve-frontend | src/component/Uploader/core/uploader/local.ts | TypeScript |
FunctionDeclaration |
export function SideBar(props: SideBarProps) {
const [genres, setGenres] = useState<GenreResponseProps[]>([]);
useEffect(() => {
api.get<GenreResponseProps[]>('genres').then(response => {
setGenres(response.data);
});
}, []);
return (
<nav className="sidebar">
<span>Watch<p>Me</p></span... | vtpa/ignite-reactjs-02-componentizando-a-aplicacao | src/components/SideBar.tsx | TypeScript |
ArrowFunction |
genre => (
<Button
key={String(genre.id | vtpa/ignite-reactjs-02-componentizando-a-aplicacao | src/components/SideBar.tsx | TypeScript |
InterfaceDeclaration |
interface SideBarProps {
handleClickButton: (id: number) => void;
selectedGenreId: number;
} | vtpa/ignite-reactjs-02-componentizando-a-aplicacao | src/components/SideBar.tsx | TypeScript |
ClassDeclaration |
export class UserService {
private readonly userDao: UserDao;
constructor() {
this.userDao = new UserDao();
}
@Transactional()
public async mergeCreateWithT(name: string) {
await this.createWithT(name + '_1');
await this.createWithT(name + '_222222222222222222222222222222... | muyu66/transactional | test/user.service.ts | TypeScript |
MethodDeclaration |
@Transactional()
public async mergeCreateWithT(name: string) {
await this.createWithT(name + '_1');
await this.createWithT(name + '_222222222222222222222222222222222222222');
} | muyu66/transactional | test/user.service.ts | TypeScript |
MethodDeclaration |
@Transactional()
public async mergeCreate2WithT(name: string) {
await this.create(name + '_1');
await this.createWithT(name + '_222222222222222222222222222222222222222');
} | muyu66/transactional | test/user.service.ts | TypeScript |
MethodDeclaration |
@Transactional()
public async nestCreateWithT(name: string) {
await this.userDao.create({ name: name + '_1' });
await this.createWithT(name + '_222222222222222222222222222222222222222');
} | muyu66/transactional | test/user.service.ts | TypeScript |
MethodDeclaration |
public async nestCreate(name: string) {
await this.userDao.create({ name: name + '_1' });
await this.create(name + '_222222222222222222222222222222222222222');
} | muyu66/transactional | test/user.service.ts | TypeScript |
MethodDeclaration |
public async create(name: string) {
return this.userDao.create({ name });
} | muyu66/transactional | test/user.service.ts | TypeScript |
MethodDeclaration |
public async findAll() {
return this.userDao.findAll();
} | muyu66/transactional | test/user.service.ts | TypeScript |
MethodDeclaration |
@Transactional()
public async createWithT(name: string) {
return this.userDao.create({ name });
} | muyu66/transactional | test/user.service.ts | TypeScript |
MethodDeclaration |
@Transactional()
public async findAllWithT() {
return this.userDao.findAll();
} | muyu66/transactional | test/user.service.ts | TypeScript |
ClassDeclaration | /**
* Helper class for generation of common data.
*/
class Generator
{
static baseColors = [
"#0-8-a-", "#0-8-c-", "#0-a-a-", "#0-a-c-", "#1-7-5-", "#1-9-5-", "#1-9-3-",
"#1-9-9-", "#1-b-7-", "#2-6-c-", "#2-8-a-", "#2-8-c-", "#3-9-3-", "#3-9-5-",
"#3-b-7-", "#4-2-8-", "#4-4-a-", "#4-6-8-", "#4-8-a-", "#... | angelhdezv/Restaurant-Api-reference-CSV | src/util/Generator.ts | TypeScript |
MethodDeclaration | /**
* Get a numeric identifier between 1 and 10000000.
*/
static getId(): number
{
return this.getNum(10000000) + 1
} | angelhdezv/Restaurant-Api-reference-CSV | src/util/Generator.ts | TypeScript |
MethodDeclaration | /**
* Get a random color with pre-defined balance of color.
*/
static getColor(): string
{
let base = this.baseColors[this.getNum(this.baseColors.length)];
let A = this.getNum(2) == 0 ? "0" : "8";
let B = this.getNum(2) == 0 ? "0" : "8";
let C = this.getNum(2) == 0 ? "0" : "8";
base = base.r... | angelhdezv/Restaurant-Api-reference-CSV | src/util/Generator.ts | TypeScript |
MethodDeclaration | /**
* Get a random number between 0 and max.
* @param {number} max Max number.
*/
static getNum(max: number): number
{
return Math.floor(Math.random() * max);
} | angelhdezv/Restaurant-Api-reference-CSV | src/util/Generator.ts | TypeScript |
MethodDeclaration |
static getName(): string
{
return faker.name.findName();
} | angelhdezv/Restaurant-Api-reference-CSV | src/util/Generator.ts | TypeScript |
MethodDeclaration |
static getEmail(): string
{
return faker.internet.email();
} | angelhdezv/Restaurant-Api-reference-CSV | src/util/Generator.ts | TypeScript |
MethodDeclaration |
static getImageUrl(): string
{
return faker.image.imageUrl();
} | angelhdezv/Restaurant-Api-reference-CSV | src/util/Generator.ts | TypeScript |
MethodDeclaration |
static getNoun(): string
{
return `${faker.hacker.adjective()} ${faker.hacker.noun()}`;
} | angelhdezv/Restaurant-Api-reference-CSV | src/util/Generator.ts | TypeScript |
MethodDeclaration |
static getBoolean(): string
{
return faker.random.boolean();
} | angelhdezv/Restaurant-Api-reference-CSV | src/util/Generator.ts | TypeScript |
MethodDeclaration |
static getDate(): string
{
return faker.date.recent();
} | angelhdezv/Restaurant-Api-reference-CSV | src/util/Generator.ts | TypeScript |
MethodDeclaration |
static getWord(): string
{
return faker.lorem.word()
} | angelhdezv/Restaurant-Api-reference-CSV | src/util/Generator.ts | TypeScript |
MethodDeclaration |
static getSentence(): string
{
return faker.lorem.sentence()
} | angelhdezv/Restaurant-Api-reference-CSV | src/util/Generator.ts | TypeScript |
MethodDeclaration |
static getParagraph(): string
{
return faker.lorem.paragraph()
} | angelhdezv/Restaurant-Api-reference-CSV | src/util/Generator.ts | TypeScript |
ArrowFunction |
<T extends object>(): Partial<T> => {
// server side rendering
if (typeof window === 'undefined') {
return {};
}
const params = new URLSearchParams(window.location.search);
return new Proxy(params, {
get(target, prop) {
return target.get(prop as string) || undefined;
},
}) as T;
} | soul-project/react-soul-utils | src/hooks/useLogin/utils.ts | TypeScript |
MethodDeclaration |
get(target, prop) {
return target.get(prop as string) || undefined;
} | soul-project/react-soul-utils | src/hooks/useLogin/utils.ts | TypeScript |
ArrowFunction |
() => this.router.navigate(['admin', 'games', this.gameId, 'media']) | JeffersonBC/eshop-index | eshop-index-front/src/app/admin-area/admin-games/admin-games-media/admin-games-media-form/admin-games-media-form.component.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'app-admin-games-media-form',
templateUrl: './admin-games-media-form.component.html',
})
export class AdminGamesMediaFormComponent implements OnInit {
@ViewChild('form') form: NgForm;
gameId: number;
mediaId: number;
isEditing = false;
formInfo: GameMedia = {} as GameMedia;
c... | JeffersonBC/eshop-index | eshop-index-front/src/app/admin-area/admin-games/admin-games-media/admin-games-media-form/admin-games-media-form.component.ts | TypeScript |
MethodDeclaration |
ngOnInit() {
this.gameId = this.route.snapshot.params['gameId'];
if (this.route.snapshot.params['id']) {
this.mediaId = this.route.snapshot.params['id'];
this.formInfo = this.route.snapshot.data['gameMedia'];
this.isEditing = true;
}
} | JeffersonBC/eshop-index | eshop-index-front/src/app/admin-area/admin-games/admin-games-media/admin-games-media-form/admin-games-media-form.component.ts | TypeScript |
MethodDeclaration |
isValid(): boolean {
FormUtil.touchForm(this.form.control);
return this.form.valid;
} | JeffersonBC/eshop-index | eshop-index-front/src/app/admin-area/admin-games/admin-games-media/admin-games-media-form/admin-games-media-form.component.ts | TypeScript |
MethodDeclaration |
send() {
if (!this.isValid()) { return; }
if (this.isEditing) {
this.gameMediaService.patchGameMedia(this.formInfo, this.mediaId)
.subscribe( () => this.router.navigate(['admin', 'games', this.gameId, 'media']) );
} else {
this.gameMediaService.postGameMedia(this.formInfo, this.gameId... | JeffersonBC/eshop-index | eshop-index-front/src/app/admin-area/admin-games/admin-games-media/admin-games-media-form/admin-games-media-form.component.ts | TypeScript |
MethodDeclaration |
delete() {
if (confirm('Are you SURE you want to delete this media?')) {
this.gameMediaService.deleteGameMedia(this.mediaId)
.subscribe( () => this.router.navigate(['admin', 'games', this.gameId, 'media']) );
}
} | JeffersonBC/eshop-index | eshop-index-front/src/app/admin-area/admin-games/admin-games-media/admin-games-media-form/admin-games-media-form.component.ts | TypeScript |
FunctionDeclaration |
export default function () {
var app: express.Express = express();
app.use(cors());
app.options('*', cors());
for (let model of config.globFiles(config.models)) {
require(path.resolve(model));
}
if (config.useMongo) {
mongoose.connect(config.mongodb, {
promiseLibr... | dcsm8/mean-list-baackend | src/config/express.ts | TypeScript |
ArrowFunction |
() => { console.log('Error connecting to mongos'); } | dcsm8/mean-list-baackend | src/config/express.ts | TypeScript |
ArrowFunction |
(req: express.Request, res: express.Response, next: Function): void => {
let err: Error = new Error('Not Found');
next(err);
} | dcsm8/mean-list-baackend | src/config/express.ts | TypeScript |
ArrowFunction |
(id) => { overrides.overrideElement(id, app); } | rssahai/imodeljs | core/frontend/src/EmphasizeElements.ts | TypeScript |
ArrowFunction |
(id) => { overrides.overrideElement(id, ovrApp); } | rssahai/imodeljs | core/frontend/src/EmphasizeElements.ts | TypeScript |
ArrowFunction |
(id) => { newIds.add(id); } | rssahai/imodeljs | core/frontend/src/EmphasizeElements.ts | TypeScript |
ArrowFunction |
(id) => { overrideIds.add(id); } | rssahai/imodeljs | core/frontend/src/EmphasizeElements.ts | TypeScript |
ArrowFunction |
(id) => { otherIds.delete(id); } | rssahai/imodeljs | core/frontend/src/EmphasizeElements.ts | TypeScript |
InterfaceDeclaration | /** JSON representation of an appearance override in an [[EmphasizeElementsProps]].
* @see [[EmphasizeElements]].
* @public
*/
export interface AppearanceOverrideProps {
overrideType?: FeatureOverrideType;
color?: ColorDefProps;
ids?: Id64Array;
} | rssahai/imodeljs | core/frontend/src/EmphasizeElements.ts | TypeScript |
InterfaceDeclaration | /** JSON representation of an [[EmphasizeElements]].
* @public
*/
export interface EmphasizeElementsProps {
neverDrawn?: Id64Array;
alwaysDrawn?: Id64Array;
isAlwaysDrawnExclusive?: boolean;
alwaysDrawnExclusiveEmphasized?: Id64Array;
defaultAppearance?: FeatureSymbology.AppearanceProps;
appearanc... | rssahai/imodeljs | core/frontend/src/EmphasizeElements.ts | TypeScript |
EnumDeclaration | /** Options for overriding element appearance.
* @see [[EmphasizeElements]]
* @see [[AppearanceOverrideProps]]
* @public
*/
export enum FeatureOverrideType {
/** Override color only. */
ColorOnly,
/** Override alpha only. */
AlphaOnly,
/** Override both color and alpha. */
ColorAndAlpha,
} | rssahai/imodeljs | core/frontend/src/EmphasizeElements.ts | TypeScript |
MethodDeclaration | /** Establish active feature overrides to emphasize elements and apply color/transparency overrides.
* @see [[Viewport.featureOverrideProvider]]
*/
public addFeatureOverrides(overrides: FeatureSymbology.Overrides, vp: Viewport): void {
const emphasizedElements = this.getEmphasizedElements(vp);
if (und... | rssahai/imodeljs | core/frontend/src/EmphasizeElements.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.