typePredicateStructuralMatch.ts(13,18): error TS2339: Property 'hasOwnProperty' does not exist on type 'T | { data: T; }'.
  Property 'hasOwnProperty' does not exist on type 'T'.
typePredicateStructuralMatch.ts(21,19): error TS2339: Property 'hasOwnProperty' does not exist on type 'T | { data: T; }'.
  Property 'hasOwnProperty' does not exist on type 'T'.


==== typePredicateStructuralMatch.ts (2 errors) ====
    // Repro from #12235
    
    getResults1([]);
    getResults1({data: []});
    
    getResults2([]);
    getResults2({data: []});
    
    type Result = { value: string };
    type Results = Result[];
    
    function isResponseInData<T>(value: T | { data: T}): value is { data: T } {
        return value.hasOwnProperty('data');
                     ~~~~~~~~~~~~~~
!!! error TS2339: Property 'hasOwnProperty' does not exist on type 'T | { data: T; }'.
!!! error TS2339:   Property 'hasOwnProperty' does not exist on type 'T'.
    }
    
    function getResults1(value: Results | { data: Results }): Results {
        return isResponseInData(value) ? value.data : value;
    }
    
    function isPlainResponse<T>(value: T | { data: T}): value is T {
        return !value.hasOwnProperty('data');
                      ~~~~~~~~~~~~~~
!!! error TS2339: Property 'hasOwnProperty' does not exist on type 'T | { data: T; }'.
!!! error TS2339:   Property 'hasOwnProperty' does not exist on type 'T'.
    }
    
    function getResults2(value: Results | { data: Results }): Results {
        return isPlainResponse(value) ? value : value.data;
    }