Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions types/discord-rpc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
"@types/discord-rpc": "workspace:."
},
"owners": [
{
"name": "Brandon Bothell",
"githubUsername": "brandonbothell"
},
{
"name": "Dylan Hackworth",
"githubUsername": "dylhack"
Expand Down
8 changes: 4 additions & 4 deletions types/fhir/r2.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12038,7 +12038,7 @@ export interface HumanName extends Element {
/**
* Base StructureDefinition for Bundle Resource
*/
export interface Bundle extends Resource {
export interface Bundle<T extends Resource = Resource> extends Resource {
/** Resource Type Name (for serialization) */
readonly resourceType: 'Bundle';
/**
Expand All @@ -12062,7 +12062,7 @@ export interface Bundle extends Resource {
* Entry in the bundle - will have a resource, or information
* An entry in a bundle resource - will either contain a resource, or information about a resource (transactions and history only).
*/
entry?: BundleEntry[] | undefined;
entry?: BundleEntry<T>[] | undefined;
/**
* Digital Signature
* Digital Signature - base64 encoded. XML DigSIg or a JWT.
Expand Down Expand Up @@ -12186,7 +12186,7 @@ export interface BundleEntryResponse extends BackboneElement {
* Entry in the bundle - will have a resource, or information
* An entry in a bundle resource - will either contain a resource, or information about a resource (transactions and history only).
*/
export interface BundleEntry extends BackboneElement {
export interface BundleEntry<T extends Resource = Resource> extends BackboneElement {
/**
* Absolute URL for resource (server address, or UUID/OID)
* The Absolute URL for the resource. This must be provided for all resources. The fullUrl SHALL not disagree with the id in the resource. The fullUrl is a version independent reference to the resource.
Expand All @@ -12197,7 +12197,7 @@ export interface BundleEntry extends BackboneElement {
* A resource in the bundle
* The Resources for the entry.
*/
resource?: Resource | undefined;
resource?: T | undefined;
/**
* Search related information
* Information about the search process that lead to the creation of this entry.
Expand Down
8 changes: 4 additions & 4 deletions types/fhir/r3.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18821,7 +18821,7 @@ export interface HumanName extends Element {
/**
* Base StructureDefinition for Bundle Resource
*/
export interface Bundle extends Resource {
export interface Bundle<T extends Resource = Resource> extends Resource {
/** Resource Type Name (for serialization) */
readonly resourceType: 'Bundle';
/**
Expand Down Expand Up @@ -18853,7 +18853,7 @@ export interface Bundle extends Resource {
* Entry in the bundle - will have a resource, or information
* An entry in a bundle resource - will either contain a resource, or information about a resource (transactions and history only).
*/
entry?: BundleEntry[] | undefined;
entry?: BundleEntry<T>[] | undefined;
/**
* Digital Signature
* Digital Signature - base64 encoded. XML-DSIg or a JWT.
Expand Down Expand Up @@ -18989,7 +18989,7 @@ export interface BundleEntryResponse extends BackboneElement {
* Entry in the bundle - will have a resource, or information
* An entry in a bundle resource - will either contain a resource, or information about a resource (transactions and history only).
*/
export interface BundleEntry extends BackboneElement {
export interface BundleEntry<T extends Resource = Resource> extends BackboneElement {
/**
* Links related to this entry
* A series of links that provide context to this entry.
Expand All @@ -19008,7 +19008,7 @@ export interface BundleEntry extends BackboneElement {
* A resource in the bundle
* The Resources for the entry.
*/
resource?: Resource | undefined;
resource?: T | undefined;
/**
* Search related information
* Information about the search process that lead to the creation of this entry.
Expand Down
8 changes: 4 additions & 4 deletions types/fhir/r4.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25659,7 +25659,7 @@ export interface EvidenceVariableCharacteristic extends BackboneElement {
/**
* A container for a collection of resources.
*/
export interface Bundle extends Resource {
export interface Bundle<T extends Resource = Resource> extends Resource {
/** Resource Type Name (for serialization) */
readonly resourceType: 'Bundle';
/**
Expand Down Expand Up @@ -25708,7 +25708,7 @@ export interface Bundle extends Resource {
* Entry in the bundle - will have a resource or information
* An entry in a bundle resource - will either contain a resource or information about a resource (transactions and history only).
*/
entry?: BundleEntry[] | undefined;
entry?: BundleEntry<T>[] | undefined;
/**
* Digital Signature
* Digital Signature - base64 encoded. XML-DSig or a JWT.
Expand Down Expand Up @@ -25849,7 +25849,7 @@ export interface BundleEntryResponse extends BackboneElement {
* Entry in the bundle - will have a resource or information
* An entry in a bundle resource - will either contain a resource or information about a resource (transactions and history only).
*/
export interface BundleEntry extends BackboneElement {
export interface BundleEntry<T extends Resource = Resource> extends BackboneElement {
/**
* Links related to this entry
* A series of links that provide context to this entry.
Expand All @@ -25869,7 +25869,7 @@ export interface BundleEntry extends BackboneElement {
* A resource in the bundle
* The Resource for the entry. The purpose/meaning of the resource is determined by the Bundle.type.
*/
resource?: Resource | undefined;
resource?: T | undefined;
/**
* Search related information
* Information about the search process that lead to the creation of this entry.
Expand Down
8 changes: 4 additions & 4 deletions types/fhir/r4b.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26035,7 +26035,7 @@ export interface CodeableReference extends Element {
/**
* A container for a collection of resources.
*/
export interface Bundle extends Resource {
export interface Bundle<T extends Resource = Resource> extends Resource {
/** Resource Type Name (for serialization) */
readonly resourceType: 'Bundle';
/**
Expand Down Expand Up @@ -26084,7 +26084,7 @@ export interface Bundle extends Resource {
* Entry in the bundle - will have a resource or information
* An entry in a bundle resource - will either contain a resource or information about a resource (transactions and history only).
*/
entry?: BundleEntry[] | undefined;
entry?: BundleEntry<T>[] | undefined;
/**
* Digital Signature
* Digital Signature - base64 encoded. XML-DSig or a JWT.
Expand Down Expand Up @@ -26225,7 +26225,7 @@ export interface BundleEntryResponse extends BackboneElement {
* Entry in the bundle - will have a resource or information
* An entry in a bundle resource - will either contain a resource or information about a resource (transactions and history only).
*/
export interface BundleEntry extends BackboneElement {
export interface BundleEntry<T extends Resource = Resource> extends BackboneElement {
/**
* Links related to this entry
* A series of links that provide context to this entry.
Expand All @@ -26245,7 +26245,7 @@ export interface BundleEntry extends BackboneElement {
* A resource in the bundle
* The Resource for the entry. The purpose/meaning of the resource is determined by the Bundle.type.
*/
resource?: Resource | undefined;
resource?: T | undefined;
/**
* Search related information
* Information about the search process that lead to the creation of this entry.
Expand Down
8 changes: 4 additions & 4 deletions types/fhir/r5.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32200,7 +32200,7 @@ export interface CodeableReference extends DataType {
/**
* A container for a collection of resources.
*/
export interface Bundle extends Resource {
export interface Bundle<T extends Resource = Resource> extends Resource {
/** Resource Type Name (for serialization) */
readonly resourceType: 'Bundle';
/**
Expand Down Expand Up @@ -32249,7 +32249,7 @@ export interface Bundle extends Resource {
* Entry in the bundle - will have a resource or information
* An entry in a bundle resource - will either contain a resource or information about a resource (transactions and history only).
*/
entry?: BundleEntry[] | undefined;
entry?: BundleEntry<T>[] | undefined;
/**
* Digital Signature
* Digital Signature - base64 encoded. XML-DSig or a JWS.
Expand Down Expand Up @@ -32396,7 +32396,7 @@ export interface BundleEntryResponse extends BackboneElement {
* Entry in the bundle - will have a resource or information
* An entry in a bundle resource - will either contain a resource or information about a resource (transactions and history only).
*/
export interface BundleEntry extends BackboneElement {
export interface BundleEntry<T extends Resource = Resource> extends BackboneElement {
/**
* Links related to this entry
* A series of links that provide context to this entry.
Expand All @@ -32417,7 +32417,7 @@ export interface BundleEntry extends BackboneElement {
* A resource in the bundle
* The Resource for the entry. The purpose/meaning of the resource is determined by the Bundle.type. This is allowed to be a Parameters resource if and only if it is referenced by something else within the Bundle that provides context/meaning.
*/
resource?: Resource | undefined;
resource?: T | undefined;
/**
* Search related information
* Information about the search process that lead to the creation of this entry.
Expand Down
14 changes: 14 additions & 0 deletions types/fhir/test/r2-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -316,3 +316,17 @@ const r2Bundle: fhir2.Bundle = {
const r2HasPatient = r2Bundle.entry?.some(
(e) => e.resource?.resourceType === "Patient",
);

// 6. Bundle<T> and BundleEntry<T> generic typing
// Regression for https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/75098
const r2PatientBundle: fhir2.Bundle<fhir2.Patient> = {
resourceType: "Bundle",
type: "collection",
entry: [{ resource: r2InlinePatient }],
};
const r2PatientEntry = r2PatientBundle.entry?.[0];
// patientEntry resource should be typed as Patient | undefined
if (r2PatientEntry?.resource?.resourceType === "Patient") {
// Access a Patient-specific field (e.g. id) to prove narrow typing
const r2PtId: string | undefined = r2PatientEntry.resource.id;
}
14 changes: 14 additions & 0 deletions types/fhir/test/r3-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -388,3 +388,17 @@ const r3Bundle: fhir3.Bundle = {
const r3HasPatient = r3Bundle.entry?.some(
(e) => e.resource?.resourceType === "Patient",
);

// 6. Bundle<T> and BundleEntry<T> generic typing
// Regression for https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/75098
const r3PatientBundle: fhir3.Bundle<fhir3.Patient> = {
resourceType: "Bundle",
type: "collection",
entry: [{ resource: r3InlinePatient }],
};
const r3PatientEntry = r3PatientBundle.entry?.[0];
// patientEntry resource should be typed as Patient | undefined
if (r3PatientEntry?.resource?.resourceType === "Patient") {
// Access a Patient-specific field (e.g. id) to prove narrow typing
const r3PtId: string | undefined = r3PatientEntry.resource.id;
}
14 changes: 14 additions & 0 deletions types/fhir/test/r4-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -460,3 +460,17 @@ const r4Bundle: fhir4.Bundle = {
const r4HasPatient = r4Bundle.entry?.some(
(e) => e.resource?.resourceType === "Patient",
);

// 6. Bundle<T> and BundleEntry<T> generic typing
// Regression for https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/75098
const r4PatientBundle: fhir4.Bundle<fhir4.Patient> = {
resourceType: "Bundle",
type: "collection",
entry: [{ resource: r4InlinePatient }],
};
const r4PatientEntry = r4PatientBundle.entry?.[0];
// patientEntry resource should be typed as Patient | undefined
if (r4PatientEntry?.resource?.resourceType === "Patient") {
// Access a Patient-specific field (e.g. id) to prove narrow typing
const r4PtId: string | undefined = r4PatientEntry.resource.id;
}
14 changes: 14 additions & 0 deletions types/fhir/test/r4b-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -454,3 +454,17 @@ const r4bBundle: fhir4b.Bundle = {
const r4bHasPatient = r4bBundle.entry?.some(
(e) => e.resource?.resourceType === "Patient",
);

// 6. Bundle<T> and BundleEntry<T> generic typing
// Regression for https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/75098
const r4bPatientBundle: fhir4b.Bundle<fhir4b.Patient> = {
resourceType: "Bundle",
type: "collection",
entry: [{ resource: r4bInlinePatient }],
};
const r4bPatientEntry = r4bPatientBundle.entry?.[0];
// patientEntry resource should be typed as Patient | undefined
if (r4bPatientEntry?.resource?.resourceType === "Patient") {
// Access a Patient-specific field (e.g. id) to prove narrow typing
const r4bPtId: string | undefined = r4bPatientEntry.resource.id;
}
14 changes: 14 additions & 0 deletions types/fhir/test/r5-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -499,3 +499,17 @@ const r5Bundle: fhir5.Bundle = {
const r5HasPatient = r5Bundle.entry?.some(
(e) => e.resource?.resourceType === "Patient",
);

// 6. Bundle<T> and BundleEntry<T> generic typing
// Regression for https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/75098
const r5PatientBundle: fhir5.Bundle<fhir5.Patient> = {
resourceType: "Bundle",
type: "collection",
entry: [{ resource: r5InlinePatient }],
};
const r5PatientEntry = r5PatientBundle.entry?.[0];
// patientEntry resource should be typed as Patient | undefined
if (r5PatientEntry?.resource?.resourceType === "Patient") {
// Access a Patient-specific field (e.g. id) to prove narrow typing
const r5PtId: string | undefined = r5PatientEntry.resource.id;
}
33 changes: 33 additions & 0 deletions types/frida-gum/frida-gum-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,39 @@ Process.mainModule;
// $ExpectType string | null
Process.mainModule.version;

// $ExpectType MemoryRange | null
Process.findFunctionRange(Process.mainModule.base);

const cfg = new ControlFlowGraph(Process.mainModule.base);
// $ExpectType NativePointer
cfg.entrypoint;
// $ExpectType BasicBlock
const entryBlock = cfg.entryBlock;
// $ExpectType BasicBlock[]
cfg.blocks;
// $ExpectType BasicBlock | null
cfg.findBlockContaining(Process.mainModule.base);
// $ExpectType boolean
cfg.dominates(Process.mainModule.base, Process.mainModule.base);
// $ExpectType DominatingSite[]
const sites = cfg.enumerateDominatingSites(Process.mainModule.base);
// $ExpectType NativePointer
sites[0].address;
// $ExpectType number
sites[0].capacity;
// $ExpectType NativePointer
entryBlock.start;
// $ExpectType NativePointer
entryBlock.end;
// $ExpectType BasicBlock[]
entryBlock.successors;
// $ExpectType BasicBlock[]
entryBlock.predecessors;
// $ExpectType BasicBlock | null
entryBlock.immediateDominator;
// $ExpectType Instruction[]
entryBlock.instructions;

const art = Process.getModuleByName("libart.so");
// $ExpectType NativePointer
art.getSymbolByName("ExecuteNterpImpl");
Expand Down
Loading