@cpany/types
Advanced tools
Comparing version 0.0.56 to 0.0.57
@@ -104,2 +104,21 @@ declare enum Verdict { | ||
declare function isCodeforces<T extends { | ||
type: string; | ||
}>(entity: T): boolean; | ||
declare function isAtCoder<T extends { | ||
type: string; | ||
}>(entity: T): boolean; | ||
declare function isNowCoder<T extends { | ||
type: string; | ||
}>(entity: T): boolean; | ||
declare function isLuogu<T extends { | ||
type: string; | ||
}>(entity: T): boolean; | ||
declare function isHdu<T extends { | ||
type: string; | ||
}>(entity: T): boolean; | ||
declare function isPintia<T extends { | ||
type: string; | ||
}>(entity: T): boolean; | ||
interface AppConfig { | ||
@@ -152,2 +171,2 @@ title: string; | ||
export { AppConfig, CompressHandleList, IAuthor, ICPanyConfig, IContest, IContestOverview, IContestProblem, IContestStanding, IContestSubmission, IHandle, IProblem, ISubmission, IUser, IUserOverview, ParticipantType, RouteKey, Verdict }; | ||
export { AppConfig, CompressHandleList, IAuthor, ICPanyConfig, IContest, IContestOverview, IContestProblem, IContestStanding, IContestSubmission, IHandle, IProblem, ISubmission, IUser, IUserOverview, ParticipantType, RouteKey, Verdict, isAtCoder, isCodeforces, isHdu, isLuogu, isNowCoder, isPintia }; |
@@ -31,4 +31,30 @@ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/enum.ts | ||
// src/platform.ts | ||
function isCodeforces(entity) { | ||
return entity.type.startsWith("codeforces"); | ||
} | ||
function isAtCoder(entity) { | ||
return entity.type.startsWith("atcoder"); | ||
} | ||
function isNowCoder(entity) { | ||
return entity.type.startsWith("nowcoder"); | ||
} | ||
function isLuogu(entity) { | ||
return entity.type.startsWith("luogu"); | ||
} | ||
function isHdu(entity) { | ||
return entity.type.startsWith("hdu"); | ||
} | ||
function isPintia(entity) { | ||
return entity.type.startsWith("pintia"); | ||
} | ||
exports.ParticipantType = ParticipantType; exports.Verdict = Verdict; | ||
exports.ParticipantType = ParticipantType; exports.Verdict = Verdict; exports.isAtCoder = isAtCoder; exports.isCodeforces = isCodeforces; exports.isHdu = isHdu; exports.isLuogu = isLuogu; exports.isNowCoder = isNowCoder; exports.isPintia = isPintia; |
{ | ||
"name": "@cpany/types", | ||
"version": "0.0.56", | ||
"version": "0.0.57", | ||
"description": "CPany types package", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -14,2 +14,4 @@ import type { IAuthor, IHandle } from './handle'; | ||
export * from './platform'; | ||
// Action/Cli config interface | ||
@@ -16,0 +18,0 @@ export interface AppConfig { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19028
17
609