I am not sure I understand your question clearly. If you like to query a subset of a layer data, set query.where to limit the result based on the attribute values. That's about the equivalent of definition expression if using Query. If you do need to use the real definition expression as used in ArcMap, create a FeatureLayer for the layer you like to query, and then set definition expression like the below sample:require(["esri/layers/FeatureLayer", ...], function(FeatureLayer, ...) {
var featureLayer = new FeatureLayer("rest/url/of/the/layer",{
mode: FeatureLayer.MODE_SELECTION,
outFields: ["*"]
});
featureLayer.setDefinitionExpression("STATE_NAME = 'South Carolina'");
...
});
You can further query against the featureLayer using featureLayer.queryFeatures. Hope it helps.