function tT = rmprop(tT, varargin)
%ADDPROP Remove custom properties from a table.
%   T = RMPROP(T,PROPERTYNAMES)
%
%   Limitations:
%   Using a pattern object for PROPERTYNAMES is not supported.
%
%   See also TABULAR/RMPROP.

%   Copyright 2018-2021 The MathWorks, Inc.

tall.checkIsTall(mfilename, 1, tT);
tall.checkNotTall(mfilename, 1, varargin{:});
tT = tall.validateType(tT, mfilename, {'table', 'timetable'}, 1);

fh = @(t) rmprop(t, varargin{:});
tall.validateSyntax(fh, {tT}, ...
    'DefaultType', 'double', ...
    'NumOutputs', nargout);

% Pattern objects are not supported
matlab.bigdata.internal.util.errorIfPatternInput('tall', varargin{:});

adaptor = tT.Adaptor;
tT = elementfun(fh, tT);
tT.Adaptor = joinBySample(fh, false, adaptor);
