Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
lastUpdated: String,
publishedDate: String,
releaseDate: String,
publisher: PublisherRuntime,
versions: Array(VersionRuntime),
statistics: Array(StatisticRuntime),
}).And(
// Optional properties.
Partial({
displayName: String,
shortDescription: String,
}),
)
export const ExtensionQueryResultsRuntime = Record({
results: Tuple(Record({ extensions: Array(ExtensionRuntime) })),
})
export const ScrapeExtensionsPayloadRuntime = Record({
page: Number,
})
export const ExtractThemesPayloadRuntime = Record({
extensionId: String,
extensionName: String,
publisherName: String,
lastUpdated: Number,
publishedDate: Number,
releaseDate: Number,
packageUrl: String,
installs: Number,
rating: Number,
Number,
String,
Literal,
Array,
Tuple,
Record,
Dictionary,
Union,
Static,
match,
} from 'runtypes';
const NonNegative = Number.withConstraint(n => n >= 0);
type NonNegative = Static; // = number
const Vector = Tuple(Number, Number, Number);
type Vector = Static; // = [number, number, number]
const Asteroid = Record({
type: Literal('asteroid'),
location: Vector,
mass: NonNegative,
});
type Asteroid = Static<
typeof Asteroid
>; /* = {
type: 'asteroid';
location: Vector;
mass: NonNegative;
}*/
const Planet = Record({
| CriteriaListNormalized
export const Index = t.Union(
t.String,
t.Array(t.Union(t.String, t.Array(t.String))),
t.Dictionary(t.Union(t.String, t.Array(t.String)))
)
export const GroupClause = t.Union(
t.String,
t.Array(t.String)
)
export const OrderClause = t.Union(
t.String,
t.Tuple(t.String, t.String)
)
export const TrilogyOptions = t.Partial({
client: t.Union(t.Literal('sqlite3'), t.Literal('sql.js')),
dir: t.String
})
export const ModelOptions = t.Partial({
index: Index,
primary: t.Array(t.String),
unique: t.Array(t.String),
timestamps: t.Boolean
})
export const AggregateOptions = t.Partial({
distinct: t.Boolean,
describe('SpaceObject', () => {
const Vector = Tuple(Number, Number, Number)
const Asteroid = Record({
type: Literal('asteroid'),
location: Vector,
mass: Number,
})
const Planet = Record({
type: Literal('planet'),
location: Vector,
mass: Number,
population: Number,
habitable: Boolean,
})
const Rank = Union(